@histoire/vendors 1.0.0-alpha.5 → 1.0.0-beta.2
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/build/floating-ui-frames.mjs +28 -0
- package/dist/client/b-floating-vue.js +35 -22
- 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-string-parser/package.json +1 -1
- package/dist/client/node_modules/@babel/helper-validator-identifier/package.json +1 -1
- package/dist/client/node_modules/@babel/parser/package.json +7 -7
- package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +24 -26
- package/dist/client/node_modules/@babel/types/lib/index-legacy.d.ts +183 -183
- package/dist/client/node_modules/@babel/types/lib/index.d.ts +203 -208
- package/dist/client/node_modules/@babel/types/package.json +6 -6
- package/dist/client/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +535 -0
- package/dist/client/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +75 -68
- package/dist/client/node_modules/@floating-ui/core/package.json +3 -3
- package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +105 -0
- package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +5 -3
- package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +47 -0
- package/dist/client/node_modules/@floating-ui/utils/package.json +2 -2
- package/dist/client/node_modules/@jridgewell/sourcemap-codec/package.json +2 -1
- package/dist/client/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts +5 -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 +11 -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 +9 -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 +2326 -782
- package/dist/client/node_modules/csstype/package.json +26 -26
- 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 +20 -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 +20 -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 +99 -69
- package/dist/client/node_modules/magic-string/dist/magic-string.es.d.mts +289 -0
- package/dist/client/node_modules/nanoid/package.json +3 -3
- package/dist/client/node_modules/postcss/lib/at-rule.d.ts +0 -1
- package/dist/client/node_modules/postcss/lib/comment.d.ts +0 -1
- package/dist/client/node_modules/postcss/lib/container.d.ts +17 -26
- package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +0 -1
- package/dist/client/node_modules/postcss/lib/declaration.d.ts +4 -5
- package/dist/client/node_modules/postcss/lib/document.d.ts +0 -1
- package/dist/client/node_modules/postcss/lib/fromJSON.d.ts +1 -1
- package/dist/client/node_modules/postcss/lib/input.d.ts +0 -1
- package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +3 -4
- package/dist/client/node_modules/postcss/lib/list.d.ts +1 -1
- package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +0 -1
- package/dist/client/node_modules/postcss/lib/node.d.ts +2 -3
- package/dist/client/node_modules/postcss/lib/parse.d.ts +1 -1
- package/dist/client/node_modules/postcss/lib/postcss.d.mts +66 -0
- package/dist/client/node_modules/postcss/lib/postcss.d.ts +10 -4
- package/dist/client/node_modules/postcss/lib/previous-map.d.ts +0 -1
- package/dist/client/node_modules/postcss/lib/processor.d.ts +0 -1
- package/dist/client/node_modules/postcss/lib/result.d.ts +0 -1
- package/dist/client/node_modules/postcss/lib/root.d.ts +0 -1
- package/dist/client/node_modules/postcss/lib/rule.d.ts +12 -12
- package/dist/client/node_modules/postcss/lib/stringifier.d.ts +0 -1
- package/dist/client/node_modules/postcss/lib/stringify.d.ts +1 -1
- package/dist/client/node_modules/postcss/lib/warning.d.ts +0 -1
- package/dist/client/node_modules/postcss/package.json +45 -45
- package/dist/client/node_modules/source-map-js/package.json +14 -7
- package/dist/client/node_modules/source-map-js/source-map.d.ts +177 -63
- 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 +4 -3
- package/rollup.config.mjs +12 -2
- package/tsconfig.json +3 -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.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"main": "",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"description": "Strict TypeScript and Flow types for style based on MDN data",
|
|
@@ -8,35 +8,35 @@
|
|
|
8
8
|
"author": "Fredrik Nicol <fredrik.nicol@gmail.com>",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@babel/core": "^
|
|
12
|
-
"@babel/preset-env": "^
|
|
13
|
-
"@babel/preset-typescript": "^
|
|
14
|
-
"@eslint/js": "^
|
|
15
|
-
"@mdn/browser-compat-data": "
|
|
16
|
-
"@tsconfig/node24": "^24.0.
|
|
17
|
-
"@types/
|
|
18
|
-
"@types/css-tree": "^2.3.11",
|
|
11
|
+
"@babel/core": "^8.1.2",
|
|
12
|
+
"@babel/preset-env": "^8.0.7",
|
|
13
|
+
"@babel/preset-typescript": "^8.0.7",
|
|
14
|
+
"@eslint/js": "^10.0.1",
|
|
15
|
+
"@mdn/browser-compat-data": "8.1.9",
|
|
16
|
+
"@tsconfig/node24": "^24.0.6",
|
|
17
|
+
"@types/css-tree": "^3.2.0",
|
|
19
18
|
"@types/jest": "^30.0.0",
|
|
20
|
-
"@types/jsdom": "^
|
|
21
|
-
"@types/node": "^24.
|
|
19
|
+
"@types/jsdom": "^30.0.0",
|
|
20
|
+
"@types/node": "^24.19.2",
|
|
22
21
|
"@types/prettier": "^3.0.0",
|
|
23
22
|
"@types/turndown": "^5.0.6",
|
|
24
|
-
"babel-jest": "^30.2
|
|
25
|
-
"chalk": "^
|
|
26
|
-
"chokidar": "^
|
|
27
|
-
"css-tree": "^3.1
|
|
23
|
+
"babel-jest": "^30.5.2",
|
|
24
|
+
"chalk": "^6.0.1",
|
|
25
|
+
"chokidar": "^6.0.0",
|
|
26
|
+
"css-tree": "^3.2.1",
|
|
27
|
+
"eslint": "^10.15.0",
|
|
28
28
|
"eslint-config-prettier": "^10.1.8",
|
|
29
|
-
"eslint-plugin-prettier": "^5.5.
|
|
30
|
-
"flow-bin": "^0.
|
|
31
|
-
"jest": "^30.2
|
|
32
|
-
"jsdom": "^
|
|
33
|
-
"mdn-data": "2.
|
|
34
|
-
"prettier": "^3.
|
|
35
|
-
"release-it": "^
|
|
36
|
-
"tsx": "^4.
|
|
37
|
-
"turndown": "^7.2.
|
|
38
|
-
"typescript": "~
|
|
39
|
-
"typescript-eslint": "^8.
|
|
29
|
+
"eslint-plugin-prettier": "^5.5.7",
|
|
30
|
+
"flow-bin": "^0.327.0",
|
|
31
|
+
"jest": "^30.5.2",
|
|
32
|
+
"jsdom": "^31.0.1",
|
|
33
|
+
"mdn-data": "2.37.2",
|
|
34
|
+
"prettier": "^3.10.1",
|
|
35
|
+
"release-it": "^21.1.2",
|
|
36
|
+
"tsx": "^4.23.15",
|
|
37
|
+
"turndown": "^7.2.5",
|
|
38
|
+
"typescript": "~6.0.3",
|
|
39
|
+
"typescript-eslint": "^8.72.2"
|
|
40
40
|
},
|
|
41
41
|
"overrides": {
|
|
42
42
|
"js-yaml": ">=4.1.1"
|
|
@@ -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,
|
|
@@ -74,6 +64,8 @@ export declare class EntityDecoder {
|
|
|
74
64
|
private excess;
|
|
75
65
|
/** The mode in which the decoder is operating. */
|
|
76
66
|
private decodeMode;
|
|
67
|
+
/** The number of characters that have been consumed in the current run. */
|
|
68
|
+
private runConsumed;
|
|
77
69
|
/** Resets the instance to make it reusable. */
|
|
78
70
|
startEntity(decodeMode: DecodingMode): void;
|
|
79
71
|
/**
|
|
@@ -83,28 +75,27 @@ export declare class EntityDecoder {
|
|
|
83
75
|
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
|
|
84
76
|
* entity is incomplete, and resume when the next string is written.
|
|
85
77
|
*
|
|
86
|
-
* @param
|
|
78
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
87
79
|
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
|
|
88
80
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
89
81
|
*/
|
|
90
|
-
write(
|
|
82
|
+
write(input: string, offset: number): number;
|
|
91
83
|
/**
|
|
92
84
|
* Switches between the numeric decimal and hexadecimal states.
|
|
93
85
|
*
|
|
94
86
|
* Equivalent to the `Numeric character reference state` in the HTML spec.
|
|
95
87
|
*
|
|
96
|
-
* @param
|
|
88
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
97
89
|
* @param offset The current offset.
|
|
98
90
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
99
91
|
*/
|
|
100
92
|
private stateNumericStart;
|
|
101
|
-
private addToNumericResult;
|
|
102
93
|
/**
|
|
103
94
|
* Parses a hexadecimal numeric entity.
|
|
104
95
|
*
|
|
105
96
|
* Equivalent to the `Hexademical character reference state` in the HTML spec.
|
|
106
97
|
*
|
|
107
|
-
* @param
|
|
98
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
108
99
|
* @param offset The current offset.
|
|
109
100
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
110
101
|
*/
|
|
@@ -114,7 +105,7 @@ export declare class EntityDecoder {
|
|
|
114
105
|
*
|
|
115
106
|
* Equivalent to the `Decimal character reference state` in the HTML spec.
|
|
116
107
|
*
|
|
117
|
-
* @param
|
|
108
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
118
109
|
* @param offset The current offset.
|
|
119
110
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
120
111
|
*/
|
|
@@ -138,7 +129,7 @@ export declare class EntityDecoder {
|
|
|
138
129
|
*
|
|
139
130
|
* Equivalent to the `Named character reference state` in the HTML spec.
|
|
140
131
|
*
|
|
141
|
-
* @param
|
|
132
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
142
133
|
* @param offset The current offset.
|
|
143
134
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
144
135
|
*/
|
|
@@ -178,34 +169,37 @@ export declare class EntityDecoder {
|
|
|
178
169
|
* @param char The current character.
|
|
179
170
|
* @returns The index of the next node, or -1 if no branch is taken.
|
|
180
171
|
*/
|
|
181
|
-
export declare function determineBranch(decodeTree: Uint16Array, current: number,
|
|
172
|
+
export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIndex: number, char: number): number;
|
|
182
173
|
/**
|
|
183
174
|
* Decodes an HTML string.
|
|
184
175
|
*
|
|
185
|
-
* @param
|
|
176
|
+
* @param htmlString The string to decode.
|
|
186
177
|
* @param mode The decoding mode.
|
|
187
178
|
* @returns The decoded string.
|
|
188
179
|
*/
|
|
189
|
-
export declare function decodeHTML(
|
|
180
|
+
export declare function decodeHTML(htmlString: string, mode?: DecodingMode): string;
|
|
190
181
|
/**
|
|
191
182
|
* Decodes an HTML string in an attribute.
|
|
192
183
|
*
|
|
193
|
-
* @param
|
|
184
|
+
* @param htmlAttribute The string to decode.
|
|
194
185
|
* @returns The decoded string.
|
|
195
186
|
*/
|
|
196
|
-
export declare function decodeHTMLAttribute(
|
|
187
|
+
export declare function decodeHTMLAttribute(htmlAttribute: string): string;
|
|
197
188
|
/**
|
|
198
189
|
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
|
|
199
190
|
*
|
|
200
|
-
* @param
|
|
191
|
+
* @param htmlString The string to decode.
|
|
201
192
|
* @returns The decoded string.
|
|
202
193
|
*/
|
|
203
|
-
export declare function decodeHTMLStrict(
|
|
194
|
+
export declare function decodeHTMLStrict(htmlString: string): string;
|
|
204
195
|
/**
|
|
205
196
|
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
|
|
206
197
|
*
|
|
207
|
-
* @param
|
|
198
|
+
* @param xmlString The string to decode.
|
|
208
199
|
* @returns The decoded string.
|
|
209
200
|
*/
|
|
210
|
-
export declare function decodeXML(
|
|
201
|
+
export declare function decodeXML(xmlString: string): string;
|
|
202
|
+
export { decodeCodePoint, fromCodePoint, replaceCodePoint, } from "./decode-codepoint.js";
|
|
203
|
+
export { htmlDecodeTree } from "./generated/decode-data-html.js";
|
|
204
|
+
export { xmlDecodeTree } from "./generated/decode-data-xml.js";
|
|
211
205
|
//# 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,
|
|
@@ -74,6 +64,8 @@ export declare class EntityDecoder {
|
|
|
74
64
|
private excess;
|
|
75
65
|
/** The mode in which the decoder is operating. */
|
|
76
66
|
private decodeMode;
|
|
67
|
+
/** The number of characters that have been consumed in the current run. */
|
|
68
|
+
private runConsumed;
|
|
77
69
|
/** Resets the instance to make it reusable. */
|
|
78
70
|
startEntity(decodeMode: DecodingMode): void;
|
|
79
71
|
/**
|
|
@@ -83,28 +75,27 @@ export declare class EntityDecoder {
|
|
|
83
75
|
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
|
|
84
76
|
* entity is incomplete, and resume when the next string is written.
|
|
85
77
|
*
|
|
86
|
-
* @param
|
|
78
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
87
79
|
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
|
|
88
80
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
89
81
|
*/
|
|
90
|
-
write(
|
|
82
|
+
write(input: string, offset: number): number;
|
|
91
83
|
/**
|
|
92
84
|
* Switches between the numeric decimal and hexadecimal states.
|
|
93
85
|
*
|
|
94
86
|
* Equivalent to the `Numeric character reference state` in the HTML spec.
|
|
95
87
|
*
|
|
96
|
-
* @param
|
|
88
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
97
89
|
* @param offset The current offset.
|
|
98
90
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
99
91
|
*/
|
|
100
92
|
private stateNumericStart;
|
|
101
|
-
private addToNumericResult;
|
|
102
93
|
/**
|
|
103
94
|
* Parses a hexadecimal numeric entity.
|
|
104
95
|
*
|
|
105
96
|
* Equivalent to the `Hexademical character reference state` in the HTML spec.
|
|
106
97
|
*
|
|
107
|
-
* @param
|
|
98
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
108
99
|
* @param offset The current offset.
|
|
109
100
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
110
101
|
*/
|
|
@@ -114,7 +105,7 @@ export declare class EntityDecoder {
|
|
|
114
105
|
*
|
|
115
106
|
* Equivalent to the `Decimal character reference state` in the HTML spec.
|
|
116
107
|
*
|
|
117
|
-
* @param
|
|
108
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
118
109
|
* @param offset The current offset.
|
|
119
110
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
120
111
|
*/
|
|
@@ -138,7 +129,7 @@ export declare class EntityDecoder {
|
|
|
138
129
|
*
|
|
139
130
|
* Equivalent to the `Named character reference state` in the HTML spec.
|
|
140
131
|
*
|
|
141
|
-
* @param
|
|
132
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
142
133
|
* @param offset The current offset.
|
|
143
134
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
144
135
|
*/
|
|
@@ -178,34 +169,37 @@ export declare class EntityDecoder {
|
|
|
178
169
|
* @param char The current character.
|
|
179
170
|
* @returns The index of the next node, or -1 if no branch is taken.
|
|
180
171
|
*/
|
|
181
|
-
export declare function determineBranch(decodeTree: Uint16Array, current: number,
|
|
172
|
+
export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIndex: number, char: number): number;
|
|
182
173
|
/**
|
|
183
174
|
* Decodes an HTML string.
|
|
184
175
|
*
|
|
185
|
-
* @param
|
|
176
|
+
* @param htmlString The string to decode.
|
|
186
177
|
* @param mode The decoding mode.
|
|
187
178
|
* @returns The decoded string.
|
|
188
179
|
*/
|
|
189
|
-
export declare function decodeHTML(
|
|
180
|
+
export declare function decodeHTML(htmlString: string, mode?: DecodingMode): string;
|
|
190
181
|
/**
|
|
191
182
|
* Decodes an HTML string in an attribute.
|
|
192
183
|
*
|
|
193
|
-
* @param
|
|
184
|
+
* @param htmlAttribute The string to decode.
|
|
194
185
|
* @returns The decoded string.
|
|
195
186
|
*/
|
|
196
|
-
export declare function decodeHTMLAttribute(
|
|
187
|
+
export declare function decodeHTMLAttribute(htmlAttribute: string): string;
|
|
197
188
|
/**
|
|
198
189
|
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
|
|
199
190
|
*
|
|
200
|
-
* @param
|
|
191
|
+
* @param htmlString The string to decode.
|
|
201
192
|
* @returns The decoded string.
|
|
202
193
|
*/
|
|
203
|
-
export declare function decodeHTMLStrict(
|
|
194
|
+
export declare function decodeHTMLStrict(htmlString: string): string;
|
|
204
195
|
/**
|
|
205
196
|
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
|
|
206
197
|
*
|
|
207
|
-
* @param
|
|
198
|
+
* @param xmlString The string to decode.
|
|
208
199
|
* @returns The decoded string.
|
|
209
200
|
*/
|
|
210
|
-
export declare function decodeXML(
|
|
201
|
+
export declare function decodeXML(xmlString: string): string;
|
|
202
|
+
export { decodeCodePoint, fromCodePoint, replaceCodePoint, } from "./decode-codepoint.js";
|
|
203
|
+
export { htmlDecodeTree } from "./generated/decode-data-html.js";
|
|
204
|
+
export { xmlDecodeTree } from "./generated/decode-data-xml.js";
|
|
211
205
|
//# 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
|