@histoire/vendors 1.0.0-alpha.4 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/b-floating-vue.js +29 -20
- package/dist/client/b-vue-router.js +2615 -3624
- package/dist/client/b-vue-use.js +87 -77
- package/dist/client/b-vue.js +1 -1
- package/dist/client/node_modules/@babel/helper-validator-identifier/package.json +2 -2
- package/dist/client/node_modules/@babel/parser/package.json +3 -3
- package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +27 -4
- package/dist/client/node_modules/@babel/types/lib/index-legacy.d.ts +1 -1
- package/dist/client/node_modules/@babel/types/lib/index.d.ts +644 -331
- package/dist/client/node_modules/@babel/types/package.json +4 -4
- package/dist/client/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +528 -0
- package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +103 -0
- package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +47 -0
- package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts +50 -0
- package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +9 -0
- package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts +16 -0
- package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +7 -0
- package/dist/client/node_modules/@types/web-bluetooth/index.d.ts +93 -21
- package/dist/client/node_modules/@types/web-bluetooth/package.json +9 -3
- package/dist/client/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +20 -11
- package/dist/client/node_modules/@vue/compiler-core/package.json +6 -6
- package/dist/client/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +12 -12
- package/dist/client/node_modules/@vue/compiler-dom/package.json +3 -3
- package/dist/client/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +3 -2
- package/dist/client/node_modules/@vue/compiler-sfc/package.json +14 -14
- package/dist/client/node_modules/@vue/compiler-ssr/package.json +3 -3
- package/dist/client/node_modules/@vue/reactivity/dist/reactivity.d.ts +24 -25
- package/dist/client/node_modules/@vue/reactivity/package.json +2 -2
- package/dist/client/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +48 -41
- package/dist/client/node_modules/@vue/runtime-core/package.json +3 -3
- package/dist/client/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +680 -645
- package/dist/client/node_modules/@vue/runtime-dom/package.json +5 -5
- package/dist/client/node_modules/@vue/server-renderer/package.json +4 -4
- package/dist/client/node_modules/@vue/shared/dist/shared.d.ts +7 -1
- package/dist/client/node_modules/@vue/shared/package.json +1 -1
- package/dist/client/node_modules/@vueuse/core/index.d.mts +6221 -0
- package/dist/client/node_modules/@vueuse/core/index.d.ts +131 -103
- package/dist/client/node_modules/@vueuse/core/metadata.d.mts +1 -0
- package/dist/client/node_modules/@vueuse/core/package.json +4 -4
- package/dist/client/node_modules/@vueuse/metadata/index.d.mts +78 -0
- package/dist/client/node_modules/@vueuse/metadata/package.json +1 -1
- package/dist/client/node_modules/@vueuse/shared/index.d.mts +1260 -0
- package/dist/client/node_modules/@vueuse/shared/index.d.ts +30 -13
- package/dist/client/node_modules/@vueuse/shared/package.json +1 -1
- package/dist/client/node_modules/csstype/index.d.ts +6405 -5133
- package/dist/client/node_modules/csstype/package.json +38 -34
- package/dist/client/node_modules/entities/decode.d.ts +3 -0
- package/dist/client/node_modules/entities/{lib/esm/decode_codepoint.d.ts → dist/commonjs/decode-codepoint.d.ts} +2 -2
- package/dist/client/node_modules/entities/{lib → dist/commonjs}/decode.d.ts +18 -26
- package/dist/client/node_modules/entities/{lib/esm → dist/commonjs}/encode.d.ts +2 -2
- package/dist/client/node_modules/entities/{lib/esm → dist/commonjs}/escape.d.ts +9 -6
- package/dist/client/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +2 -0
- package/dist/client/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +2 -0
- package/dist/client/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +3 -0
- package/dist/client/node_modules/entities/{lib/esm → dist/commonjs}/index.d.ts +9 -9
- package/dist/client/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts +17 -0
- package/dist/client/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +2 -0
- package/dist/client/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +32 -0
- package/dist/client/node_modules/entities/dist/commonjs/package.json +3 -0
- package/dist/client/node_modules/entities/{lib/decode_codepoint.d.ts → dist/esm/decode-codepoint.d.ts} +2 -2
- package/dist/client/node_modules/entities/{lib → dist}/esm/decode.d.ts +18 -26
- package/dist/client/node_modules/entities/{lib → dist/esm}/encode.d.ts +2 -2
- package/dist/client/node_modules/entities/{lib → dist/esm}/escape.d.ts +9 -6
- package/dist/client/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +2 -0
- package/dist/client/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +2 -0
- package/dist/client/node_modules/entities/dist/esm/generated/encode-html.d.ts +3 -0
- package/dist/client/node_modules/entities/{lib → dist/esm}/index.d.ts +9 -9
- package/dist/client/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +17 -0
- package/dist/client/node_modules/entities/dist/esm/internal/decode-shared.d.ts +2 -0
- package/dist/client/node_modules/entities/dist/esm/internal/encode-shared.d.ts +32 -0
- package/dist/client/node_modules/entities/dist/esm/package.json +3 -0
- package/dist/client/node_modules/entities/escape.d.ts +3 -0
- package/dist/client/node_modules/entities/package.json +92 -69
- package/dist/client/node_modules/magic-string/dist/magic-string.es.d.mts +289 -0
- package/dist/client/node_modules/magic-string/package.json +66 -69
- package/dist/client/node_modules/postcss/lib/postcss.d.mts +69 -0
- package/dist/client/node_modules/vue/compiler-sfc/index.d.mts +1 -0
- package/dist/client/node_modules/vue/dist/vue.d.mts +7 -0
- package/dist/client/node_modules/vue/jsx-runtime/index.d.ts +2 -2
- package/dist/client/node_modules/vue/jsx.d.ts +1 -1
- package/dist/client/node_modules/vue/package.json +6 -6
- package/dist/client/node_modules/vue/server-renderer/index.d.mts +1 -0
- package/dist/client/node_modules/vue-router/dist/experimental/index.d.mts +38 -0
- package/dist/client/node_modules/vue-router/dist/router-CWoNjPRp.d.mts +1973 -0
- package/dist/client/node_modules/vue-router/dist/vue-router.d.mts +361 -0
- package/dist/client/node_modules/vue-router/package.json +43 -39
- package/dist/client/node_modules/vue-router/vue-router-auto-resolver.d.mts +22 -0
- package/dist/client/node_modules/vue-router/vue-router-auto.d.ts +1 -4
- package/dist/client/vue.runtime.esm-bundler.js +2987 -2699
- package/package.json +2 -2
- package/rollup.config.mjs +1 -1
- package/dist/client/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +0 -3
- package/dist/client/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +0 -3
- package/dist/client/node_modules/entities/lib/esm/generated/encode-html.d.ts +0 -8
- package/dist/client/node_modules/entities/lib/esm/package.json +0 -1
- package/dist/client/node_modules/entities/lib/generated/decode-data-html.d.ts +0 -3
- package/dist/client/node_modules/entities/lib/generated/decode-data-xml.d.ts +0 -3
- package/dist/client/node_modules/entities/lib/generated/encode-html.d.ts +0 -8
- package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +0 -1836
- /package/dist/client/node_modules/{pinia/node_modules/vue-demi → vue-demi}/lib/index.d.ts +0 -0
- /package/dist/client/node_modules/{pinia/node_modules/vue-demi → vue-demi}/lib/v2/index.d.ts +0 -0
- /package/dist/client/node_modules/{pinia/node_modules/vue-demi → vue-demi}/lib/v2.7/index.d.ts +0 -0
- /package/dist/client/node_modules/{pinia/node_modules/vue-demi → vue-demi}/lib/v3/index.d.ts +0 -0
- /package/dist/client/node_modules/{pinia/node_modules/vue-demi → vue-demi}/package.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "csstype",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.3",
|
|
4
4
|
"main": "",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"description": "Strict TypeScript and Flow types for style based on MDN data",
|
|
@@ -8,41 +8,45 @@
|
|
|
8
8
|
"author": "Fredrik Nicol <fredrik.nicol@gmail.com>",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@
|
|
12
|
-
"@
|
|
13
|
-
"@
|
|
14
|
-
"@
|
|
15
|
-
"@
|
|
16
|
-
"@
|
|
17
|
-
"@types/
|
|
18
|
-
"@types/
|
|
19
|
-
"@
|
|
20
|
-
"@
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"turndown": "^7.
|
|
38
|
-
"typescript": "~5.
|
|
11
|
+
"@babel/core": "^7.28.5",
|
|
12
|
+
"@babel/preset-env": "^7.28.5",
|
|
13
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
14
|
+
"@eslint/js": "^9.39.1",
|
|
15
|
+
"@mdn/browser-compat-data": "7.1.21",
|
|
16
|
+
"@tsconfig/node24": "^24.0.2",
|
|
17
|
+
"@types/chokidar": "^2.1.7",
|
|
18
|
+
"@types/css-tree": "^2.3.11",
|
|
19
|
+
"@types/jest": "^30.0.0",
|
|
20
|
+
"@types/jsdom": "^27.0.0",
|
|
21
|
+
"@types/node": "^24.10.1",
|
|
22
|
+
"@types/prettier": "^3.0.0",
|
|
23
|
+
"@types/turndown": "^5.0.6",
|
|
24
|
+
"babel-jest": "^30.2.0",
|
|
25
|
+
"chalk": "^5.6.2",
|
|
26
|
+
"chokidar": "^4.0.3",
|
|
27
|
+
"css-tree": "^3.1.0",
|
|
28
|
+
"eslint-config-prettier": "^10.1.8",
|
|
29
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
30
|
+
"flow-bin": "^0.291.0",
|
|
31
|
+
"jest": "^30.2.0",
|
|
32
|
+
"jsdom": "^27.2.0",
|
|
33
|
+
"mdn-data": "2.25.0",
|
|
34
|
+
"prettier": "^3.6.2",
|
|
35
|
+
"release-it": "^19.0.6",
|
|
36
|
+
"tsx": "^4.20.6",
|
|
37
|
+
"turndown": "^7.2.2",
|
|
38
|
+
"typescript": "~5.9.3",
|
|
39
|
+
"typescript-eslint": "^8.46.4"
|
|
40
|
+
},
|
|
41
|
+
"overrides": {
|
|
42
|
+
"js-yaml": ">=4.1.1"
|
|
39
43
|
},
|
|
40
44
|
"scripts": {
|
|
41
|
-
"prepublish": "npm install --prefix __tests__ && npm install --prefix __tests__/__fixtures__",
|
|
42
|
-
"
|
|
43
|
-
"update": "
|
|
44
|
-
"build": "
|
|
45
|
-
"watch": "
|
|
45
|
+
"prepublish": "npm install --no-save --prefix __tests__ && npm install --no-save --prefix __tests__/__fixtures__",
|
|
46
|
+
"release": "release-it",
|
|
47
|
+
"update": "tsx update.ts",
|
|
48
|
+
"build": "tsx --inspect build.ts --start",
|
|
49
|
+
"watch": "tsx build.ts --watch",
|
|
46
50
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
|
|
47
51
|
"pretty": "prettier --write build.ts **/*.{ts,js,json,md}",
|
|
48
52
|
"lazy": "tsc && npm run lint",
|
|
@@ -15,5 +15,5 @@ export declare function replaceCodePoint(codePoint: number): number;
|
|
|
15
15
|
* @param codePoint The code point to decode.
|
|
16
16
|
* @returns The decoded code point.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
19
|
-
//# sourceMappingURL=
|
|
18
|
+
export declare function decodeCodePoint(codePoint: number): string;
|
|
19
|
+
//# sourceMappingURL=decode-codepoint.d.ts.map
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import htmlDecodeTree from "./generated/decode-data-html.js";
|
|
2
|
-
import xmlDecodeTree from "./generated/decode-data-xml.js";
|
|
3
|
-
import decodeCodePoint from "./decode_codepoint.js";
|
|
4
|
-
export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint };
|
|
5
|
-
export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js";
|
|
6
|
-
export declare enum BinTrieFlags {
|
|
7
|
-
VALUE_LENGTH = 49152,
|
|
8
|
-
BRANCH_LENGTH = 16256,
|
|
9
|
-
JUMP_TABLE = 127
|
|
10
|
-
}
|
|
11
1
|
export declare enum DecodingMode {
|
|
12
2
|
/** Entities in text nodes that can end with any character. */
|
|
13
3
|
Legacy = 0,
|
|
@@ -83,28 +73,27 @@ export declare class EntityDecoder {
|
|
|
83
73
|
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
|
|
84
74
|
* entity is incomplete, and resume when the next string is written.
|
|
85
75
|
*
|
|
86
|
-
* @param
|
|
76
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
87
77
|
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
|
|
88
78
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
89
79
|
*/
|
|
90
|
-
write(
|
|
80
|
+
write(input: string, offset: number): number;
|
|
91
81
|
/**
|
|
92
82
|
* Switches between the numeric decimal and hexadecimal states.
|
|
93
83
|
*
|
|
94
84
|
* Equivalent to the `Numeric character reference state` in the HTML spec.
|
|
95
85
|
*
|
|
96
|
-
* @param
|
|
86
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
97
87
|
* @param offset The current offset.
|
|
98
88
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
99
89
|
*/
|
|
100
90
|
private stateNumericStart;
|
|
101
|
-
private addToNumericResult;
|
|
102
91
|
/**
|
|
103
92
|
* Parses a hexadecimal numeric entity.
|
|
104
93
|
*
|
|
105
94
|
* Equivalent to the `Hexademical character reference state` in the HTML spec.
|
|
106
95
|
*
|
|
107
|
-
* @param
|
|
96
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
108
97
|
* @param offset The current offset.
|
|
109
98
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
110
99
|
*/
|
|
@@ -114,7 +103,7 @@ export declare class EntityDecoder {
|
|
|
114
103
|
*
|
|
115
104
|
* Equivalent to the `Decimal character reference state` in the HTML spec.
|
|
116
105
|
*
|
|
117
|
-
* @param
|
|
106
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
118
107
|
* @param offset The current offset.
|
|
119
108
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
120
109
|
*/
|
|
@@ -138,7 +127,7 @@ export declare class EntityDecoder {
|
|
|
138
127
|
*
|
|
139
128
|
* Equivalent to the `Named character reference state` in the HTML spec.
|
|
140
129
|
*
|
|
141
|
-
* @param
|
|
130
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
142
131
|
* @param offset The current offset.
|
|
143
132
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
144
133
|
*/
|
|
@@ -178,34 +167,37 @@ export declare class EntityDecoder {
|
|
|
178
167
|
* @param char The current character.
|
|
179
168
|
* @returns The index of the next node, or -1 if no branch is taken.
|
|
180
169
|
*/
|
|
181
|
-
export declare function determineBranch(decodeTree: Uint16Array, current: number,
|
|
170
|
+
export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIndex: number, char: number): number;
|
|
182
171
|
/**
|
|
183
172
|
* Decodes an HTML string.
|
|
184
173
|
*
|
|
185
|
-
* @param
|
|
174
|
+
* @param htmlString The string to decode.
|
|
186
175
|
* @param mode The decoding mode.
|
|
187
176
|
* @returns The decoded string.
|
|
188
177
|
*/
|
|
189
|
-
export declare function decodeHTML(
|
|
178
|
+
export declare function decodeHTML(htmlString: string, mode?: DecodingMode): string;
|
|
190
179
|
/**
|
|
191
180
|
* Decodes an HTML string in an attribute.
|
|
192
181
|
*
|
|
193
|
-
* @param
|
|
182
|
+
* @param htmlAttribute The string to decode.
|
|
194
183
|
* @returns The decoded string.
|
|
195
184
|
*/
|
|
196
|
-
export declare function decodeHTMLAttribute(
|
|
185
|
+
export declare function decodeHTMLAttribute(htmlAttribute: string): string;
|
|
197
186
|
/**
|
|
198
187
|
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
|
|
199
188
|
*
|
|
200
|
-
* @param
|
|
189
|
+
* @param htmlString The string to decode.
|
|
201
190
|
* @returns The decoded string.
|
|
202
191
|
*/
|
|
203
|
-
export declare function decodeHTMLStrict(
|
|
192
|
+
export declare function decodeHTMLStrict(htmlString: string): string;
|
|
204
193
|
/**
|
|
205
194
|
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
|
|
206
195
|
*
|
|
207
|
-
* @param
|
|
196
|
+
* @param xmlString The string to decode.
|
|
208
197
|
* @returns The decoded string.
|
|
209
198
|
*/
|
|
210
|
-
export declare function decodeXML(
|
|
199
|
+
export declare function decodeXML(xmlString: string): string;
|
|
200
|
+
export { decodeCodePoint, fromCodePoint, replaceCodePoint, } from "./decode-codepoint.js";
|
|
201
|
+
export { htmlDecodeTree } from "./generated/decode-data-html.js";
|
|
202
|
+
export { xmlDecodeTree } from "./generated/decode-data-xml.js";
|
|
211
203
|
//# sourceMappingURL=decode.d.ts.map
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* If a character has no equivalent entity, a numeric hexadecimal reference
|
|
10
10
|
* (eg. `ü`) will be used.
|
|
11
11
|
*/
|
|
12
|
-
export declare function encodeHTML(
|
|
12
|
+
export declare function encodeHTML(input: string): string;
|
|
13
13
|
/**
|
|
14
14
|
* Encodes all non-ASCII characters, as well as characters not valid in HTML
|
|
15
15
|
* documents using HTML entities. This function will not encode characters that
|
|
@@ -18,5 +18,5 @@ export declare function encodeHTML(data: string): string;
|
|
|
18
18
|
* If a character has no equivalent entity, a numeric hexadecimal reference
|
|
19
19
|
* (eg. `ü`) will be used.
|
|
20
20
|
*/
|
|
21
|
-
export declare function encodeNonAsciiHTML(
|
|
21
|
+
export declare function encodeNonAsciiHTML(input: string): string;
|
|
22
22
|
//# sourceMappingURL=encode.d.ts.map
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
1
|
+
export declare const getCodePoint: (c: string, index: number) => number;
|
|
2
|
+
/**
|
|
3
|
+
* Bitset for ASCII characters that need to be escaped in XML.
|
|
4
|
+
*/
|
|
5
|
+
export declare const XML_BITSET_VALUE = 1342177476;
|
|
3
6
|
/**
|
|
4
7
|
* Encodes all non-ASCII characters, as well as characters not valid in XML
|
|
5
|
-
* documents using XML entities.
|
|
8
|
+
* documents using XML entities. Uses a fast bitset scan instead of RegExp.
|
|
6
9
|
*
|
|
7
|
-
* If a character has no equivalent entity, a
|
|
8
|
-
*
|
|
10
|
+
* If a character has no equivalent entity, a numeric hexadecimal reference
|
|
11
|
+
* (eg. `ü`) will be used.
|
|
9
12
|
*/
|
|
10
|
-
export declare function encodeXML(
|
|
13
|
+
export declare function encodeXML(input: string): string;
|
|
11
14
|
/**
|
|
12
15
|
* Encodes all non-ASCII characters, as well as characters not valid in XML
|
|
13
16
|
* documents using numeric hexadecimal reference (eg. `ü`).
|
|
@@ -56,18 +56,18 @@ export interface DecodingOptions {
|
|
|
56
56
|
/**
|
|
57
57
|
* Decodes a string with entities.
|
|
58
58
|
*
|
|
59
|
-
* @param
|
|
59
|
+
* @param input String to decode.
|
|
60
60
|
* @param options Decoding options.
|
|
61
61
|
*/
|
|
62
|
-
export declare function decode(
|
|
62
|
+
export declare function decode(input: string, options?: DecodingOptions | EntityLevel): string;
|
|
63
63
|
/**
|
|
64
64
|
* Decodes a string with entities. Does not allow missing trailing semicolons for entities.
|
|
65
65
|
*
|
|
66
|
-
* @param
|
|
66
|
+
* @param input String to decode.
|
|
67
67
|
* @param options Decoding options.
|
|
68
68
|
* @deprecated Use `decode` with the `mode` set to `Strict`.
|
|
69
69
|
*/
|
|
70
|
-
export declare function decodeStrict(
|
|
70
|
+
export declare function decodeStrict(input: string, options?: DecodingOptions | EntityLevel): string;
|
|
71
71
|
/**
|
|
72
72
|
* Options for `encode`.
|
|
73
73
|
*/
|
|
@@ -86,11 +86,11 @@ export interface EncodingOptions {
|
|
|
86
86
|
/**
|
|
87
87
|
* Encodes a string with entities.
|
|
88
88
|
*
|
|
89
|
-
* @param
|
|
89
|
+
* @param input String to encode.
|
|
90
90
|
* @param options Encoding options.
|
|
91
91
|
*/
|
|
92
|
-
export declare function encode(
|
|
93
|
-
export {
|
|
94
|
-
export { encodeHTML,
|
|
95
|
-
export {
|
|
92
|
+
export declare function encode(input: string, options?: EncodingOptions | EntityLevel): string;
|
|
93
|
+
export { DecodingMode, decodeHTML, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLAttribute, decodeHTMLStrict, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML, decodeXML as decodeXMLStrict, EntityDecoder, } from "./decode.js";
|
|
94
|
+
export { encodeHTML, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, encodeNonAsciiHTML, } from "./encode.js";
|
|
95
|
+
export { encodeXML, escape, escapeAttribute, escapeText, escapeUTF8, } from "./escape.js";
|
|
96
96
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bit flags & masks for the binary trie encoding used for entity decoding.
|
|
3
|
+
*
|
|
4
|
+
* Bit layout (16 bits total):
|
|
5
|
+
* 15..14 VALUE_LENGTH (+1 encoding; 0 => no value)
|
|
6
|
+
* 13 FLAG13. If valueLength>0: semicolon required flag (implicit ';').
|
|
7
|
+
* If valueLength==0: compact run flag.
|
|
8
|
+
* 12..7 BRANCH_LENGTH Branch length (0 => single branch in 6..0 if jumpOffset==char) OR run length (when compact run)
|
|
9
|
+
* 6..0 JUMP_TABLE Jump offset (jump table) OR single-branch char code OR first run char
|
|
10
|
+
*/
|
|
11
|
+
export declare enum BinTrieFlags {
|
|
12
|
+
VALUE_LENGTH = 49152,
|
|
13
|
+
FLAG13 = 8192,
|
|
14
|
+
BRANCH_LENGTH = 8064,
|
|
15
|
+
JUMP_TABLE = 127
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=bin-trie-flags.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A node inside the encoding trie used by `encode.ts`.
|
|
3
|
+
*
|
|
4
|
+
* There are two physical shapes to minimize allocations and lookup cost:
|
|
5
|
+
*
|
|
6
|
+
* 1. Leaf node (string)
|
|
7
|
+
* - A plain string (already in the form `"&name;"`).
|
|
8
|
+
* - Represents a terminal match with no children.
|
|
9
|
+
*
|
|
10
|
+
* 2. Branch / value node (object)
|
|
11
|
+
*/
|
|
12
|
+
export type EncodeTrieNode = string | {
|
|
13
|
+
/**
|
|
14
|
+
* Entity value for the current code point sequence (wrapped: `&...;`).
|
|
15
|
+
* Present when the path to this node itself is a valid named entity.
|
|
16
|
+
*/
|
|
17
|
+
value: string | undefined;
|
|
18
|
+
/** If a number, the next code unit of the only next character. */
|
|
19
|
+
next: number | Map<number, EncodeTrieNode>;
|
|
20
|
+
/** If next is a number, `nextValue` contains the entity value. */
|
|
21
|
+
nextValue?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Parse a compact encode trie string into a Map structure used for encoding.
|
|
25
|
+
*
|
|
26
|
+
* Format per entry (ascending code points using delta encoding):
|
|
27
|
+
* <diffBase36>[&name;][{<children>}] -- diff omitted when 0
|
|
28
|
+
* Where diff = currentKey - previousKey - 1 (first entry stores absolute key).
|
|
29
|
+
* `&name;` is the entity value (already wrapped); a following `{` denotes children.
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseEncodeTrie(serialized: string): Map<number, EncodeTrieNode>;
|
|
32
|
+
//# sourceMappingURL=encode-shared.d.ts.map
|
|
@@ -15,5 +15,5 @@ export declare function replaceCodePoint(codePoint: number): number;
|
|
|
15
15
|
* @param codePoint The code point to decode.
|
|
16
16
|
* @returns The decoded code point.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
19
|
-
//# sourceMappingURL=
|
|
18
|
+
export declare function decodeCodePoint(codePoint: number): string;
|
|
19
|
+
//# sourceMappingURL=decode-codepoint.d.ts.map
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import htmlDecodeTree from "./generated/decode-data-html.js";
|
|
2
|
-
import xmlDecodeTree from "./generated/decode-data-xml.js";
|
|
3
|
-
import decodeCodePoint from "./decode_codepoint.js";
|
|
4
|
-
export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint };
|
|
5
|
-
export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js";
|
|
6
|
-
export declare enum BinTrieFlags {
|
|
7
|
-
VALUE_LENGTH = 49152,
|
|
8
|
-
BRANCH_LENGTH = 16256,
|
|
9
|
-
JUMP_TABLE = 127
|
|
10
|
-
}
|
|
11
1
|
export declare enum DecodingMode {
|
|
12
2
|
/** Entities in text nodes that can end with any character. */
|
|
13
3
|
Legacy = 0,
|
|
@@ -83,28 +73,27 @@ export declare class EntityDecoder {
|
|
|
83
73
|
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
|
|
84
74
|
* entity is incomplete, and resume when the next string is written.
|
|
85
75
|
*
|
|
86
|
-
* @param
|
|
76
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
87
77
|
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
|
|
88
78
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
89
79
|
*/
|
|
90
|
-
write(
|
|
80
|
+
write(input: string, offset: number): number;
|
|
91
81
|
/**
|
|
92
82
|
* Switches between the numeric decimal and hexadecimal states.
|
|
93
83
|
*
|
|
94
84
|
* Equivalent to the `Numeric character reference state` in the HTML spec.
|
|
95
85
|
*
|
|
96
|
-
* @param
|
|
86
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
97
87
|
* @param offset The current offset.
|
|
98
88
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
99
89
|
*/
|
|
100
90
|
private stateNumericStart;
|
|
101
|
-
private addToNumericResult;
|
|
102
91
|
/**
|
|
103
92
|
* Parses a hexadecimal numeric entity.
|
|
104
93
|
*
|
|
105
94
|
* Equivalent to the `Hexademical character reference state` in the HTML spec.
|
|
106
95
|
*
|
|
107
|
-
* @param
|
|
96
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
108
97
|
* @param offset The current offset.
|
|
109
98
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
110
99
|
*/
|
|
@@ -114,7 +103,7 @@ export declare class EntityDecoder {
|
|
|
114
103
|
*
|
|
115
104
|
* Equivalent to the `Decimal character reference state` in the HTML spec.
|
|
116
105
|
*
|
|
117
|
-
* @param
|
|
106
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
118
107
|
* @param offset The current offset.
|
|
119
108
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
120
109
|
*/
|
|
@@ -138,7 +127,7 @@ export declare class EntityDecoder {
|
|
|
138
127
|
*
|
|
139
128
|
* Equivalent to the `Named character reference state` in the HTML spec.
|
|
140
129
|
*
|
|
141
|
-
* @param
|
|
130
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
142
131
|
* @param offset The current offset.
|
|
143
132
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
144
133
|
*/
|
|
@@ -178,34 +167,37 @@ export declare class EntityDecoder {
|
|
|
178
167
|
* @param char The current character.
|
|
179
168
|
* @returns The index of the next node, or -1 if no branch is taken.
|
|
180
169
|
*/
|
|
181
|
-
export declare function determineBranch(decodeTree: Uint16Array, current: number,
|
|
170
|
+
export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIndex: number, char: number): number;
|
|
182
171
|
/**
|
|
183
172
|
* Decodes an HTML string.
|
|
184
173
|
*
|
|
185
|
-
* @param
|
|
174
|
+
* @param htmlString The string to decode.
|
|
186
175
|
* @param mode The decoding mode.
|
|
187
176
|
* @returns The decoded string.
|
|
188
177
|
*/
|
|
189
|
-
export declare function decodeHTML(
|
|
178
|
+
export declare function decodeHTML(htmlString: string, mode?: DecodingMode): string;
|
|
190
179
|
/**
|
|
191
180
|
* Decodes an HTML string in an attribute.
|
|
192
181
|
*
|
|
193
|
-
* @param
|
|
182
|
+
* @param htmlAttribute The string to decode.
|
|
194
183
|
* @returns The decoded string.
|
|
195
184
|
*/
|
|
196
|
-
export declare function decodeHTMLAttribute(
|
|
185
|
+
export declare function decodeHTMLAttribute(htmlAttribute: string): string;
|
|
197
186
|
/**
|
|
198
187
|
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
|
|
199
188
|
*
|
|
200
|
-
* @param
|
|
189
|
+
* @param htmlString The string to decode.
|
|
201
190
|
* @returns The decoded string.
|
|
202
191
|
*/
|
|
203
|
-
export declare function decodeHTMLStrict(
|
|
192
|
+
export declare function decodeHTMLStrict(htmlString: string): string;
|
|
204
193
|
/**
|
|
205
194
|
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
|
|
206
195
|
*
|
|
207
|
-
* @param
|
|
196
|
+
* @param xmlString The string to decode.
|
|
208
197
|
* @returns The decoded string.
|
|
209
198
|
*/
|
|
210
|
-
export declare function decodeXML(
|
|
199
|
+
export declare function decodeXML(xmlString: string): string;
|
|
200
|
+
export { decodeCodePoint, fromCodePoint, replaceCodePoint, } from "./decode-codepoint.js";
|
|
201
|
+
export { htmlDecodeTree } from "./generated/decode-data-html.js";
|
|
202
|
+
export { xmlDecodeTree } from "./generated/decode-data-xml.js";
|
|
211
203
|
//# sourceMappingURL=decode.d.ts.map
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* If a character has no equivalent entity, a numeric hexadecimal reference
|
|
10
10
|
* (eg. `ü`) will be used.
|
|
11
11
|
*/
|
|
12
|
-
export declare function encodeHTML(
|
|
12
|
+
export declare function encodeHTML(input: string): string;
|
|
13
13
|
/**
|
|
14
14
|
* Encodes all non-ASCII characters, as well as characters not valid in HTML
|
|
15
15
|
* documents using HTML entities. This function will not encode characters that
|
|
@@ -18,5 +18,5 @@ export declare function encodeHTML(data: string): string;
|
|
|
18
18
|
* If a character has no equivalent entity, a numeric hexadecimal reference
|
|
19
19
|
* (eg. `ü`) will be used.
|
|
20
20
|
*/
|
|
21
|
-
export declare function encodeNonAsciiHTML(
|
|
21
|
+
export declare function encodeNonAsciiHTML(input: string): string;
|
|
22
22
|
//# sourceMappingURL=encode.d.ts.map
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
1
|
+
export declare const getCodePoint: (c: string, index: number) => number;
|
|
2
|
+
/**
|
|
3
|
+
* Bitset for ASCII characters that need to be escaped in XML.
|
|
4
|
+
*/
|
|
5
|
+
export declare const XML_BITSET_VALUE = 1342177476;
|
|
3
6
|
/**
|
|
4
7
|
* Encodes all non-ASCII characters, as well as characters not valid in XML
|
|
5
|
-
* documents using XML entities.
|
|
8
|
+
* documents using XML entities. Uses a fast bitset scan instead of RegExp.
|
|
6
9
|
*
|
|
7
|
-
* If a character has no equivalent entity, a
|
|
8
|
-
*
|
|
10
|
+
* If a character has no equivalent entity, a numeric hexadecimal reference
|
|
11
|
+
* (eg. `ü`) will be used.
|
|
9
12
|
*/
|
|
10
|
-
export declare function encodeXML(
|
|
13
|
+
export declare function encodeXML(input: string): string;
|
|
11
14
|
/**
|
|
12
15
|
* Encodes all non-ASCII characters, as well as characters not valid in XML
|
|
13
16
|
* documents using numeric hexadecimal reference (eg. `ü`).
|
|
@@ -56,18 +56,18 @@ export interface DecodingOptions {
|
|
|
56
56
|
/**
|
|
57
57
|
* Decodes a string with entities.
|
|
58
58
|
*
|
|
59
|
-
* @param
|
|
59
|
+
* @param input String to decode.
|
|
60
60
|
* @param options Decoding options.
|
|
61
61
|
*/
|
|
62
|
-
export declare function decode(
|
|
62
|
+
export declare function decode(input: string, options?: DecodingOptions | EntityLevel): string;
|
|
63
63
|
/**
|
|
64
64
|
* Decodes a string with entities. Does not allow missing trailing semicolons for entities.
|
|
65
65
|
*
|
|
66
|
-
* @param
|
|
66
|
+
* @param input String to decode.
|
|
67
67
|
* @param options Decoding options.
|
|
68
68
|
* @deprecated Use `decode` with the `mode` set to `Strict`.
|
|
69
69
|
*/
|
|
70
|
-
export declare function decodeStrict(
|
|
70
|
+
export declare function decodeStrict(input: string, options?: DecodingOptions | EntityLevel): string;
|
|
71
71
|
/**
|
|
72
72
|
* Options for `encode`.
|
|
73
73
|
*/
|
|
@@ -86,11 +86,11 @@ export interface EncodingOptions {
|
|
|
86
86
|
/**
|
|
87
87
|
* Encodes a string with entities.
|
|
88
88
|
*
|
|
89
|
-
* @param
|
|
89
|
+
* @param input String to encode.
|
|
90
90
|
* @param options Encoding options.
|
|
91
91
|
*/
|
|
92
|
-
export declare function encode(
|
|
93
|
-
export {
|
|
94
|
-
export { encodeHTML,
|
|
95
|
-
export {
|
|
92
|
+
export declare function encode(input: string, options?: EncodingOptions | EntityLevel): string;
|
|
93
|
+
export { DecodingMode, decodeHTML, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLAttribute, decodeHTMLStrict, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML, decodeXML as decodeXMLStrict, EntityDecoder, } from "./decode.js";
|
|
94
|
+
export { encodeHTML, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, encodeNonAsciiHTML, } from "./encode.js";
|
|
95
|
+
export { encodeXML, escape, escapeAttribute, escapeText, escapeUTF8, } from "./escape.js";
|
|
96
96
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bit flags & masks for the binary trie encoding used for entity decoding.
|
|
3
|
+
*
|
|
4
|
+
* Bit layout (16 bits total):
|
|
5
|
+
* 15..14 VALUE_LENGTH (+1 encoding; 0 => no value)
|
|
6
|
+
* 13 FLAG13. If valueLength>0: semicolon required flag (implicit ';').
|
|
7
|
+
* If valueLength==0: compact run flag.
|
|
8
|
+
* 12..7 BRANCH_LENGTH Branch length (0 => single branch in 6..0 if jumpOffset==char) OR run length (when compact run)
|
|
9
|
+
* 6..0 JUMP_TABLE Jump offset (jump table) OR single-branch char code OR first run char
|
|
10
|
+
*/
|
|
11
|
+
export declare enum BinTrieFlags {
|
|
12
|
+
VALUE_LENGTH = 49152,
|
|
13
|
+
FLAG13 = 8192,
|
|
14
|
+
BRANCH_LENGTH = 8064,
|
|
15
|
+
JUMP_TABLE = 127
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=bin-trie-flags.d.ts.map
|