laif-ds 0.2.78 → 0.2.80
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/CHANGELOG.md +25 -0
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/agent-docs/adoption-report.json +10 -10
- package/dist/agent-docs/components/AppEditor.md +4 -4
- package/dist/agent-docs/components/AppSelect.md +46 -0
- package/dist/agent-docs/manifest.json +5 -3
- package/dist/components/editor/editor-ui/content-editable.js +15 -8
- package/dist/components/ui/app-editor.js +88 -76
- package/dist/components/ui/app-select.js +232 -143
- package/dist/components/ui/date-picker.js +184 -153
- package/dist/components/ui/markdown-renderer.js +40 -30
- package/dist/index.d.ts +3 -1
- package/dist/node_modules/comma-separated-tokens/index.js +16 -5
- package/dist/node_modules/entities/dist/esm/decode-codepoint.js +39 -0
- package/dist/node_modules/entities/dist/esm/decode.js +246 -0
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.js +8 -0
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/hast-util-from-parse5/lib/index.js +146 -0
- package/dist/node_modules/hast-util-parse-selector/lib/index.js +21 -0
- package/dist/node_modules/hast-util-raw/lib/index.js +218 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/hast-util-to-parse5/lib/index.js +119 -0
- package/dist/node_modules/hastscript/lib/create-h.js +113 -0
- package/dist/node_modules/hastscript/lib/index.js +9 -0
- package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +45 -0
- package/dist/node_modules/parse5/dist/common/doctype.js +99 -0
- package/dist/node_modules/parse5/dist/common/error-codes.js +8 -0
- package/dist/node_modules/parse5/dist/common/foreign-content.js +211 -0
- package/dist/node_modules/parse5/dist/common/html.js +251 -0
- package/dist/node_modules/parse5/dist/common/token.js +15 -0
- package/dist/node_modules/parse5/dist/common/unicode.js +74 -0
- package/dist/node_modules/parse5/dist/parser/formatting-element-list.js +85 -0
- package/dist/node_modules/parse5/dist/parser/index.js +2272 -0
- package/dist/node_modules/parse5/dist/parser/open-element-stack.js +241 -0
- package/dist/node_modules/parse5/dist/serializer/index.js +3 -0
- package/dist/node_modules/parse5/dist/tokenizer/index.js +1941 -0
- package/dist/node_modules/parse5/dist/tokenizer/preprocessor.js +89 -0
- package/dist/node_modules/parse5/dist/tree-adapters/default.js +163 -0
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/rehype-raw/lib/index.js +13 -0
- package/dist/node_modules/space-separated-tokens/index.js +8 -3
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/vfile-location/lib/index.js +43 -0
- package/dist/node_modules/web-namespaces/index.js +12 -0
- package/dist/styles.v3.css +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import T from "../../@ungap/structured-clone/esm/index.js";
|
|
3
|
+
import { htmlVoidElements as L } from "../../html-void-elements/index.js";
|
|
4
|
+
import { Parser as g } from "../../parse5/dist/parser/index.js";
|
|
5
|
+
import { getTagID as y } from "../../parse5/dist/common/html.js";
|
|
6
|
+
import "../../parse5/dist/serializer/index.js";
|
|
7
|
+
import "../../parse5/dist/common/error-codes.js";
|
|
8
|
+
import "../../parse5/dist/common/foreign-content.js";
|
|
9
|
+
import { TokenType as p } from "../../parse5/dist/common/token.js";
|
|
10
|
+
import { TokenizerMode as i } from "../../parse5/dist/tokenizer/index.js";
|
|
11
|
+
import { webNamespaces as f } from "../../web-namespaces/index.js";
|
|
12
|
+
import { zwitch as N } from "../../zwitch/index.js";
|
|
13
|
+
import { pointStart as a, pointEnd as C } from "../../unist-util-position/lib/index.js";
|
|
14
|
+
import { fromParse5 as v } from "../../hast-util-from-parse5/lib/index.js";
|
|
15
|
+
import { visit as I } from "../../unist-util-visit/lib/index.js";
|
|
16
|
+
import { toParse5 as S } from "../../hast-util-to-parse5/lib/index.js";
|
|
17
|
+
const P = /<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi, _ = /* @__PURE__ */ new Set([
|
|
18
|
+
"mdxFlowExpression",
|
|
19
|
+
"mdxJsxFlowElement",
|
|
20
|
+
"mdxJsxTextElement",
|
|
21
|
+
"mdxTextExpression",
|
|
22
|
+
"mdxjsEsm"
|
|
23
|
+
]), z = { sourceCodeLocationInfo: !0, scriptingEnabled: !1 };
|
|
24
|
+
function D(r, e) {
|
|
25
|
+
const n = B(r), o = N("type", {
|
|
26
|
+
handlers: { root: R, element: b, text: O, comment: x, doctype: M, raw: X },
|
|
27
|
+
unknown: W
|
|
28
|
+
}), t = {
|
|
29
|
+
parser: n ? new g(z) : g.getFragmentParser(void 0, z),
|
|
30
|
+
handle(m) {
|
|
31
|
+
o(m, t);
|
|
32
|
+
},
|
|
33
|
+
stitches: !1,
|
|
34
|
+
options: e || {}
|
|
35
|
+
};
|
|
36
|
+
o(r, t), c(t, a());
|
|
37
|
+
const u = n ? t.parser.document : t.parser.getFragment(), s = v(u, {
|
|
38
|
+
// To do: support `space`?
|
|
39
|
+
file: t.options.file
|
|
40
|
+
});
|
|
41
|
+
return t.stitches && I(s, "comment", function(m, k, h) {
|
|
42
|
+
const d = (
|
|
43
|
+
/** @type {Stitch} */
|
|
44
|
+
/** @type {unknown} */
|
|
45
|
+
m
|
|
46
|
+
);
|
|
47
|
+
if (d.value.stitch && h && k !== void 0) {
|
|
48
|
+
const A = h.children;
|
|
49
|
+
return A[k] = d.value.stitch, k;
|
|
50
|
+
}
|
|
51
|
+
}), s.type === "root" && s.children.length === 1 && s.children[0].type === r.type ? s.children[0] : s;
|
|
52
|
+
}
|
|
53
|
+
function w(r, e) {
|
|
54
|
+
let n = -1;
|
|
55
|
+
if (r)
|
|
56
|
+
for (; ++n < r.length; )
|
|
57
|
+
e.handle(r[n]);
|
|
58
|
+
}
|
|
59
|
+
function R(r, e) {
|
|
60
|
+
w(r.children, e);
|
|
61
|
+
}
|
|
62
|
+
function b(r, e) {
|
|
63
|
+
G(r, e), w(r.children, e), j(r, e);
|
|
64
|
+
}
|
|
65
|
+
function O(r, e) {
|
|
66
|
+
e.parser.tokenizer.state > 4 && (e.parser.tokenizer.state = 0);
|
|
67
|
+
const n = {
|
|
68
|
+
type: p.CHARACTER,
|
|
69
|
+
chars: r.value,
|
|
70
|
+
location: l(r)
|
|
71
|
+
};
|
|
72
|
+
c(e, a(r)), e.parser.currentToken = n, e.parser._processToken(e.parser.currentToken);
|
|
73
|
+
}
|
|
74
|
+
function M(r, e) {
|
|
75
|
+
const n = {
|
|
76
|
+
type: p.DOCTYPE,
|
|
77
|
+
name: "html",
|
|
78
|
+
forceQuirks: !1,
|
|
79
|
+
publicId: "",
|
|
80
|
+
systemId: "",
|
|
81
|
+
location: l(r)
|
|
82
|
+
};
|
|
83
|
+
c(e, a(r)), e.parser.currentToken = n, e.parser._processToken(e.parser.currentToken);
|
|
84
|
+
}
|
|
85
|
+
function F(r, e) {
|
|
86
|
+
e.stitches = !0;
|
|
87
|
+
const n = H(r);
|
|
88
|
+
if ("children" in r && "children" in n) {
|
|
89
|
+
const o = (
|
|
90
|
+
/** @type {Root} */
|
|
91
|
+
D({ type: "root", children: r.children }, e.options)
|
|
92
|
+
);
|
|
93
|
+
n.children = o.children;
|
|
94
|
+
}
|
|
95
|
+
x({ type: "comment", value: { stitch: n } }, e);
|
|
96
|
+
}
|
|
97
|
+
function x(r, e) {
|
|
98
|
+
const n = r.value, o = {
|
|
99
|
+
type: p.COMMENT,
|
|
100
|
+
data: n,
|
|
101
|
+
location: l(r)
|
|
102
|
+
};
|
|
103
|
+
c(e, a(r)), e.parser.currentToken = o, e.parser._processToken(e.parser.currentToken);
|
|
104
|
+
}
|
|
105
|
+
function X(r, e) {
|
|
106
|
+
if (e.parser.tokenizer.preprocessor.html = "", e.parser.tokenizer.preprocessor.pos = -1, e.parser.tokenizer.preprocessor.lastGapPos = -2, e.parser.tokenizer.preprocessor.gapStack = [], e.parser.tokenizer.preprocessor.skipNextNewLine = !1, e.parser.tokenizer.preprocessor.lastChunkWritten = !1, e.parser.tokenizer.preprocessor.endOfChunkHit = !1, e.parser.tokenizer.preprocessor.isEol = !1, E(e, a(r)), e.parser.tokenizer.write(
|
|
107
|
+
e.options.tagfilter ? r.value.replace(P, "<$1$2") : r.value,
|
|
108
|
+
!1
|
|
109
|
+
), e.parser.tokenizer._runParsingLoop(), e.parser.tokenizer.state === 72 || // @ts-expect-error: removed.
|
|
110
|
+
e.parser.tokenizer.state === 78) {
|
|
111
|
+
e.parser.tokenizer.preprocessor.lastChunkWritten = !0;
|
|
112
|
+
const n = e.parser.tokenizer._consume();
|
|
113
|
+
e.parser.tokenizer._callState(n);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function W(r, e) {
|
|
117
|
+
const n = (
|
|
118
|
+
/** @type {Nodes} */
|
|
119
|
+
r
|
|
120
|
+
);
|
|
121
|
+
if (e.options.passThrough && e.options.passThrough.includes(n.type))
|
|
122
|
+
F(n, e);
|
|
123
|
+
else {
|
|
124
|
+
let o = "";
|
|
125
|
+
throw _.has(n.type) && (o = ". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"), new Error("Cannot compile `" + n.type + "` node" + o);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function c(r, e) {
|
|
129
|
+
E(r, e);
|
|
130
|
+
const n = r.parser.tokenizer.currentCharacterToken;
|
|
131
|
+
n && n.location && (n.location.endLine = r.parser.tokenizer.preprocessor.line, n.location.endCol = r.parser.tokenizer.preprocessor.col + 1, n.location.endOffset = r.parser.tokenizer.preprocessor.offset + 1, r.parser.currentToken = n, r.parser._processToken(r.parser.currentToken)), r.parser.tokenizer.paused = !1, r.parser.tokenizer.inLoop = !1, r.parser.tokenizer.active = !1, r.parser.tokenizer.returnState = i.DATA, r.parser.tokenizer.charRefCode = -1, r.parser.tokenizer.consumedAfterSnapshot = -1, r.parser.tokenizer.currentLocation = null, r.parser.tokenizer.currentCharacterToken = null, r.parser.tokenizer.currentToken = null, r.parser.tokenizer.currentAttr = { name: "", value: "" };
|
|
132
|
+
}
|
|
133
|
+
function E(r, e) {
|
|
134
|
+
if (e && e.offset !== void 0) {
|
|
135
|
+
const n = {
|
|
136
|
+
startLine: e.line,
|
|
137
|
+
startCol: e.column,
|
|
138
|
+
startOffset: e.offset,
|
|
139
|
+
endLine: -1,
|
|
140
|
+
endCol: -1,
|
|
141
|
+
endOffset: -1
|
|
142
|
+
};
|
|
143
|
+
r.parser.tokenizer.preprocessor.lineStartPos = -e.column + 1, r.parser.tokenizer.preprocessor.droppedBufferSize = e.offset, r.parser.tokenizer.preprocessor.line = e.line, r.parser.tokenizer.currentLocation = n;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function G(r, e) {
|
|
147
|
+
const n = r.tagName.toLowerCase();
|
|
148
|
+
if (e.parser.tokenizer.state === i.PLAINTEXT) return;
|
|
149
|
+
c(e, a(r));
|
|
150
|
+
const o = e.parser.openElements.current;
|
|
151
|
+
let t = "namespaceURI" in o ? o.namespaceURI : f.html;
|
|
152
|
+
t === f.html && n === "svg" && (t = f.svg);
|
|
153
|
+
const u = S(
|
|
154
|
+
// Shallow clone to not delve into `children`: we only need the attributes.
|
|
155
|
+
{ ...r, children: [] },
|
|
156
|
+
{ space: t === f.svg ? "svg" : "html" }
|
|
157
|
+
), s = {
|
|
158
|
+
type: p.START_TAG,
|
|
159
|
+
tagName: n,
|
|
160
|
+
tagID: y(n),
|
|
161
|
+
// We always send start and end tags.
|
|
162
|
+
selfClosing: !1,
|
|
163
|
+
ackSelfClosing: !1,
|
|
164
|
+
// Always element.
|
|
165
|
+
/* c8 ignore next */
|
|
166
|
+
attrs: "attrs" in u ? u.attrs : [],
|
|
167
|
+
location: l(r)
|
|
168
|
+
};
|
|
169
|
+
e.parser.currentToken = s, e.parser._processToken(e.parser.currentToken), e.parser.tokenizer.lastStartTagName = n;
|
|
170
|
+
}
|
|
171
|
+
function j(r, e) {
|
|
172
|
+
const n = r.tagName.toLowerCase();
|
|
173
|
+
if (!e.parser.tokenizer.inForeignNode && L.includes(n) || e.parser.tokenizer.state === i.PLAINTEXT) return;
|
|
174
|
+
c(e, C(r));
|
|
175
|
+
const o = {
|
|
176
|
+
type: p.END_TAG,
|
|
177
|
+
tagName: n,
|
|
178
|
+
tagID: y(n),
|
|
179
|
+
selfClosing: !1,
|
|
180
|
+
ackSelfClosing: !1,
|
|
181
|
+
attrs: [],
|
|
182
|
+
location: l(r)
|
|
183
|
+
};
|
|
184
|
+
e.parser.currentToken = o, e.parser._processToken(e.parser.currentToken), // Current element is closed.
|
|
185
|
+
n === e.parser.tokenizer.lastStartTagName && // `<textarea>` and `<title>`
|
|
186
|
+
(e.parser.tokenizer.state === i.RCDATA || // `<iframe>`, `<noembed>`, `<noframes>`, `<style>`, `<xmp>`
|
|
187
|
+
e.parser.tokenizer.state === i.RAWTEXT || // `<script>`
|
|
188
|
+
e.parser.tokenizer.state === i.SCRIPT_DATA) && (e.parser.tokenizer.state = i.DATA);
|
|
189
|
+
}
|
|
190
|
+
function B(r) {
|
|
191
|
+
const e = r.type === "root" ? r.children[0] : r;
|
|
192
|
+
return !!(e && (e.type === "doctype" || e.type === "element" && e.tagName.toLowerCase() === "html"));
|
|
193
|
+
}
|
|
194
|
+
function l(r) {
|
|
195
|
+
const e = a(r) || {
|
|
196
|
+
line: void 0,
|
|
197
|
+
column: void 0,
|
|
198
|
+
offset: void 0
|
|
199
|
+
}, n = C(r) || {
|
|
200
|
+
line: void 0,
|
|
201
|
+
column: void 0,
|
|
202
|
+
offset: void 0
|
|
203
|
+
};
|
|
204
|
+
return {
|
|
205
|
+
startLine: e.line,
|
|
206
|
+
startCol: e.column,
|
|
207
|
+
startOffset: e.offset,
|
|
208
|
+
endLine: n.line,
|
|
209
|
+
endCol: n.column,
|
|
210
|
+
endOffset: n.offset
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
function H(r) {
|
|
214
|
+
return "children" in r ? T({ ...r, children: [] }) : T(r);
|
|
215
|
+
}
|
|
216
|
+
export {
|
|
217
|
+
D as raw
|
|
218
|
+
};
|
|
@@ -3,7 +3,7 @@ import { stringify as w } from "../../comma-separated-tokens/index.js";
|
|
|
3
3
|
import { ok as u } from "../../devlop/lib/default.js";
|
|
4
4
|
import { svg as m, html as C } from "../../property-information/index.js";
|
|
5
5
|
import { stringify as N } from "../../space-separated-tokens/index.js";
|
|
6
|
-
import S from "../../../_virtual/
|
|
6
|
+
import S from "../../../_virtual/index4.js";
|
|
7
7
|
import { whitespace as j } from "../../hast-util-whitespace/lib/index.js";
|
|
8
8
|
import { name as x } from "../../estree-util-is-identifier-name/lib/index.js";
|
|
9
9
|
import { VFileMessage as h } from "../../vfile-message/lib/index.js";
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { stringify as N } from "../../comma-separated-tokens/index.js";
|
|
3
|
+
import { ok as p } from "../../devlop/lib/default.js";
|
|
4
|
+
import { svg as f, html as h } from "../../property-information/index.js";
|
|
5
|
+
import { stringify as g } from "../../space-separated-tokens/index.js";
|
|
6
|
+
import { webNamespaces as l } from "../../web-namespaces/index.js";
|
|
7
|
+
import { zwitch as y } from "../../zwitch/index.js";
|
|
8
|
+
import { find as b } from "../../property-information/lib/find.js";
|
|
9
|
+
const x = {}, w = {}.hasOwnProperty, u = y("type", { handlers: { root: O, element: q, text: L, comment: S, doctype: C } });
|
|
10
|
+
function $(e, n) {
|
|
11
|
+
const r = (n || x).space;
|
|
12
|
+
return u(e, r === "svg" ? f : h);
|
|
13
|
+
}
|
|
14
|
+
function O(e, n) {
|
|
15
|
+
const t = {
|
|
16
|
+
nodeName: "#document",
|
|
17
|
+
// @ts-expect-error: `parse5` uses enums, which are actually strings.
|
|
18
|
+
mode: (e.data || {}).quirksMode ? "quirks" : "no-quirks",
|
|
19
|
+
childNodes: []
|
|
20
|
+
};
|
|
21
|
+
return t.childNodes = a(e.children, t, n), i(e, t), t;
|
|
22
|
+
}
|
|
23
|
+
function k(e, n) {
|
|
24
|
+
const t = { nodeName: "#document-fragment", childNodes: [] };
|
|
25
|
+
return t.childNodes = a(e.children, t, n), i(e, t), t;
|
|
26
|
+
}
|
|
27
|
+
function C(e) {
|
|
28
|
+
const n = {
|
|
29
|
+
nodeName: "#documentType",
|
|
30
|
+
name: "html",
|
|
31
|
+
publicId: "",
|
|
32
|
+
systemId: "",
|
|
33
|
+
parentNode: null
|
|
34
|
+
};
|
|
35
|
+
return i(e, n), n;
|
|
36
|
+
}
|
|
37
|
+
function L(e) {
|
|
38
|
+
const n = {
|
|
39
|
+
nodeName: "#text",
|
|
40
|
+
value: e.value,
|
|
41
|
+
parentNode: null
|
|
42
|
+
};
|
|
43
|
+
return i(e, n), n;
|
|
44
|
+
}
|
|
45
|
+
function S(e) {
|
|
46
|
+
const n = {
|
|
47
|
+
nodeName: "#comment",
|
|
48
|
+
data: e.value,
|
|
49
|
+
parentNode: null
|
|
50
|
+
};
|
|
51
|
+
return i(e, n), n;
|
|
52
|
+
}
|
|
53
|
+
function q(e, n) {
|
|
54
|
+
const t = n;
|
|
55
|
+
let r = t;
|
|
56
|
+
e.type === "element" && e.tagName.toLowerCase() === "svg" && t.space === "html" && (r = f);
|
|
57
|
+
const s = [];
|
|
58
|
+
let o;
|
|
59
|
+
if (e.properties) {
|
|
60
|
+
for (o in e.properties)
|
|
61
|
+
if (o !== "children" && w.call(e.properties, o)) {
|
|
62
|
+
const m = I(
|
|
63
|
+
r,
|
|
64
|
+
o,
|
|
65
|
+
e.properties[o]
|
|
66
|
+
);
|
|
67
|
+
m && s.push(m);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const d = r.space, c = {
|
|
71
|
+
nodeName: e.tagName,
|
|
72
|
+
tagName: e.tagName,
|
|
73
|
+
attrs: s,
|
|
74
|
+
// @ts-expect-error: `parse5` types are wrong.
|
|
75
|
+
namespaceURI: l[d],
|
|
76
|
+
childNodes: [],
|
|
77
|
+
parentNode: null
|
|
78
|
+
};
|
|
79
|
+
return c.childNodes = a(e.children, c, r), i(e, c), e.tagName === "template" && e.content && (c.content = k(e.content, r)), c;
|
|
80
|
+
}
|
|
81
|
+
function I(e, n, t) {
|
|
82
|
+
const r = b(e, n);
|
|
83
|
+
if (t === !1 || t === null || t === void 0 || typeof t == "number" && Number.isNaN(t) || !t && r.boolean)
|
|
84
|
+
return;
|
|
85
|
+
Array.isArray(t) && (t = r.commaSeparated ? N(t) : g(t));
|
|
86
|
+
const s = {
|
|
87
|
+
name: r.attribute,
|
|
88
|
+
value: t === !0 ? "" : String(t)
|
|
89
|
+
};
|
|
90
|
+
if (r.space && r.space !== "html" && r.space !== "svg") {
|
|
91
|
+
const o = s.name.indexOf(":");
|
|
92
|
+
o < 0 ? s.prefix = "" : (s.name = s.name.slice(o + 1), s.prefix = r.attribute.slice(0, o)), s.namespace = l[r.space];
|
|
93
|
+
}
|
|
94
|
+
return s;
|
|
95
|
+
}
|
|
96
|
+
function a(e, n, t) {
|
|
97
|
+
let r = -1;
|
|
98
|
+
const s = [];
|
|
99
|
+
if (e)
|
|
100
|
+
for (; ++r < e.length; ) {
|
|
101
|
+
const o = u(e[r], t);
|
|
102
|
+
o.parentNode = n, s.push(o);
|
|
103
|
+
}
|
|
104
|
+
return s;
|
|
105
|
+
}
|
|
106
|
+
function i(e, n) {
|
|
107
|
+
const t = e.position;
|
|
108
|
+
t && t.start && t.end && (p(typeof t.start.offset == "number"), p(typeof t.end.offset == "number"), n.sourceCodeLocation = {
|
|
109
|
+
startLine: t.start.line,
|
|
110
|
+
startCol: t.start.column,
|
|
111
|
+
startOffset: t.start.offset,
|
|
112
|
+
endLine: t.end.line,
|
|
113
|
+
endCol: t.end.column,
|
|
114
|
+
endOffset: t.end.offset
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
$ as toParse5
|
|
119
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { parse as d } from "../../comma-separated-tokens/index.js";
|
|
3
|
+
import { parse as m } from "../../space-separated-tokens/index.js";
|
|
4
|
+
import { parseSelector as A } from "../../hast-util-parse-selector/lib/index.js";
|
|
5
|
+
import { find as N } from "../../property-information/lib/find.js";
|
|
6
|
+
import { normalize as a } from "../../property-information/lib/normalize.js";
|
|
7
|
+
function L(t, r, n) {
|
|
8
|
+
const e = n ? S(n) : void 0;
|
|
9
|
+
function i(o, s, ...p) {
|
|
10
|
+
let f;
|
|
11
|
+
if (o == null) {
|
|
12
|
+
f = { type: "root", children: [] };
|
|
13
|
+
const c = (
|
|
14
|
+
/** @type {Child} */
|
|
15
|
+
s
|
|
16
|
+
);
|
|
17
|
+
p.unshift(c);
|
|
18
|
+
} else {
|
|
19
|
+
f = A(o, r);
|
|
20
|
+
const c = f.tagName.toLowerCase(), l = e ? e.get(c) : void 0;
|
|
21
|
+
if (f.tagName = l || c, g(s))
|
|
22
|
+
p.unshift(s);
|
|
23
|
+
else
|
|
24
|
+
for (const [h, b] of Object.entries(s))
|
|
25
|
+
j(t, f.properties, h, b);
|
|
26
|
+
}
|
|
27
|
+
for (const c of p)
|
|
28
|
+
y(f.children, c);
|
|
29
|
+
return f.type === "element" && f.tagName === "template" && (f.content = { type: "root", children: f.children }, f.children = []), f;
|
|
30
|
+
}
|
|
31
|
+
return i;
|
|
32
|
+
}
|
|
33
|
+
function g(t) {
|
|
34
|
+
if (t === null || typeof t != "object" || Array.isArray(t))
|
|
35
|
+
return !0;
|
|
36
|
+
if (typeof t.type != "string") return !1;
|
|
37
|
+
const r = (
|
|
38
|
+
/** @type {Record<string, unknown>} */
|
|
39
|
+
t
|
|
40
|
+
), n = Object.keys(t);
|
|
41
|
+
for (const e of n) {
|
|
42
|
+
const i = r[e];
|
|
43
|
+
if (i && typeof i == "object") {
|
|
44
|
+
if (!Array.isArray(i)) return !0;
|
|
45
|
+
const o = (
|
|
46
|
+
/** @type {ReadonlyArray<unknown>} */
|
|
47
|
+
i
|
|
48
|
+
);
|
|
49
|
+
for (const s of o)
|
|
50
|
+
if (typeof s != "number" && typeof s != "string")
|
|
51
|
+
return !0;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return !!("children" in t && Array.isArray(t.children));
|
|
55
|
+
}
|
|
56
|
+
function j(t, r, n, e) {
|
|
57
|
+
const i = N(t, n);
|
|
58
|
+
let o;
|
|
59
|
+
if (e != null) {
|
|
60
|
+
if (typeof e == "number") {
|
|
61
|
+
if (Number.isNaN(e)) return;
|
|
62
|
+
o = e;
|
|
63
|
+
} else typeof e == "boolean" ? o = e : typeof e == "string" ? i.spaceSeparated ? o = m(e) : i.commaSeparated ? o = d(e) : i.commaOrSpaceSeparated ? o = m(d(e).join(" ")) : o = u(i, i.property, e) : Array.isArray(e) ? o = [...e] : o = i.property === "style" ? w(e) : String(e);
|
|
64
|
+
if (Array.isArray(o)) {
|
|
65
|
+
const s = [];
|
|
66
|
+
for (const p of o)
|
|
67
|
+
s.push(
|
|
68
|
+
/** @type {number | string} */
|
|
69
|
+
u(i, i.property, p)
|
|
70
|
+
);
|
|
71
|
+
o = s;
|
|
72
|
+
}
|
|
73
|
+
i.property === "className" && Array.isArray(r.className) && (o = r.className.concat(
|
|
74
|
+
/** @type {Array<number | string> | number | string} */
|
|
75
|
+
o
|
|
76
|
+
)), r[i.property] = o;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function y(t, r) {
|
|
80
|
+
if (r != null) if (typeof r == "number" || typeof r == "string")
|
|
81
|
+
t.push({ type: "text", value: String(r) });
|
|
82
|
+
else if (Array.isArray(r))
|
|
83
|
+
for (const n of r)
|
|
84
|
+
y(t, n);
|
|
85
|
+
else if (typeof r == "object" && "type" in r)
|
|
86
|
+
r.type === "root" ? y(t, r.children) : t.push(r);
|
|
87
|
+
else
|
|
88
|
+
throw new Error("Expected node, nodes, or string, got `" + r + "`");
|
|
89
|
+
}
|
|
90
|
+
function u(t, r, n) {
|
|
91
|
+
if (typeof n == "string") {
|
|
92
|
+
if (t.number && n && !Number.isNaN(Number(n)))
|
|
93
|
+
return Number(n);
|
|
94
|
+
if ((t.boolean || t.overloadedBoolean) && (n === "" || a(n) === a(r)))
|
|
95
|
+
return !0;
|
|
96
|
+
}
|
|
97
|
+
return n;
|
|
98
|
+
}
|
|
99
|
+
function w(t) {
|
|
100
|
+
const r = [];
|
|
101
|
+
for (const [n, e] of Object.entries(t))
|
|
102
|
+
r.push([n, e].join(": "));
|
|
103
|
+
return r.join("; ");
|
|
104
|
+
}
|
|
105
|
+
function S(t) {
|
|
106
|
+
const r = /* @__PURE__ */ new Map();
|
|
107
|
+
for (const n of t)
|
|
108
|
+
r.set(n.toLowerCase(), n);
|
|
109
|
+
return r;
|
|
110
|
+
}
|
|
111
|
+
export {
|
|
112
|
+
L as createH
|
|
113
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { html as e, svg as o } from "../../property-information/index.js";
|
|
3
|
+
import { createH as t } from "./create-h.js";
|
|
4
|
+
import { svgCaseSensitiveTagNames as s } from "./svg-case-sensitive-tag-names.js";
|
|
5
|
+
const a = t(e, "div"), c = t(o, "g", s);
|
|
6
|
+
export {
|
|
7
|
+
a as h,
|
|
8
|
+
c as s
|
|
9
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const e = [
|
|
3
|
+
"altGlyph",
|
|
4
|
+
"altGlyphDef",
|
|
5
|
+
"altGlyphItem",
|
|
6
|
+
"animateColor",
|
|
7
|
+
"animateMotion",
|
|
8
|
+
"animateTransform",
|
|
9
|
+
"clipPath",
|
|
10
|
+
"feBlend",
|
|
11
|
+
"feColorMatrix",
|
|
12
|
+
"feComponentTransfer",
|
|
13
|
+
"feComposite",
|
|
14
|
+
"feConvolveMatrix",
|
|
15
|
+
"feDiffuseLighting",
|
|
16
|
+
"feDisplacementMap",
|
|
17
|
+
"feDistantLight",
|
|
18
|
+
"feDropShadow",
|
|
19
|
+
"feFlood",
|
|
20
|
+
"feFuncA",
|
|
21
|
+
"feFuncB",
|
|
22
|
+
"feFuncG",
|
|
23
|
+
"feFuncR",
|
|
24
|
+
"feGaussianBlur",
|
|
25
|
+
"feImage",
|
|
26
|
+
"feMerge",
|
|
27
|
+
"feMergeNode",
|
|
28
|
+
"feMorphology",
|
|
29
|
+
"feOffset",
|
|
30
|
+
"fePointLight",
|
|
31
|
+
"feSpecularLighting",
|
|
32
|
+
"feSpotLight",
|
|
33
|
+
"feTile",
|
|
34
|
+
"feTurbulence",
|
|
35
|
+
"foreignObject",
|
|
36
|
+
"glyphRef",
|
|
37
|
+
"linearGradient",
|
|
38
|
+
"radialGradient",
|
|
39
|
+
"solidColor",
|
|
40
|
+
"textArea",
|
|
41
|
+
"textPath"
|
|
42
|
+
];
|
|
43
|
+
export {
|
|
44
|
+
e as svgCaseSensitiveTagNames
|
|
45
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { DOCUMENT_MODE as l } from "./html.js";
|
|
3
|
+
const s = "html", n = "about:legacy-compat", h = "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd", r = [
|
|
4
|
+
"+//silmaril//dtd html pro v0r11 19970101//",
|
|
5
|
+
"-//as//dtd html 3.0 aswedit + extensions//",
|
|
6
|
+
"-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
|
|
7
|
+
"-//ietf//dtd html 2.0 level 1//",
|
|
8
|
+
"-//ietf//dtd html 2.0 level 2//",
|
|
9
|
+
"-//ietf//dtd html 2.0 strict level 1//",
|
|
10
|
+
"-//ietf//dtd html 2.0 strict level 2//",
|
|
11
|
+
"-//ietf//dtd html 2.0 strict//",
|
|
12
|
+
"-//ietf//dtd html 2.0//",
|
|
13
|
+
"-//ietf//dtd html 2.1e//",
|
|
14
|
+
"-//ietf//dtd html 3.0//",
|
|
15
|
+
"-//ietf//dtd html 3.2 final//",
|
|
16
|
+
"-//ietf//dtd html 3.2//",
|
|
17
|
+
"-//ietf//dtd html 3//",
|
|
18
|
+
"-//ietf//dtd html level 0//",
|
|
19
|
+
"-//ietf//dtd html level 1//",
|
|
20
|
+
"-//ietf//dtd html level 2//",
|
|
21
|
+
"-//ietf//dtd html level 3//",
|
|
22
|
+
"-//ietf//dtd html strict level 0//",
|
|
23
|
+
"-//ietf//dtd html strict level 1//",
|
|
24
|
+
"-//ietf//dtd html strict level 2//",
|
|
25
|
+
"-//ietf//dtd html strict level 3//",
|
|
26
|
+
"-//ietf//dtd html strict//",
|
|
27
|
+
"-//ietf//dtd html//",
|
|
28
|
+
"-//metrius//dtd metrius presentational//",
|
|
29
|
+
"-//microsoft//dtd internet explorer 2.0 html strict//",
|
|
30
|
+
"-//microsoft//dtd internet explorer 2.0 html//",
|
|
31
|
+
"-//microsoft//dtd internet explorer 2.0 tables//",
|
|
32
|
+
"-//microsoft//dtd internet explorer 3.0 html strict//",
|
|
33
|
+
"-//microsoft//dtd internet explorer 3.0 html//",
|
|
34
|
+
"-//microsoft//dtd internet explorer 3.0 tables//",
|
|
35
|
+
"-//netscape comm. corp.//dtd html//",
|
|
36
|
+
"-//netscape comm. corp.//dtd strict html//",
|
|
37
|
+
"-//o'reilly and associates//dtd html 2.0//",
|
|
38
|
+
"-//o'reilly and associates//dtd html extended 1.0//",
|
|
39
|
+
"-//o'reilly and associates//dtd html extended relaxed 1.0//",
|
|
40
|
+
"-//sq//dtd html 2.0 hotmetal + extensions//",
|
|
41
|
+
"-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//",
|
|
42
|
+
"-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//",
|
|
43
|
+
"-//spyglass//dtd html 2.0 extended//",
|
|
44
|
+
"-//sun microsystems corp.//dtd hotjava html//",
|
|
45
|
+
"-//sun microsystems corp.//dtd hotjava strict html//",
|
|
46
|
+
"-//w3c//dtd html 3 1995-03-24//",
|
|
47
|
+
"-//w3c//dtd html 3.2 draft//",
|
|
48
|
+
"-//w3c//dtd html 3.2 final//",
|
|
49
|
+
"-//w3c//dtd html 3.2//",
|
|
50
|
+
"-//w3c//dtd html 3.2s draft//",
|
|
51
|
+
"-//w3c//dtd html 4.0 frameset//",
|
|
52
|
+
"-//w3c//dtd html 4.0 transitional//",
|
|
53
|
+
"-//w3c//dtd html experimental 19960712//",
|
|
54
|
+
"-//w3c//dtd html experimental 970421//",
|
|
55
|
+
"-//w3c//dtd w3 html//",
|
|
56
|
+
"-//w3o//dtd w3 html 3.0//",
|
|
57
|
+
"-//webtechs//dtd mozilla html 2.0//",
|
|
58
|
+
"-//webtechs//dtd mozilla html//"
|
|
59
|
+
], c = [
|
|
60
|
+
...r,
|
|
61
|
+
"-//w3c//dtd html 4.01 frameset//",
|
|
62
|
+
"-//w3c//dtd html 4.01 transitional//"
|
|
63
|
+
], a = /* @__PURE__ */ new Set([
|
|
64
|
+
"-//w3o//dtd w3 html strict 3.0//en//",
|
|
65
|
+
"-/w3c/dtd html 4.0 transitional/en",
|
|
66
|
+
"html"
|
|
67
|
+
]), o = ["-//w3c//dtd xhtml 1.0 frameset//", "-//w3c//dtd xhtml 1.0 transitional//"], f = [
|
|
68
|
+
...o,
|
|
69
|
+
"-//w3c//dtd html 4.01 frameset//",
|
|
70
|
+
"-//w3c//dtd html 4.01 transitional//"
|
|
71
|
+
];
|
|
72
|
+
function i(t, d) {
|
|
73
|
+
return d.some((e) => t.startsWith(e));
|
|
74
|
+
}
|
|
75
|
+
function _(t) {
|
|
76
|
+
return t.name === s && t.publicId === null && (t.systemId === null || t.systemId === n);
|
|
77
|
+
}
|
|
78
|
+
function w(t) {
|
|
79
|
+
if (t.name !== s)
|
|
80
|
+
return l.QUIRKS;
|
|
81
|
+
const { systemId: d } = t;
|
|
82
|
+
if (d && d.toLowerCase() === h)
|
|
83
|
+
return l.QUIRKS;
|
|
84
|
+
let { publicId: e } = t;
|
|
85
|
+
if (e !== null) {
|
|
86
|
+
if (e = e.toLowerCase(), a.has(e))
|
|
87
|
+
return l.QUIRKS;
|
|
88
|
+
let m = d === null ? c : r;
|
|
89
|
+
if (i(e, m))
|
|
90
|
+
return l.QUIRKS;
|
|
91
|
+
if (m = d === null ? o : f, i(e, m))
|
|
92
|
+
return l.LIMITED_QUIRKS;
|
|
93
|
+
}
|
|
94
|
+
return l.NO_QUIRKS;
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
w as getDocumentMode,
|
|
98
|
+
_ as isConforming
|
|
99
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var t;
|
|
3
|
+
(function(e) {
|
|
4
|
+
e.controlCharacterInInputStream = "control-character-in-input-stream", e.noncharacterInInputStream = "noncharacter-in-input-stream", e.surrogateInInputStream = "surrogate-in-input-stream", e.nonVoidHtmlElementStartTagWithTrailingSolidus = "non-void-html-element-start-tag-with-trailing-solidus", e.endTagWithAttributes = "end-tag-with-attributes", e.endTagWithTrailingSolidus = "end-tag-with-trailing-solidus", e.unexpectedSolidusInTag = "unexpected-solidus-in-tag", e.unexpectedNullCharacter = "unexpected-null-character", e.unexpectedQuestionMarkInsteadOfTagName = "unexpected-question-mark-instead-of-tag-name", e.invalidFirstCharacterOfTagName = "invalid-first-character-of-tag-name", e.unexpectedEqualsSignBeforeAttributeName = "unexpected-equals-sign-before-attribute-name", e.missingEndTagName = "missing-end-tag-name", e.unexpectedCharacterInAttributeName = "unexpected-character-in-attribute-name", e.unknownNamedCharacterReference = "unknown-named-character-reference", e.missingSemicolonAfterCharacterReference = "missing-semicolon-after-character-reference", e.unexpectedCharacterAfterDoctypeSystemIdentifier = "unexpected-character-after-doctype-system-identifier", e.unexpectedCharacterInUnquotedAttributeValue = "unexpected-character-in-unquoted-attribute-value", e.eofBeforeTagName = "eof-before-tag-name", e.eofInTag = "eof-in-tag", e.missingAttributeValue = "missing-attribute-value", e.missingWhitespaceBetweenAttributes = "missing-whitespace-between-attributes", e.missingWhitespaceAfterDoctypePublicKeyword = "missing-whitespace-after-doctype-public-keyword", e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers = "missing-whitespace-between-doctype-public-and-system-identifiers", e.missingWhitespaceAfterDoctypeSystemKeyword = "missing-whitespace-after-doctype-system-keyword", e.missingQuoteBeforeDoctypePublicIdentifier = "missing-quote-before-doctype-public-identifier", e.missingQuoteBeforeDoctypeSystemIdentifier = "missing-quote-before-doctype-system-identifier", e.missingDoctypePublicIdentifier = "missing-doctype-public-identifier", e.missingDoctypeSystemIdentifier = "missing-doctype-system-identifier", e.abruptDoctypePublicIdentifier = "abrupt-doctype-public-identifier", e.abruptDoctypeSystemIdentifier = "abrupt-doctype-system-identifier", e.cdataInHtmlContent = "cdata-in-html-content", e.incorrectlyOpenedComment = "incorrectly-opened-comment", e.eofInScriptHtmlCommentLikeText = "eof-in-script-html-comment-like-text", e.eofInDoctype = "eof-in-doctype", e.nestedComment = "nested-comment", e.abruptClosingOfEmptyComment = "abrupt-closing-of-empty-comment", e.eofInComment = "eof-in-comment", e.incorrectlyClosedComment = "incorrectly-closed-comment", e.eofInCdata = "eof-in-cdata", e.absenceOfDigitsInNumericCharacterReference = "absence-of-digits-in-numeric-character-reference", e.nullCharacterReference = "null-character-reference", e.surrogateCharacterReference = "surrogate-character-reference", e.characterReferenceOutsideUnicodeRange = "character-reference-outside-unicode-range", e.controlCharacterReference = "control-character-reference", e.noncharacterCharacterReference = "noncharacter-character-reference", e.missingWhitespaceBeforeDoctypeName = "missing-whitespace-before-doctype-name", e.missingDoctypeName = "missing-doctype-name", e.invalidCharacterSequenceAfterDoctypeName = "invalid-character-sequence-after-doctype-name", e.duplicateAttribute = "duplicate-attribute", e.nonConformingDoctype = "non-conforming-doctype", e.missingDoctype = "missing-doctype", e.misplacedDoctype = "misplaced-doctype", e.endTagWithoutMatchingOpenElement = "end-tag-without-matching-open-element", e.closingOfElementWithOpenChildElements = "closing-of-element-with-open-child-elements", e.disallowedContentInNoscriptInHead = "disallowed-content-in-noscript-in-head", e.openElementsLeftAfterEof = "open-elements-left-after-eof", e.abandonedHeadElementChild = "abandoned-head-element-child", e.misplacedStartTagForHeadElement = "misplaced-start-tag-for-head-element", e.nestedNoscriptInHead = "nested-noscript-in-head", e.eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text";
|
|
5
|
+
})(t || (t = {}));
|
|
6
|
+
export {
|
|
7
|
+
t as ERR
|
|
8
|
+
};
|