完成世界书、骰子、apiconfig页面处理
This commit is contained in:
10
frontend/node_modules/property-information/lib/util/case-insensitive-transform.d.ts
generated
vendored
Normal file
10
frontend/node_modules/property-information/lib/util/case-insensitive-transform.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @param {Record<string, string>} attributes
|
||||
* Attributes.
|
||||
* @param {string} property
|
||||
* Property.
|
||||
* @returns {string}
|
||||
* Transformed property.
|
||||
*/
|
||||
export function caseInsensitiveTransform(attributes: Record<string, string>, property: string): string;
|
||||
//# sourceMappingURL=case-insensitive-transform.d.ts.map
|
||||
10
frontend/node_modules/property-information/lib/util/case-sensitive-transform.d.ts
generated
vendored
Normal file
10
frontend/node_modules/property-information/lib/util/case-sensitive-transform.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @param {Record<string, string>} attributes
|
||||
* Attributes.
|
||||
* @param {string} attribute
|
||||
* Attribute.
|
||||
* @returns {string}
|
||||
* Transformed attribute.
|
||||
*/
|
||||
export function caseSensitiveTransform(attributes: Record<string, string>, attribute: string): string;
|
||||
//# sourceMappingURL=case-sensitive-transform.d.ts.map
|
||||
11
frontend/node_modules/property-information/lib/util/case-sensitive-transform.js
generated
vendored
Normal file
11
frontend/node_modules/property-information/lib/util/case-sensitive-transform.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @param {Record<string, string>} attributes
|
||||
* Attributes.
|
||||
* @param {string} attribute
|
||||
* Attribute.
|
||||
* @returns {string}
|
||||
* Transformed attribute.
|
||||
*/
|
||||
export function caseSensitiveTransform(attributes, attribute) {
|
||||
return attribute in attributes ? attributes[attribute] : attribute
|
||||
}
|
||||
60
frontend/node_modules/property-information/lib/util/defined-info.js
generated
vendored
Normal file
60
frontend/node_modules/property-information/lib/util/defined-info.js
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* @import {Space} from 'property-information'
|
||||
*/
|
||||
|
||||
import {Info} from './info.js'
|
||||
import * as types from './types.js'
|
||||
|
||||
const checks = /** @type {ReadonlyArray<keyof typeof types>} */ (
|
||||
Object.keys(types)
|
||||
)
|
||||
|
||||
export class DefinedInfo extends Info {
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} property
|
||||
* Property.
|
||||
* @param {string} attribute
|
||||
* Attribute.
|
||||
* @param {number | null | undefined} [mask]
|
||||
* Mask.
|
||||
* @param {Space | undefined} [space]
|
||||
* Space.
|
||||
* @returns
|
||||
* Info.
|
||||
*/
|
||||
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
|
||||
|
||||
/**
|
||||
* @template {keyof DefinedInfo} Key
|
||||
* Key type.
|
||||
* @param {DefinedInfo} values
|
||||
* Info.
|
||||
* @param {Key} key
|
||||
* Key.
|
||||
* @param {DefinedInfo[Key]} value
|
||||
* Value.
|
||||
* @returns {undefined}
|
||||
* Nothing.
|
||||
*/
|
||||
function mark(values, key, value) {
|
||||
if (value) {
|
||||
values[key] = value
|
||||
}
|
||||
}
|
||||
32
frontend/node_modules/property-information/lib/util/info.js
generated
vendored
Normal file
32
frontend/node_modules/property-information/lib/util/info.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @import {Info as InfoType} from 'property-information'
|
||||
*/
|
||||
|
||||
/** @type {InfoType} */
|
||||
export class Info {
|
||||
/**
|
||||
* @param {string} property
|
||||
* Property.
|
||||
* @param {string} attribute
|
||||
* Attribute.
|
||||
* @returns
|
||||
* Info.
|
||||
*/
|
||||
constructor(property, attribute) {
|
||||
this.attribute = attribute
|
||||
this.property = property
|
||||
}
|
||||
}
|
||||
|
||||
Info.prototype.attribute = ''
|
||||
Info.prototype.booleanish = false
|
||||
Info.prototype.boolean = false
|
||||
Info.prototype.commaOrSpaceSeparated = false
|
||||
Info.prototype.commaSeparated = false
|
||||
Info.prototype.defined = false
|
||||
Info.prototype.mustUseProperty = false
|
||||
Info.prototype.number = false
|
||||
Info.prototype.overloadedBoolean = false
|
||||
Info.prototype.property = ''
|
||||
Info.prototype.spaceSeparated = false
|
||||
Info.prototype.space = undefined
|
||||
1
frontend/node_modules/property-information/lib/util/types.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/property-information/lib/util/types.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":"AAEA,6BAAkC;AAClC,gCAAqC;AACrC,uCAA4C;AAC5C,4BAAiC;AACjC,oCAAyC;AACzC,oCAAyC;AACzC,2CAAgD"}
|
||||
Reference in New Issue
Block a user