🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
1
node_modules/property-information/lib/aria.d.ts
generated
vendored
Normal file
1
node_modules/property-information/lib/aria.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const aria: import('./util/schema.js').Schema
|
||||
59
node_modules/property-information/lib/aria.js
generated
vendored
Normal file
59
node_modules/property-information/lib/aria.js
generated
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
import {booleanish, number, spaceSeparated} from './util/types.js'
|
||||
import {create} from './util/create.js'
|
||||
|
||||
export const aria = create({
|
||||
transform(_, prop) {
|
||||
return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()
|
||||
},
|
||||
properties: {
|
||||
ariaActiveDescendant: null,
|
||||
ariaAtomic: booleanish,
|
||||
ariaAutoComplete: null,
|
||||
ariaBusy: booleanish,
|
||||
ariaChecked: booleanish,
|
||||
ariaColCount: number,
|
||||
ariaColIndex: number,
|
||||
ariaColSpan: number,
|
||||
ariaControls: spaceSeparated,
|
||||
ariaCurrent: null,
|
||||
ariaDescribedBy: spaceSeparated,
|
||||
ariaDetails: null,
|
||||
ariaDisabled: booleanish,
|
||||
ariaDropEffect: spaceSeparated,
|
||||
ariaErrorMessage: null,
|
||||
ariaExpanded: booleanish,
|
||||
ariaFlowTo: spaceSeparated,
|
||||
ariaGrabbed: booleanish,
|
||||
ariaHasPopup: null,
|
||||
ariaHidden: booleanish,
|
||||
ariaInvalid: null,
|
||||
ariaKeyShortcuts: null,
|
||||
ariaLabel: null,
|
||||
ariaLabelledBy: spaceSeparated,
|
||||
ariaLevel: number,
|
||||
ariaLive: null,
|
||||
ariaModal: booleanish,
|
||||
ariaMultiLine: booleanish,
|
||||
ariaMultiSelectable: booleanish,
|
||||
ariaOrientation: null,
|
||||
ariaOwns: spaceSeparated,
|
||||
ariaPlaceholder: null,
|
||||
ariaPosInSet: number,
|
||||
ariaPressed: booleanish,
|
||||
ariaReadOnly: booleanish,
|
||||
ariaRelevant: null,
|
||||
ariaRequired: booleanish,
|
||||
ariaRoleDescription: spaceSeparated,
|
||||
ariaRowCount: number,
|
||||
ariaRowIndex: number,
|
||||
ariaRowSpan: number,
|
||||
ariaSelected: booleanish,
|
||||
ariaSetSize: number,
|
||||
ariaSort: null,
|
||||
ariaValueMax: number,
|
||||
ariaValueMin: number,
|
||||
ariaValueNow: number,
|
||||
ariaValueText: null,
|
||||
role: null
|
||||
}
|
||||
})
|
||||
8
node_modules/property-information/lib/find.d.ts
generated
vendored
Normal file
8
node_modules/property-information/lib/find.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* @param {Schema} schema
|
||||
* @param {string} value
|
||||
* @returns {Info}
|
||||
*/
|
||||
export function find(schema: Schema, value: string): Info
|
||||
export type Schema = import('./util/schema.js').Schema
|
||||
import {Info} from './util/info.js'
|
||||
68
node_modules/property-information/lib/find.js
generated
vendored
Normal file
68
node_modules/property-information/lib/find.js
generated
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/**
|
||||
* @typedef {import('./util/schema.js').Schema} Schema
|
||||
*/
|
||||
|
||||
import {normalize} from './normalize.js'
|
||||
import {DefinedInfo} from './util/defined-info.js'
|
||||
import {Info} from './util/info.js'
|
||||
|
||||
const valid = /^data[-\w.:]+$/i
|
||||
const dash = /-[a-z]/g
|
||||
const cap = /[A-Z]/g
|
||||
|
||||
/**
|
||||
* @param {Schema} schema
|
||||
* @param {string} value
|
||||
* @returns {Info}
|
||||
*/
|
||||
export function find(schema, value) {
|
||||
const normal = normalize(value)
|
||||
let prop = value
|
||||
let Type = Info
|
||||
|
||||
if (normal in schema.normal) {
|
||||
return schema.property[schema.normal[normal]]
|
||||
}
|
||||
|
||||
if (normal.length > 4 && normal.slice(0, 4) === 'data' && valid.test(value)) {
|
||||
// Attribute or property.
|
||||
if (value.charAt(4) === '-') {
|
||||
// Turn it into a property.
|
||||
const rest = value.slice(5).replace(dash, camelcase)
|
||||
prop = 'data' + rest.charAt(0).toUpperCase() + rest.slice(1)
|
||||
} else {
|
||||
// Turn it into an attribute.
|
||||
const rest = value.slice(4)
|
||||
|
||||
if (!dash.test(rest)) {
|
||||
let dashes = rest.replace(cap, kebab)
|
||||
|
||||
if (dashes.charAt(0) !== '-') {
|
||||
dashes = '-' + dashes
|
||||
}
|
||||
|
||||
value = 'data' + dashes
|
||||
}
|
||||
}
|
||||
|
||||
Type = DefinedInfo
|
||||
}
|
||||
|
||||
return new Type(prop, value)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} $0
|
||||
* @returns {string}
|
||||
*/
|
||||
function kebab($0) {
|
||||
return '-' + $0.toLowerCase()
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} $0
|
||||
* @returns {string}
|
||||
*/
|
||||
function camelcase($0) {
|
||||
return $0.charAt(1).toUpperCase()
|
||||
}
|
||||
10
node_modules/property-information/lib/hast-to-react.d.ts
generated
vendored
Normal file
10
node_modules/property-information/lib/hast-to-react.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* `hast` is close to `React`, but differs in a couple of cases.
|
||||
*
|
||||
* To get a React property from a hast property, check if it is in
|
||||
* `hastToReact`, if it is, then use the corresponding value,
|
||||
* otherwise, use the hast property.
|
||||
*
|
||||
* @type {Record<string, string>}
|
||||
*/
|
||||
export const hastToReact: Record<string, string>
|
||||
28
node_modules/property-information/lib/hast-to-react.js
generated
vendored
Normal file
28
node_modules/property-information/lib/hast-to-react.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* `hast` is close to `React`, but differs in a couple of cases.
|
||||
*
|
||||
* To get a React property from a hast property, check if it is in
|
||||
* `hastToReact`, if it is, then use the corresponding value,
|
||||
* otherwise, use the hast property.
|
||||
*
|
||||
* @type {Record<string, string>}
|
||||
*/
|
||||
export const hastToReact = {
|
||||
classId: 'classID',
|
||||
dataType: 'datatype',
|
||||
itemId: 'itemID',
|
||||
strokeDashArray: 'strokeDasharray',
|
||||
strokeDashOffset: 'strokeDashoffset',
|
||||
strokeLineCap: 'strokeLinecap',
|
||||
strokeLineJoin: 'strokeLinejoin',
|
||||
strokeMiterLimit: 'strokeMiterlimit',
|
||||
typeOf: 'typeof',
|
||||
xLinkActuate: 'xlinkActuate',
|
||||
xLinkArcRole: 'xlinkArcrole',
|
||||
xLinkHref: 'xlinkHref',
|
||||
xLinkRole: 'xlinkRole',
|
||||
xLinkShow: 'xlinkShow',
|
||||
xLinkTitle: 'xlinkTitle',
|
||||
xLinkType: 'xlinkType',
|
||||
xmlnsXLink: 'xmlnsXlink'
|
||||
}
|
||||
1
node_modules/property-information/lib/html.d.ts
generated
vendored
Normal file
1
node_modules/property-information/lib/html.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const html: import('./util/schema.js').Schema
|
||||
311
node_modules/property-information/lib/html.js
generated
vendored
Normal file
311
node_modules/property-information/lib/html.js
generated
vendored
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
import {
|
||||
boolean,
|
||||
overloadedBoolean,
|
||||
booleanish,
|
||||
number,
|
||||
spaceSeparated,
|
||||
commaSeparated
|
||||
} from './util/types.js'
|
||||
import {create} from './util/create.js'
|
||||
import {caseInsensitiveTransform} from './util/case-insensitive-transform.js'
|
||||
|
||||
export const html = create({
|
||||
space: 'html',
|
||||
attributes: {
|
||||
acceptcharset: 'accept-charset',
|
||||
classname: 'class',
|
||||
htmlfor: 'for',
|
||||
httpequiv: 'http-equiv'
|
||||
},
|
||||
transform: caseInsensitiveTransform,
|
||||
mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],
|
||||
properties: {
|
||||
// Standard Properties.
|
||||
abbr: null,
|
||||
accept: commaSeparated,
|
||||
acceptCharset: spaceSeparated,
|
||||
accessKey: spaceSeparated,
|
||||
action: null,
|
||||
allow: null,
|
||||
allowFullScreen: boolean,
|
||||
allowPaymentRequest: boolean,
|
||||
allowUserMedia: boolean,
|
||||
alt: null,
|
||||
as: null,
|
||||
async: boolean,
|
||||
autoCapitalize: null,
|
||||
autoComplete: spaceSeparated,
|
||||
autoFocus: boolean,
|
||||
autoPlay: boolean,
|
||||
capture: boolean,
|
||||
charSet: null,
|
||||
checked: boolean,
|
||||
cite: null,
|
||||
className: spaceSeparated,
|
||||
cols: number,
|
||||
colSpan: null,
|
||||
content: null,
|
||||
contentEditable: booleanish,
|
||||
controls: boolean,
|
||||
controlsList: spaceSeparated,
|
||||
coords: number | commaSeparated,
|
||||
crossOrigin: null,
|
||||
data: null,
|
||||
dateTime: null,
|
||||
decoding: null,
|
||||
default: boolean,
|
||||
defer: boolean,
|
||||
dir: null,
|
||||
dirName: null,
|
||||
disabled: boolean,
|
||||
download: overloadedBoolean,
|
||||
draggable: booleanish,
|
||||
encType: null,
|
||||
enterKeyHint: null,
|
||||
form: null,
|
||||
formAction: null,
|
||||
formEncType: null,
|
||||
formMethod: null,
|
||||
formNoValidate: boolean,
|
||||
formTarget: null,
|
||||
headers: spaceSeparated,
|
||||
height: number,
|
||||
hidden: boolean,
|
||||
high: number,
|
||||
href: null,
|
||||
hrefLang: null,
|
||||
htmlFor: spaceSeparated,
|
||||
httpEquiv: spaceSeparated,
|
||||
id: null,
|
||||
imageSizes: null,
|
||||
imageSrcSet: null,
|
||||
inputMode: null,
|
||||
integrity: null,
|
||||
is: null,
|
||||
isMap: boolean,
|
||||
itemId: null,
|
||||
itemProp: spaceSeparated,
|
||||
itemRef: spaceSeparated,
|
||||
itemScope: boolean,
|
||||
itemType: spaceSeparated,
|
||||
kind: null,
|
||||
label: null,
|
||||
lang: null,
|
||||
language: null,
|
||||
list: null,
|
||||
loading: null,
|
||||
loop: boolean,
|
||||
low: number,
|
||||
manifest: null,
|
||||
max: null,
|
||||
maxLength: number,
|
||||
media: null,
|
||||
method: null,
|
||||
min: null,
|
||||
minLength: number,
|
||||
multiple: boolean,
|
||||
muted: boolean,
|
||||
name: null,
|
||||
nonce: null,
|
||||
noModule: boolean,
|
||||
noValidate: boolean,
|
||||
onAbort: null,
|
||||
onAfterPrint: null,
|
||||
onAuxClick: null,
|
||||
onBeforeMatch: null,
|
||||
onBeforePrint: null,
|
||||
onBeforeUnload: null,
|
||||
onBlur: null,
|
||||
onCancel: null,
|
||||
onCanPlay: null,
|
||||
onCanPlayThrough: null,
|
||||
onChange: null,
|
||||
onClick: null,
|
||||
onClose: null,
|
||||
onContextLost: null,
|
||||
onContextMenu: null,
|
||||
onContextRestored: null,
|
||||
onCopy: null,
|
||||
onCueChange: null,
|
||||
onCut: null,
|
||||
onDblClick: null,
|
||||
onDrag: null,
|
||||
onDragEnd: null,
|
||||
onDragEnter: null,
|
||||
onDragExit: null,
|
||||
onDragLeave: null,
|
||||
onDragOver: null,
|
||||
onDragStart: null,
|
||||
onDrop: null,
|
||||
onDurationChange: null,
|
||||
onEmptied: null,
|
||||
onEnded: null,
|
||||
onError: null,
|
||||
onFocus: null,
|
||||
onFormData: null,
|
||||
onHashChange: null,
|
||||
onInput: null,
|
||||
onInvalid: null,
|
||||
onKeyDown: null,
|
||||
onKeyPress: null,
|
||||
onKeyUp: null,
|
||||
onLanguageChange: null,
|
||||
onLoad: null,
|
||||
onLoadedData: null,
|
||||
onLoadedMetadata: null,
|
||||
onLoadEnd: null,
|
||||
onLoadStart: null,
|
||||
onMessage: null,
|
||||
onMessageError: null,
|
||||
onMouseDown: null,
|
||||
onMouseEnter: null,
|
||||
onMouseLeave: null,
|
||||
onMouseMove: null,
|
||||
onMouseOut: null,
|
||||
onMouseOver: null,
|
||||
onMouseUp: null,
|
||||
onOffline: null,
|
||||
onOnline: null,
|
||||
onPageHide: null,
|
||||
onPageShow: null,
|
||||
onPaste: null,
|
||||
onPause: null,
|
||||
onPlay: null,
|
||||
onPlaying: null,
|
||||
onPopState: null,
|
||||
onProgress: null,
|
||||
onRateChange: null,
|
||||
onRejectionHandled: null,
|
||||
onReset: null,
|
||||
onResize: null,
|
||||
onScroll: null,
|
||||
onScrollEnd: null,
|
||||
onSecurityPolicyViolation: null,
|
||||
onSeeked: null,
|
||||
onSeeking: null,
|
||||
onSelect: null,
|
||||
onSlotChange: null,
|
||||
onStalled: null,
|
||||
onStorage: null,
|
||||
onSubmit: null,
|
||||
onSuspend: null,
|
||||
onTimeUpdate: null,
|
||||
onToggle: null,
|
||||
onUnhandledRejection: null,
|
||||
onUnload: null,
|
||||
onVolumeChange: null,
|
||||
onWaiting: null,
|
||||
onWheel: null,
|
||||
open: boolean,
|
||||
optimum: number,
|
||||
pattern: null,
|
||||
ping: spaceSeparated,
|
||||
placeholder: null,
|
||||
playsInline: boolean,
|
||||
poster: null,
|
||||
preload: null,
|
||||
readOnly: boolean,
|
||||
referrerPolicy: null,
|
||||
rel: spaceSeparated,
|
||||
required: boolean,
|
||||
reversed: boolean,
|
||||
rows: number,
|
||||
rowSpan: number,
|
||||
sandbox: spaceSeparated,
|
||||
scope: null,
|
||||
scoped: boolean,
|
||||
seamless: boolean,
|
||||
selected: boolean,
|
||||
shape: null,
|
||||
size: number,
|
||||
sizes: null,
|
||||
slot: null,
|
||||
span: number,
|
||||
spellCheck: booleanish,
|
||||
src: null,
|
||||
srcDoc: null,
|
||||
srcLang: null,
|
||||
srcSet: null,
|
||||
start: number,
|
||||
step: null,
|
||||
style: null,
|
||||
tabIndex: number,
|
||||
target: null,
|
||||
title: null,
|
||||
translate: null,
|
||||
type: null,
|
||||
typeMustMatch: boolean,
|
||||
useMap: null,
|
||||
value: booleanish,
|
||||
width: number,
|
||||
wrap: null,
|
||||
|
||||
// Legacy.
|
||||
// See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
|
||||
align: null, // Several. Use CSS `text-align` instead,
|
||||
aLink: null, // `<body>`. Use CSS `a:active {color}` instead
|
||||
archive: spaceSeparated, // `<object>`. List of URIs to archives
|
||||
axis: null, // `<td>` and `<th>`. Use `scope` on `<th>`
|
||||
background: null, // `<body>`. Use CSS `background-image` instead
|
||||
bgColor: null, // `<body>` and table elements. Use CSS `background-color` instead
|
||||
border: number, // `<table>`. Use CSS `border-width` instead,
|
||||
borderColor: null, // `<table>`. Use CSS `border-color` instead,
|
||||
bottomMargin: number, // `<body>`
|
||||
cellPadding: null, // `<table>`
|
||||
cellSpacing: null, // `<table>`
|
||||
char: null, // Several table elements. When `align=char`, sets the character to align on
|
||||
charOff: null, // Several table elements. When `char`, offsets the alignment
|
||||
classId: null, // `<object>`
|
||||
clear: null, // `<br>`. Use CSS `clear` instead
|
||||
code: null, // `<object>`
|
||||
codeBase: null, // `<object>`
|
||||
codeType: null, // `<object>`
|
||||
color: null, // `<font>` and `<hr>`. Use CSS instead
|
||||
compact: boolean, // Lists. Use CSS to reduce space between items instead
|
||||
declare: boolean, // `<object>`
|
||||
event: null, // `<script>`
|
||||
face: null, // `<font>`. Use CSS instead
|
||||
frame: null, // `<table>`
|
||||
frameBorder: null, // `<iframe>`. Use CSS `border` instead
|
||||
hSpace: number, // `<img>` and `<object>`
|
||||
leftMargin: number, // `<body>`
|
||||
link: null, // `<body>`. Use CSS `a:link {color: *}` instead
|
||||
longDesc: null, // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
|
||||
lowSrc: null, // `<img>`. Use a `<picture>`
|
||||
marginHeight: number, // `<body>`
|
||||
marginWidth: number, // `<body>`
|
||||
noResize: boolean, // `<frame>`
|
||||
noHref: boolean, // `<area>`. Use no href instead of an explicit `nohref`
|
||||
noShade: boolean, // `<hr>`. Use background-color and height instead of borders
|
||||
noWrap: boolean, // `<td>` and `<th>`
|
||||
object: null, // `<applet>`
|
||||
profile: null, // `<head>`
|
||||
prompt: null, // `<isindex>`
|
||||
rev: null, // `<link>`
|
||||
rightMargin: number, // `<body>`
|
||||
rules: null, // `<table>`
|
||||
scheme: null, // `<meta>`
|
||||
scrolling: booleanish, // `<frame>`. Use overflow in the child context
|
||||
standby: null, // `<object>`
|
||||
summary: null, // `<table>`
|
||||
text: null, // `<body>`. Use CSS `color` instead
|
||||
topMargin: number, // `<body>`
|
||||
valueType: null, // `<param>`
|
||||
version: null, // `<html>`. Use a doctype.
|
||||
vAlign: null, // Several. Use CSS `vertical-align` instead
|
||||
vLink: null, // `<body>`. Use CSS `a:visited {color}` instead
|
||||
vSpace: number, // `<img>` and `<object>`
|
||||
|
||||
// Non-standard Properties.
|
||||
allowTransparency: null,
|
||||
autoCorrect: null,
|
||||
autoSave: null,
|
||||
disablePictureInPicture: boolean,
|
||||
disableRemotePlayback: boolean,
|
||||
prefix: null,
|
||||
property: null,
|
||||
results: number,
|
||||
security: null,
|
||||
unselectable: null
|
||||
}
|
||||
})
|
||||
5
node_modules/property-information/lib/normalize.d.ts
generated
vendored
Normal file
5
node_modules/property-information/lib/normalize.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* @param {string} value
|
||||
* @returns {string}
|
||||
*/
|
||||
export function normalize(value: string): string
|
||||
7
node_modules/property-information/lib/normalize.js
generated
vendored
Normal file
7
node_modules/property-information/lib/normalize.js
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* @param {string} value
|
||||
* @returns {string}
|
||||
*/
|
||||
export function normalize(value) {
|
||||
return value.toLowerCase()
|
||||
}
|
||||
1
node_modules/property-information/lib/svg.d.ts
generated
vendored
Normal file
1
node_modules/property-information/lib/svg.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const svg: import('./util/schema.js').Schema
|
||||
565
node_modules/property-information/lib/svg.js
generated
vendored
Normal file
565
node_modules/property-information/lib/svg.js
generated
vendored
Normal file
|
|
@ -0,0 +1,565 @@
|
|||
import {
|
||||
boolean,
|
||||
number,
|
||||
spaceSeparated,
|
||||
commaSeparated,
|
||||
commaOrSpaceSeparated
|
||||
} from './util/types.js'
|
||||
import {create} from './util/create.js'
|
||||
import {caseSensitiveTransform} from './util/case-sensitive-transform.js'
|
||||
|
||||
export const svg = create({
|
||||
space: 'svg',
|
||||
attributes: {
|
||||
accentHeight: 'accent-height',
|
||||
alignmentBaseline: 'alignment-baseline',
|
||||
arabicForm: 'arabic-form',
|
||||
baselineShift: 'baseline-shift',
|
||||
capHeight: 'cap-height',
|
||||
className: 'class',
|
||||
clipPath: 'clip-path',
|
||||
clipRule: 'clip-rule',
|
||||
colorInterpolation: 'color-interpolation',
|
||||
colorInterpolationFilters: 'color-interpolation-filters',
|
||||
colorProfile: 'color-profile',
|
||||
colorRendering: 'color-rendering',
|
||||
crossOrigin: 'crossorigin',
|
||||
dataType: 'datatype',
|
||||
dominantBaseline: 'dominant-baseline',
|
||||
enableBackground: 'enable-background',
|
||||
fillOpacity: 'fill-opacity',
|
||||
fillRule: 'fill-rule',
|
||||
floodColor: 'flood-color',
|
||||
floodOpacity: 'flood-opacity',
|
||||
fontFamily: 'font-family',
|
||||
fontSize: 'font-size',
|
||||
fontSizeAdjust: 'font-size-adjust',
|
||||
fontStretch: 'font-stretch',
|
||||
fontStyle: 'font-style',
|
||||
fontVariant: 'font-variant',
|
||||
fontWeight: 'font-weight',
|
||||
glyphName: 'glyph-name',
|
||||
glyphOrientationHorizontal: 'glyph-orientation-horizontal',
|
||||
glyphOrientationVertical: 'glyph-orientation-vertical',
|
||||
hrefLang: 'hreflang',
|
||||
horizAdvX: 'horiz-adv-x',
|
||||
horizOriginX: 'horiz-origin-x',
|
||||
horizOriginY: 'horiz-origin-y',
|
||||
imageRendering: 'image-rendering',
|
||||
letterSpacing: 'letter-spacing',
|
||||
lightingColor: 'lighting-color',
|
||||
markerEnd: 'marker-end',
|
||||
markerMid: 'marker-mid',
|
||||
markerStart: 'marker-start',
|
||||
navDown: 'nav-down',
|
||||
navDownLeft: 'nav-down-left',
|
||||
navDownRight: 'nav-down-right',
|
||||
navLeft: 'nav-left',
|
||||
navNext: 'nav-next',
|
||||
navPrev: 'nav-prev',
|
||||
navRight: 'nav-right',
|
||||
navUp: 'nav-up',
|
||||
navUpLeft: 'nav-up-left',
|
||||
navUpRight: 'nav-up-right',
|
||||
onAbort: 'onabort',
|
||||
onActivate: 'onactivate',
|
||||
onAfterPrint: 'onafterprint',
|
||||
onBeforePrint: 'onbeforeprint',
|
||||
onBegin: 'onbegin',
|
||||
onCancel: 'oncancel',
|
||||
onCanPlay: 'oncanplay',
|
||||
onCanPlayThrough: 'oncanplaythrough',
|
||||
onChange: 'onchange',
|
||||
onClick: 'onclick',
|
||||
onClose: 'onclose',
|
||||
onCopy: 'oncopy',
|
||||
onCueChange: 'oncuechange',
|
||||
onCut: 'oncut',
|
||||
onDblClick: 'ondblclick',
|
||||
onDrag: 'ondrag',
|
||||
onDragEnd: 'ondragend',
|
||||
onDragEnter: 'ondragenter',
|
||||
onDragExit: 'ondragexit',
|
||||
onDragLeave: 'ondragleave',
|
||||
onDragOver: 'ondragover',
|
||||
onDragStart: 'ondragstart',
|
||||
onDrop: 'ondrop',
|
||||
onDurationChange: 'ondurationchange',
|
||||
onEmptied: 'onemptied',
|
||||
onEnd: 'onend',
|
||||
onEnded: 'onended',
|
||||
onError: 'onerror',
|
||||
onFocus: 'onfocus',
|
||||
onFocusIn: 'onfocusin',
|
||||
onFocusOut: 'onfocusout',
|
||||
onHashChange: 'onhashchange',
|
||||
onInput: 'oninput',
|
||||
onInvalid: 'oninvalid',
|
||||
onKeyDown: 'onkeydown',
|
||||
onKeyPress: 'onkeypress',
|
||||
onKeyUp: 'onkeyup',
|
||||
onLoad: 'onload',
|
||||
onLoadedData: 'onloadeddata',
|
||||
onLoadedMetadata: 'onloadedmetadata',
|
||||
onLoadStart: 'onloadstart',
|
||||
onMessage: 'onmessage',
|
||||
onMouseDown: 'onmousedown',
|
||||
onMouseEnter: 'onmouseenter',
|
||||
onMouseLeave: 'onmouseleave',
|
||||
onMouseMove: 'onmousemove',
|
||||
onMouseOut: 'onmouseout',
|
||||
onMouseOver: 'onmouseover',
|
||||
onMouseUp: 'onmouseup',
|
||||
onMouseWheel: 'onmousewheel',
|
||||
onOffline: 'onoffline',
|
||||
onOnline: 'ononline',
|
||||
onPageHide: 'onpagehide',
|
||||
onPageShow: 'onpageshow',
|
||||
onPaste: 'onpaste',
|
||||
onPause: 'onpause',
|
||||
onPlay: 'onplay',
|
||||
onPlaying: 'onplaying',
|
||||
onPopState: 'onpopstate',
|
||||
onProgress: 'onprogress',
|
||||
onRateChange: 'onratechange',
|
||||
onRepeat: 'onrepeat',
|
||||
onReset: 'onreset',
|
||||
onResize: 'onresize',
|
||||
onScroll: 'onscroll',
|
||||
onSeeked: 'onseeked',
|
||||
onSeeking: 'onseeking',
|
||||
onSelect: 'onselect',
|
||||
onShow: 'onshow',
|
||||
onStalled: 'onstalled',
|
||||
onStorage: 'onstorage',
|
||||
onSubmit: 'onsubmit',
|
||||
onSuspend: 'onsuspend',
|
||||
onTimeUpdate: 'ontimeupdate',
|
||||
onToggle: 'ontoggle',
|
||||
onUnload: 'onunload',
|
||||
onVolumeChange: 'onvolumechange',
|
||||
onWaiting: 'onwaiting',
|
||||
onZoom: 'onzoom',
|
||||
overlinePosition: 'overline-position',
|
||||
overlineThickness: 'overline-thickness',
|
||||
paintOrder: 'paint-order',
|
||||
panose1: 'panose-1',
|
||||
pointerEvents: 'pointer-events',
|
||||
referrerPolicy: 'referrerpolicy',
|
||||
renderingIntent: 'rendering-intent',
|
||||
shapeRendering: 'shape-rendering',
|
||||
stopColor: 'stop-color',
|
||||
stopOpacity: 'stop-opacity',
|
||||
strikethroughPosition: 'strikethrough-position',
|
||||
strikethroughThickness: 'strikethrough-thickness',
|
||||
strokeDashArray: 'stroke-dasharray',
|
||||
strokeDashOffset: 'stroke-dashoffset',
|
||||
strokeLineCap: 'stroke-linecap',
|
||||
strokeLineJoin: 'stroke-linejoin',
|
||||
strokeMiterLimit: 'stroke-miterlimit',
|
||||
strokeOpacity: 'stroke-opacity',
|
||||
strokeWidth: 'stroke-width',
|
||||
tabIndex: 'tabindex',
|
||||
textAnchor: 'text-anchor',
|
||||
textDecoration: 'text-decoration',
|
||||
textRendering: 'text-rendering',
|
||||
typeOf: 'typeof',
|
||||
underlinePosition: 'underline-position',
|
||||
underlineThickness: 'underline-thickness',
|
||||
unicodeBidi: 'unicode-bidi',
|
||||
unicodeRange: 'unicode-range',
|
||||
unitsPerEm: 'units-per-em',
|
||||
vAlphabetic: 'v-alphabetic',
|
||||
vHanging: 'v-hanging',
|
||||
vIdeographic: 'v-ideographic',
|
||||
vMathematical: 'v-mathematical',
|
||||
vectorEffect: 'vector-effect',
|
||||
vertAdvY: 'vert-adv-y',
|
||||
vertOriginX: 'vert-origin-x',
|
||||
vertOriginY: 'vert-origin-y',
|
||||
wordSpacing: 'word-spacing',
|
||||
writingMode: 'writing-mode',
|
||||
xHeight: 'x-height',
|
||||
// These were camelcased in Tiny. Now lowercased in SVG 2
|
||||
playbackOrder: 'playbackorder',
|
||||
timelineBegin: 'timelinebegin'
|
||||
},
|
||||
transform: caseSensitiveTransform,
|
||||
properties: {
|
||||
about: commaOrSpaceSeparated,
|
||||
accentHeight: number,
|
||||
accumulate: null,
|
||||
additive: null,
|
||||
alignmentBaseline: null,
|
||||
alphabetic: number,
|
||||
amplitude: number,
|
||||
arabicForm: null,
|
||||
ascent: number,
|
||||
attributeName: null,
|
||||
attributeType: null,
|
||||
azimuth: number,
|
||||
bandwidth: null,
|
||||
baselineShift: null,
|
||||
baseFrequency: null,
|
||||
baseProfile: null,
|
||||
bbox: null,
|
||||
begin: null,
|
||||
bias: number,
|
||||
by: null,
|
||||
calcMode: null,
|
||||
capHeight: number,
|
||||
className: spaceSeparated,
|
||||
clip: null,
|
||||
clipPath: null,
|
||||
clipPathUnits: null,
|
||||
clipRule: null,
|
||||
color: null,
|
||||
colorInterpolation: null,
|
||||
colorInterpolationFilters: null,
|
||||
colorProfile: null,
|
||||
colorRendering: null,
|
||||
content: null,
|
||||
contentScriptType: null,
|
||||
contentStyleType: null,
|
||||
crossOrigin: null,
|
||||
cursor: null,
|
||||
cx: null,
|
||||
cy: null,
|
||||
d: null,
|
||||
dataType: null,
|
||||
defaultAction: null,
|
||||
descent: number,
|
||||
diffuseConstant: number,
|
||||
direction: null,
|
||||
display: null,
|
||||
dur: null,
|
||||
divisor: number,
|
||||
dominantBaseline: null,
|
||||
download: boolean,
|
||||
dx: null,
|
||||
dy: null,
|
||||
edgeMode: null,
|
||||
editable: null,
|
||||
elevation: number,
|
||||
enableBackground: null,
|
||||
end: null,
|
||||
event: null,
|
||||
exponent: number,
|
||||
externalResourcesRequired: null,
|
||||
fill: null,
|
||||
fillOpacity: number,
|
||||
fillRule: null,
|
||||
filter: null,
|
||||
filterRes: null,
|
||||
filterUnits: null,
|
||||
floodColor: null,
|
||||
floodOpacity: null,
|
||||
focusable: null,
|
||||
focusHighlight: null,
|
||||
fontFamily: null,
|
||||
fontSize: null,
|
||||
fontSizeAdjust: null,
|
||||
fontStretch: null,
|
||||
fontStyle: null,
|
||||
fontVariant: null,
|
||||
fontWeight: null,
|
||||
format: null,
|
||||
fr: null,
|
||||
from: null,
|
||||
fx: null,
|
||||
fy: null,
|
||||
g1: commaSeparated,
|
||||
g2: commaSeparated,
|
||||
glyphName: commaSeparated,
|
||||
glyphOrientationHorizontal: null,
|
||||
glyphOrientationVertical: null,
|
||||
glyphRef: null,
|
||||
gradientTransform: null,
|
||||
gradientUnits: null,
|
||||
handler: null,
|
||||
hanging: number,
|
||||
hatchContentUnits: null,
|
||||
hatchUnits: null,
|
||||
height: null,
|
||||
href: null,
|
||||
hrefLang: null,
|
||||
horizAdvX: number,
|
||||
horizOriginX: number,
|
||||
horizOriginY: number,
|
||||
id: null,
|
||||
ideographic: number,
|
||||
imageRendering: null,
|
||||
initialVisibility: null,
|
||||
in: null,
|
||||
in2: null,
|
||||
intercept: number,
|
||||
k: number,
|
||||
k1: number,
|
||||
k2: number,
|
||||
k3: number,
|
||||
k4: number,
|
||||
kernelMatrix: commaOrSpaceSeparated,
|
||||
kernelUnitLength: null,
|
||||
keyPoints: null, // SEMI_COLON_SEPARATED
|
||||
keySplines: null, // SEMI_COLON_SEPARATED
|
||||
keyTimes: null, // SEMI_COLON_SEPARATED
|
||||
kerning: null,
|
||||
lang: null,
|
||||
lengthAdjust: null,
|
||||
letterSpacing: null,
|
||||
lightingColor: null,
|
||||
limitingConeAngle: number,
|
||||
local: null,
|
||||
markerEnd: null,
|
||||
markerMid: null,
|
||||
markerStart: null,
|
||||
markerHeight: null,
|
||||
markerUnits: null,
|
||||
markerWidth: null,
|
||||
mask: null,
|
||||
maskContentUnits: null,
|
||||
maskUnits: null,
|
||||
mathematical: null,
|
||||
max: null,
|
||||
media: null,
|
||||
mediaCharacterEncoding: null,
|
||||
mediaContentEncodings: null,
|
||||
mediaSize: number,
|
||||
mediaTime: null,
|
||||
method: null,
|
||||
min: null,
|
||||
mode: null,
|
||||
name: null,
|
||||
navDown: null,
|
||||
navDownLeft: null,
|
||||
navDownRight: null,
|
||||
navLeft: null,
|
||||
navNext: null,
|
||||
navPrev: null,
|
||||
navRight: null,
|
||||
navUp: null,
|
||||
navUpLeft: null,
|
||||
navUpRight: null,
|
||||
numOctaves: null,
|
||||
observer: null,
|
||||
offset: null,
|
||||
onAbort: null,
|
||||
onActivate: null,
|
||||
onAfterPrint: null,
|
||||
onBeforePrint: null,
|
||||
onBegin: null,
|
||||
onCancel: null,
|
||||
onCanPlay: null,
|
||||
onCanPlayThrough: null,
|
||||
onChange: null,
|
||||
onClick: null,
|
||||
onClose: null,
|
||||
onCopy: null,
|
||||
onCueChange: null,
|
||||
onCut: null,
|
||||
onDblClick: null,
|
||||
onDrag: null,
|
||||
onDragEnd: null,
|
||||
onDragEnter: null,
|
||||
onDragExit: null,
|
||||
onDragLeave: null,
|
||||
onDragOver: null,
|
||||
onDragStart: null,
|
||||
onDrop: null,
|
||||
onDurationChange: null,
|
||||
onEmptied: null,
|
||||
onEnd: null,
|
||||
onEnded: null,
|
||||
onError: null,
|
||||
onFocus: null,
|
||||
onFocusIn: null,
|
||||
onFocusOut: null,
|
||||
onHashChange: null,
|
||||
onInput: null,
|
||||
onInvalid: null,
|
||||
onKeyDown: null,
|
||||
onKeyPress: null,
|
||||
onKeyUp: null,
|
||||
onLoad: null,
|
||||
onLoadedData: null,
|
||||
onLoadedMetadata: null,
|
||||
onLoadStart: null,
|
||||
onMessage: null,
|
||||
onMouseDown: null,
|
||||
onMouseEnter: null,
|
||||
onMouseLeave: null,
|
||||
onMouseMove: null,
|
||||
onMouseOut: null,
|
||||
onMouseOver: null,
|
||||
onMouseUp: null,
|
||||
onMouseWheel: null,
|
||||
onOffline: null,
|
||||
onOnline: null,
|
||||
onPageHide: null,
|
||||
onPageShow: null,
|
||||
onPaste: null,
|
||||
onPause: null,
|
||||
onPlay: null,
|
||||
onPlaying: null,
|
||||
onPopState: null,
|
||||
onProgress: null,
|
||||
onRateChange: null,
|
||||
onRepeat: null,
|
||||
onReset: null,
|
||||
onResize: null,
|
||||
onScroll: null,
|
||||
onSeeked: null,
|
||||
onSeeking: null,
|
||||
onSelect: null,
|
||||
onShow: null,
|
||||
onStalled: null,
|
||||
onStorage: null,
|
||||
onSubmit: null,
|
||||
onSuspend: null,
|
||||
onTimeUpdate: null,
|
||||
onToggle: null,
|
||||
onUnload: null,
|
||||
onVolumeChange: null,
|
||||
onWaiting: null,
|
||||
onZoom: null,
|
||||
opacity: null,
|
||||
operator: null,
|
||||
order: null,
|
||||
orient: null,
|
||||
orientation: null,
|
||||
origin: null,
|
||||
overflow: null,
|
||||
overlay: null,
|
||||
overlinePosition: number,
|
||||
overlineThickness: number,
|
||||
paintOrder: null,
|
||||
panose1: null,
|
||||
path: null,
|
||||
pathLength: number,
|
||||
patternContentUnits: null,
|
||||
patternTransform: null,
|
||||
patternUnits: null,
|
||||
phase: null,
|
||||
ping: spaceSeparated,
|
||||
pitch: null,
|
||||
playbackOrder: null,
|
||||
pointerEvents: null,
|
||||
points: null,
|
||||
pointsAtX: number,
|
||||
pointsAtY: number,
|
||||
pointsAtZ: number,
|
||||
preserveAlpha: null,
|
||||
preserveAspectRatio: null,
|
||||
primitiveUnits: null,
|
||||
propagate: null,
|
||||
property: commaOrSpaceSeparated,
|
||||
r: null,
|
||||
radius: null,
|
||||
referrerPolicy: null,
|
||||
refX: null,
|
||||
refY: null,
|
||||
rel: commaOrSpaceSeparated,
|
||||
rev: commaOrSpaceSeparated,
|
||||
renderingIntent: null,
|
||||
repeatCount: null,
|
||||
repeatDur: null,
|
||||
requiredExtensions: commaOrSpaceSeparated,
|
||||
requiredFeatures: commaOrSpaceSeparated,
|
||||
requiredFonts: commaOrSpaceSeparated,
|
||||
requiredFormats: commaOrSpaceSeparated,
|
||||
resource: null,
|
||||
restart: null,
|
||||
result: null,
|
||||
rotate: null,
|
||||
rx: null,
|
||||
ry: null,
|
||||
scale: null,
|
||||
seed: null,
|
||||
shapeRendering: null,
|
||||
side: null,
|
||||
slope: null,
|
||||
snapshotTime: null,
|
||||
specularConstant: number,
|
||||
specularExponent: number,
|
||||
spreadMethod: null,
|
||||
spacing: null,
|
||||
startOffset: null,
|
||||
stdDeviation: null,
|
||||
stemh: null,
|
||||
stemv: null,
|
||||
stitchTiles: null,
|
||||
stopColor: null,
|
||||
stopOpacity: null,
|
||||
strikethroughPosition: number,
|
||||
strikethroughThickness: number,
|
||||
string: null,
|
||||
stroke: null,
|
||||
strokeDashArray: commaOrSpaceSeparated,
|
||||
strokeDashOffset: null,
|
||||
strokeLineCap: null,
|
||||
strokeLineJoin: null,
|
||||
strokeMiterLimit: number,
|
||||
strokeOpacity: number,
|
||||
strokeWidth: null,
|
||||
style: null,
|
||||
surfaceScale: number,
|
||||
syncBehavior: null,
|
||||
syncBehaviorDefault: null,
|
||||
syncMaster: null,
|
||||
syncTolerance: null,
|
||||
syncToleranceDefault: null,
|
||||
systemLanguage: commaOrSpaceSeparated,
|
||||
tabIndex: number,
|
||||
tableValues: null,
|
||||
target: null,
|
||||
targetX: number,
|
||||
targetY: number,
|
||||
textAnchor: null,
|
||||
textDecoration: null,
|
||||
textRendering: null,
|
||||
textLength: null,
|
||||
timelineBegin: null,
|
||||
title: null,
|
||||
transformBehavior: null,
|
||||
type: null,
|
||||
typeOf: commaOrSpaceSeparated,
|
||||
to: null,
|
||||
transform: null,
|
||||
u1: null,
|
||||
u2: null,
|
||||
underlinePosition: number,
|
||||
underlineThickness: number,
|
||||
unicode: null,
|
||||
unicodeBidi: null,
|
||||
unicodeRange: null,
|
||||
unitsPerEm: number,
|
||||
values: null,
|
||||
vAlphabetic: number,
|
||||
vMathematical: number,
|
||||
vectorEffect: null,
|
||||
vHanging: number,
|
||||
vIdeographic: number,
|
||||
version: null,
|
||||
vertAdvY: number,
|
||||
vertOriginX: number,
|
||||
vertOriginY: number,
|
||||
viewBox: null,
|
||||
viewTarget: null,
|
||||
visibility: null,
|
||||
width: null,
|
||||
widths: null,
|
||||
wordSpacing: null,
|
||||
writingMode: null,
|
||||
x: null,
|
||||
x1: null,
|
||||
x2: null,
|
||||
xChannelSelector: null,
|
||||
xHeight: number,
|
||||
y: null,
|
||||
y1: null,
|
||||
y2: null,
|
||||
yChannelSelector: null,
|
||||
z: null,
|
||||
zoomAndPan: null
|
||||
}
|
||||
})
|
||||
9
node_modules/property-information/lib/util/case-insensitive-transform.d.ts
generated
vendored
Normal file
9
node_modules/property-information/lib/util/case-insensitive-transform.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* @param {Record<string, string>} attributes
|
||||
* @param {string} property
|
||||
* @returns {string}
|
||||
*/
|
||||
export function caseInsensitiveTransform(
|
||||
attributes: Record<string, string>,
|
||||
property: string
|
||||
): string
|
||||
10
node_modules/property-information/lib/util/case-insensitive-transform.js
generated
vendored
Normal file
10
node_modules/property-information/lib/util/case-insensitive-transform.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import {caseSensitiveTransform} from './case-sensitive-transform.js'
|
||||
|
||||
/**
|
||||
* @param {Record<string, string>} attributes
|
||||
* @param {string} property
|
||||
* @returns {string}
|
||||
*/
|
||||
export function caseInsensitiveTransform(attributes, property) {
|
||||
return caseSensitiveTransform(attributes, property.toLowerCase())
|
||||
}
|
||||
9
node_modules/property-information/lib/util/case-sensitive-transform.d.ts
generated
vendored
Normal file
9
node_modules/property-information/lib/util/case-sensitive-transform.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* @param {Record<string, string>} attributes
|
||||
* @param {string} attribute
|
||||
* @returns {string}
|
||||
*/
|
||||
export function caseSensitiveTransform(
|
||||
attributes: Record<string, string>,
|
||||
attribute: string
|
||||
): string
|
||||
8
node_modules/property-information/lib/util/case-sensitive-transform.js
generated
vendored
Normal file
8
node_modules/property-information/lib/util/case-sensitive-transform.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* @param {Record<string, string>} attributes
|
||||
* @param {string} attribute
|
||||
* @returns {string}
|
||||
*/
|
||||
export function caseSensitiveTransform(attributes, attribute) {
|
||||
return attribute in attributes ? attributes[attribute] : attribute
|
||||
}
|
||||
16
node_modules/property-information/lib/util/create.d.ts
generated
vendored
Normal file
16
node_modules/property-information/lib/util/create.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* @param {Definition} definition
|
||||
* @returns {Schema}
|
||||
*/
|
||||
export function create(definition: Definition): Schema
|
||||
export type Properties = import('./schema.js').Properties
|
||||
export type Normal = import('./schema.js').Normal
|
||||
export type Attributes = Record<string, string>
|
||||
export type Definition = {
|
||||
properties: Record<string, number | null>
|
||||
transform: (attributes: Attributes, property: string) => string
|
||||
space?: string | undefined
|
||||
attributes?: Attributes | undefined
|
||||
mustUseProperty?: string[] | undefined
|
||||
}
|
||||
import {Schema} from './schema.js'
|
||||
58
node_modules/property-information/lib/util/create.js
generated
vendored
Normal file
58
node_modules/property-information/lib/util/create.js
generated
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/**
|
||||
* @typedef {import('./schema.js').Properties} Properties
|
||||
* @typedef {import('./schema.js').Normal} Normal
|
||||
*
|
||||
* @typedef {Record<string, string>} Attributes
|
||||
*
|
||||
* @typedef {Object} Definition
|
||||
* @property {Record<string, number|null>} properties
|
||||
* @property {(attributes: Attributes, property: string) => string} transform
|
||||
* @property {string} [space]
|
||||
* @property {Attributes} [attributes]
|
||||
* @property {Array<string>} [mustUseProperty]
|
||||
*/
|
||||
|
||||
import {normalize} from '../normalize.js'
|
||||
import {Schema} from './schema.js'
|
||||
import {DefinedInfo} from './defined-info.js'
|
||||
|
||||
const own = {}.hasOwnProperty
|
||||
|
||||
/**
|
||||
* @param {Definition} definition
|
||||
* @returns {Schema}
|
||||
*/
|
||||
export function create(definition) {
|
||||
/** @type {Properties} */
|
||||
const property = {}
|
||||
/** @type {Normal} */
|
||||
const normal = {}
|
||||
/** @type {string} */
|
||||
let prop
|
||||
|
||||
for (prop in definition.properties) {
|
||||
if (own.call(definition.properties, prop)) {
|
||||
const value = definition.properties[prop]
|
||||
const info = new DefinedInfo(
|
||||
prop,
|
||||
definition.transform(definition.attributes || {}, prop),
|
||||
value,
|
||||
definition.space
|
||||
)
|
||||
|
||||
if (
|
||||
definition.mustUseProperty &&
|
||||
definition.mustUseProperty.includes(prop)
|
||||
) {
|
||||
info.mustUseProperty = true
|
||||
}
|
||||
|
||||
property[prop] = info
|
||||
|
||||
normal[normalize(prop)] = prop
|
||||
normal[normalize(info.attribute)] = prop
|
||||
}
|
||||
}
|
||||
|
||||
return new Schema(property, normal, definition.space)
|
||||
}
|
||||
16
node_modules/property-information/lib/util/defined-info.d.ts
generated
vendored
Normal file
16
node_modules/property-information/lib/util/defined-info.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
export class DefinedInfo extends Info {
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} property
|
||||
* @param {string} attribute
|
||||
* @param {number|null} [mask]
|
||||
* @param {string} [space]
|
||||
*/
|
||||
constructor(
|
||||
property: string,
|
||||
attribute: string,
|
||||
mask?: number | null | undefined,
|
||||
space?: string | undefined
|
||||
)
|
||||
}
|
||||
import {Info} from './info.js'
|
||||
44
node_modules/property-information/lib/util/defined-info.js
generated
vendored
Normal file
44
node_modules/property-information/lib/util/defined-info.js
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import {Info} from './info.js'
|
||||
import * as types from './types.js'
|
||||
|
||||
/** @type {Array<keyof types>} */
|
||||
// @ts-expect-error: hush.
|
||||
const checks = Object.keys(types)
|
||||
|
||||
export class DefinedInfo extends Info {
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} property
|
||||
* @param {string} attribute
|
||||
* @param {number|null} [mask]
|
||||
* @param {string} [space]
|
||||
*/
|
||||
constructor(property, attribute, mask, space) {
|
||||
let index = -1
|
||||
|
||||
super(property, attribute)
|
||||
|
||||
mark(this, 'space', space)
|
||||
|
||||
if (typeof mask === 'number') {
|
||||
while (++index < checks.length) {
|
||||
const check = checks[index]
|
||||
mark(this, checks[index], (mask & types[check]) === types[check])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DefinedInfo.prototype.defined = true
|
||||
|
||||
/**
|
||||
* @param {DefinedInfo} values
|
||||
* @param {string} key
|
||||
* @param {unknown} value
|
||||
*/
|
||||
function mark(values, key, value) {
|
||||
if (value) {
|
||||
// @ts-expect-error: assume `value` matches the expected value of `key`.
|
||||
values[key] = value
|
||||
}
|
||||
}
|
||||
23
node_modules/property-information/lib/util/info.d.ts
generated
vendored
Normal file
23
node_modules/property-information/lib/util/info.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
export class Info {
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} property
|
||||
* @param {string} attribute
|
||||
*/
|
||||
constructor(property: string, attribute: string)
|
||||
/** @type {string} */
|
||||
property: string
|
||||
/** @type {string} */
|
||||
attribute: string
|
||||
/** @type {string|null} */
|
||||
space: string | null
|
||||
boolean: boolean
|
||||
booleanish: boolean
|
||||
overloadedBoolean: boolean
|
||||
number: boolean
|
||||
commaSeparated: boolean
|
||||
spaceSeparated: boolean
|
||||
commaOrSpaceSeparated: boolean
|
||||
mustUseProperty: boolean
|
||||
defined: boolean
|
||||
}
|
||||
25
node_modules/property-information/lib/util/info.js
generated
vendored
Normal file
25
node_modules/property-information/lib/util/info.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
export class Info {
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} property
|
||||
* @param {string} attribute
|
||||
*/
|
||||
constructor(property, attribute) {
|
||||
/** @type {string} */
|
||||
this.property = property
|
||||
/** @type {string} */
|
||||
this.attribute = attribute
|
||||
}
|
||||
}
|
||||
|
||||
/** @type {string|null} */
|
||||
Info.prototype.space = null
|
||||
Info.prototype.boolean = false
|
||||
Info.prototype.booleanish = false
|
||||
Info.prototype.overloadedBoolean = false
|
||||
Info.prototype.number = false
|
||||
Info.prototype.commaSeparated = false
|
||||
Info.prototype.spaceSeparated = false
|
||||
Info.prototype.commaOrSpaceSeparated = false
|
||||
Info.prototype.mustUseProperty = false
|
||||
Info.prototype.defined = false
|
||||
9
node_modules/property-information/lib/util/merge.d.ts
generated
vendored
Normal file
9
node_modules/property-information/lib/util/merge.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* @param {Schema[]} definitions
|
||||
* @param {string} [space]
|
||||
* @returns {Schema}
|
||||
*/
|
||||
export function merge(definitions: Schema[], space?: string | undefined): Schema
|
||||
export type Properties = import('./schema.js').Properties
|
||||
export type Normal = import('./schema.js').Normal
|
||||
import {Schema} from './schema.js'
|
||||
26
node_modules/property-information/lib/util/merge.js
generated
vendored
Normal file
26
node_modules/property-information/lib/util/merge.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* @typedef {import('./schema.js').Properties} Properties
|
||||
* @typedef {import('./schema.js').Normal} Normal
|
||||
*/
|
||||
|
||||
import {Schema} from './schema.js'
|
||||
|
||||
/**
|
||||
* @param {Schema[]} definitions
|
||||
* @param {string} [space]
|
||||
* @returns {Schema}
|
||||
*/
|
||||
export function merge(definitions, space) {
|
||||
/** @type {Properties} */
|
||||
const property = {}
|
||||
/** @type {Normal} */
|
||||
const normal = {}
|
||||
let index = -1
|
||||
|
||||
while (++index < definitions.length) {
|
||||
Object.assign(property, definitions[index].property)
|
||||
Object.assign(normal, definitions[index].normal)
|
||||
}
|
||||
|
||||
return new Schema(property, normal, space)
|
||||
}
|
||||
20
node_modules/property-information/lib/util/schema.d.ts
generated
vendored
Normal file
20
node_modules/property-information/lib/util/schema.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* @typedef {import('./info.js').Info} Info
|
||||
* @typedef {Record<string, Info>} Properties
|
||||
* @typedef {Record<string, string>} Normal
|
||||
*/
|
||||
export class Schema {
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Properties} property
|
||||
* @param {Normal} normal
|
||||
* @param {string} [space]
|
||||
*/
|
||||
constructor(property: Properties, normal: Normal, space?: string | undefined)
|
||||
property: Properties
|
||||
normal: Normal
|
||||
space: string | null
|
||||
}
|
||||
export type Info = import('./info.js').Info
|
||||
export type Properties = Record<string, Info>
|
||||
export type Normal = Record<string, string>
|
||||
28
node_modules/property-information/lib/util/schema.js
generated
vendored
Normal file
28
node_modules/property-information/lib/util/schema.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* @typedef {import('./info.js').Info} Info
|
||||
* @typedef {Record<string, Info>} Properties
|
||||
* @typedef {Record<string, string>} Normal
|
||||
*/
|
||||
|
||||
export class Schema {
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Properties} property
|
||||
* @param {Normal} normal
|
||||
* @param {string} [space]
|
||||
*/
|
||||
constructor(property, normal, space) {
|
||||
this.property = property
|
||||
this.normal = normal
|
||||
if (space) {
|
||||
this.space = space
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** @type {Properties} */
|
||||
Schema.prototype.property = {}
|
||||
/** @type {Normal} */
|
||||
Schema.prototype.normal = {}
|
||||
/** @type {string|null} */
|
||||
Schema.prototype.space = null
|
||||
7
node_modules/property-information/lib/util/types.d.ts
generated
vendored
Normal file
7
node_modules/property-information/lib/util/types.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export const boolean: number
|
||||
export const booleanish: number
|
||||
export const overloadedBoolean: number
|
||||
export const number: number
|
||||
export const spaceSeparated: number
|
||||
export const commaSeparated: number
|
||||
export const commaOrSpaceSeparated: number
|
||||
13
node_modules/property-information/lib/util/types.js
generated
vendored
Normal file
13
node_modules/property-information/lib/util/types.js
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
let powers = 0
|
||||
|
||||
export const boolean = increment()
|
||||
export const booleanish = increment()
|
||||
export const overloadedBoolean = increment()
|
||||
export const number = increment()
|
||||
export const spaceSeparated = increment()
|
||||
export const commaSeparated = increment()
|
||||
export const commaOrSpaceSeparated = increment()
|
||||
|
||||
function increment() {
|
||||
return 2 ** ++powers
|
||||
}
|
||||
1
node_modules/property-information/lib/xlink.d.ts
generated
vendored
Normal file
1
node_modules/property-information/lib/xlink.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const xlink: import('./util/schema.js').Schema
|
||||
17
node_modules/property-information/lib/xlink.js
generated
vendored
Normal file
17
node_modules/property-information/lib/xlink.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import {create} from './util/create.js'
|
||||
|
||||
export const xlink = create({
|
||||
space: 'xlink',
|
||||
transform(_, prop) {
|
||||
return 'xlink:' + prop.slice(5).toLowerCase()
|
||||
},
|
||||
properties: {
|
||||
xLinkActuate: null,
|
||||
xLinkArcRole: null,
|
||||
xLinkHref: null,
|
||||
xLinkRole: null,
|
||||
xLinkShow: null,
|
||||
xLinkTitle: null,
|
||||
xLinkType: null
|
||||
}
|
||||
})
|
||||
1
node_modules/property-information/lib/xml.d.ts
generated
vendored
Normal file
1
node_modules/property-information/lib/xml.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const xml: import('./util/schema.js').Schema
|
||||
9
node_modules/property-information/lib/xml.js
generated
vendored
Normal file
9
node_modules/property-information/lib/xml.js
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import {create} from './util/create.js'
|
||||
|
||||
export const xml = create({
|
||||
space: 'xml',
|
||||
transform(_, prop) {
|
||||
return 'xml:' + prop.slice(3).toLowerCase()
|
||||
},
|
||||
properties: {xmlLang: null, xmlBase: null, xmlSpace: null}
|
||||
})
|
||||
1
node_modules/property-information/lib/xmlns.d.ts
generated
vendored
Normal file
1
node_modules/property-information/lib/xmlns.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const xmlns: import('./util/schema.js').Schema
|
||||
9
node_modules/property-information/lib/xmlns.js
generated
vendored
Normal file
9
node_modules/property-information/lib/xmlns.js
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import {create} from './util/create.js'
|
||||
import {caseInsensitiveTransform} from './util/case-insensitive-transform.js'
|
||||
|
||||
export const xmlns = create({
|
||||
space: 'xmlns',
|
||||
attributes: {xmlnsxlink: 'xmlns:xlink'},
|
||||
transform: caseInsensitiveTransform,
|
||||
properties: {xmlns: null, xmlnsXLink: null}
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue