@storybook/addon-docs 10.1.0-alpha.9 → 10.1.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/_browser-chunks/Color-S5NAVK5F.js +1096 -0
- package/dist/_browser-chunks/{DocsRenderer-HT7GNKAR.js → DocsRenderer-GHJI37HO.js} +2 -2
- package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
- package/dist/_browser-chunks/chunk-CYSK6WYR.js +7 -0
- package/dist/_browser-chunks/chunk-DDRHE7EB.js +949 -0
- package/dist/_browser-chunks/{chunk-74ZUTOZN.js → chunk-OATZR77O.js} +9 -22
- package/dist/_browser-chunks/chunk-UUESKCKV.js +31 -0
- package/dist/_node-chunks/chunk-2A5U5ANW.js +22630 -0
- package/dist/_node-chunks/{chunk-D527LDYX.js → chunk-3AUFNFUR.js} +13 -19
- package/dist/_node-chunks/chunk-EX6XKYQU.js +196 -0
- package/dist/_node-chunks/chunk-Q4AUMUWJ.js +168 -0
- package/dist/_node-chunks/mdx-plugin-6YABNLL4.js +1032 -0
- package/dist/_node-chunks/rehype-external-links-FLP6Q4I3.js +121 -0
- package/dist/_node-chunks/{rehype-slug-NIZ5EZAF.js → rehype-slug-PEZLUBRN.js} +24 -58
- package/dist/angular/index.js +3 -5
- package/dist/blocks.d.ts +5 -2
- package/dist/blocks.js +4658 -6651
- package/dist/ember/index.js +3 -5
- package/dist/index.js +4 -6
- package/dist/manager.js +11 -22
- package/dist/mdx-loader.js +13 -19
- package/dist/preset.js +160 -453
- package/dist/preview.js +2 -2
- package/package.json +6 -6
- package/dist/_browser-chunks/Color-64QXVMR3.js +0 -1675
- package/dist/_browser-chunks/chunk-DMNQCVA2.js +0 -12
- package/dist/_browser-chunks/chunk-UZFOWTVP.js +0 -974
- package/dist/_browser-chunks/chunk-YDZYZRYC.js +0 -39
- package/dist/_node-chunks/chunk-45YQE7PZ.js +0 -36332
- package/dist/_node-chunks/chunk-BBLOWQ3W.js +0 -231
- package/dist/_node-chunks/chunk-P7HMFQCU.js +0 -248
- package/dist/_node-chunks/mdx-plugin-36DJJXJE.js +0 -1654
- package/dist/_node-chunks/rehype-external-links-AGP76D2N.js +0 -168
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_1ynzi6bba2j from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_1ynzi6bba2j from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_1ynzi6bba2j from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_1ynzi6bba2j.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_1ynzi6bba2j.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_1ynzi6bba2j.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./chunk-D527LDYX.js";
|
|
15
|
-
|
|
16
|
-
// ../../node_modules/unist-util-is/lib/index.js
|
|
17
|
-
var convert = (
|
|
18
|
-
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
19
|
-
/**
|
|
20
|
-
* @type {(
|
|
21
|
-
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
|
|
22
|
-
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
|
|
23
|
-
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
|
|
24
|
-
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
|
|
25
|
-
* ((test?: Test) => Check)
|
|
26
|
-
* )}
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* @param {Test} [test]
|
|
30
|
-
* @returns {Check}
|
|
31
|
-
*/
|
|
32
|
-
/* @__PURE__ */ __name(function(test) {
|
|
33
|
-
if (test === null || test === void 0) {
|
|
34
|
-
return ok;
|
|
35
|
-
}
|
|
36
|
-
if (typeof test === "function") {
|
|
37
|
-
return castFactory(test);
|
|
38
|
-
}
|
|
39
|
-
if (typeof test === "object") {
|
|
40
|
-
return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
|
|
41
|
-
}
|
|
42
|
-
if (typeof test === "string") {
|
|
43
|
-
return typeFactory(test);
|
|
44
|
-
}
|
|
45
|
-
throw new Error("Expected function, string, or object as test");
|
|
46
|
-
}, "convert")
|
|
47
|
-
);
|
|
48
|
-
function anyFactory(tests) {
|
|
49
|
-
const checks = [];
|
|
50
|
-
let index = -1;
|
|
51
|
-
while (++index < tests.length) {
|
|
52
|
-
checks[index] = convert(tests[index]);
|
|
53
|
-
}
|
|
54
|
-
return castFactory(any);
|
|
55
|
-
function any(...parameters) {
|
|
56
|
-
let index2 = -1;
|
|
57
|
-
while (++index2 < checks.length) {
|
|
58
|
-
if (checks[index2].apply(this, parameters)) return true;
|
|
59
|
-
}
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
__name(any, "any");
|
|
63
|
-
}
|
|
64
|
-
__name(anyFactory, "anyFactory");
|
|
65
|
-
function propsFactory(check) {
|
|
66
|
-
const checkAsRecord = (
|
|
67
|
-
/** @type {Record<string, unknown>} */
|
|
68
|
-
check
|
|
69
|
-
);
|
|
70
|
-
return castFactory(all);
|
|
71
|
-
function all(node) {
|
|
72
|
-
const nodeAsRecord = (
|
|
73
|
-
/** @type {Record<string, unknown>} */
|
|
74
|
-
/** @type {unknown} */
|
|
75
|
-
node
|
|
76
|
-
);
|
|
77
|
-
let key;
|
|
78
|
-
for (key in check) {
|
|
79
|
-
if (nodeAsRecord[key] !== checkAsRecord[key]) return false;
|
|
80
|
-
}
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
__name(all, "all");
|
|
84
|
-
}
|
|
85
|
-
__name(propsFactory, "propsFactory");
|
|
86
|
-
function typeFactory(check) {
|
|
87
|
-
return castFactory(type);
|
|
88
|
-
function type(node) {
|
|
89
|
-
return node && node.type === check;
|
|
90
|
-
}
|
|
91
|
-
__name(type, "type");
|
|
92
|
-
}
|
|
93
|
-
__name(typeFactory, "typeFactory");
|
|
94
|
-
function castFactory(testFunction) {
|
|
95
|
-
return check;
|
|
96
|
-
function check(value, index, parent) {
|
|
97
|
-
return Boolean(
|
|
98
|
-
looksLikeANode(value) && testFunction.call(
|
|
99
|
-
this,
|
|
100
|
-
value,
|
|
101
|
-
typeof index === "number" ? index : void 0,
|
|
102
|
-
parent || void 0
|
|
103
|
-
)
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
__name(check, "check");
|
|
107
|
-
}
|
|
108
|
-
__name(castFactory, "castFactory");
|
|
109
|
-
function ok() {
|
|
110
|
-
return true;
|
|
111
|
-
}
|
|
112
|
-
__name(ok, "ok");
|
|
113
|
-
function looksLikeANode(value) {
|
|
114
|
-
return value !== null && typeof value === "object" && "type" in value;
|
|
115
|
-
}
|
|
116
|
-
__name(looksLikeANode, "looksLikeANode");
|
|
117
|
-
|
|
118
|
-
// ../../node_modules/unist-util-visit-parents/lib/color.node.js
|
|
119
|
-
function color(d) {
|
|
120
|
-
return "\x1B[33m" + d + "\x1B[39m";
|
|
121
|
-
}
|
|
122
|
-
__name(color, "color");
|
|
123
|
-
|
|
124
|
-
// ../../node_modules/unist-util-visit-parents/lib/index.js
|
|
125
|
-
var empty = [];
|
|
126
|
-
var CONTINUE = true;
|
|
127
|
-
var EXIT = false;
|
|
128
|
-
var SKIP = "skip";
|
|
129
|
-
function visitParents(tree, test, visitor, reverse) {
|
|
130
|
-
let check;
|
|
131
|
-
if (typeof test === "function" && typeof visitor !== "function") {
|
|
132
|
-
reverse = visitor;
|
|
133
|
-
visitor = test;
|
|
134
|
-
} else {
|
|
135
|
-
check = test;
|
|
136
|
-
}
|
|
137
|
-
const is2 = convert(check);
|
|
138
|
-
const step = reverse ? -1 : 1;
|
|
139
|
-
factory(tree, void 0, [])();
|
|
140
|
-
function factory(node, index, parents) {
|
|
141
|
-
const value = (
|
|
142
|
-
/** @type {Record<string, unknown>} */
|
|
143
|
-
node && typeof node === "object" ? node : {}
|
|
144
|
-
);
|
|
145
|
-
if (typeof value.type === "string") {
|
|
146
|
-
const name = (
|
|
147
|
-
// `hast`
|
|
148
|
-
typeof value.tagName === "string" ? value.tagName : (
|
|
149
|
-
// `xast`
|
|
150
|
-
typeof value.name === "string" ? value.name : void 0
|
|
151
|
-
)
|
|
152
|
-
);
|
|
153
|
-
Object.defineProperty(visit2, "name", {
|
|
154
|
-
value: "node (" + color(node.type + (name ? "<" + name + ">" : "")) + ")"
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
return visit2;
|
|
158
|
-
function visit2() {
|
|
159
|
-
let result = empty;
|
|
160
|
-
let subresult;
|
|
161
|
-
let offset;
|
|
162
|
-
let grandparents;
|
|
163
|
-
if (!test || is2(node, index, parents[parents.length - 1] || void 0)) {
|
|
164
|
-
result = toResult(visitor(node, parents));
|
|
165
|
-
if (result[0] === EXIT) {
|
|
166
|
-
return result;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
if ("children" in node && node.children) {
|
|
170
|
-
const nodeAsParent = (
|
|
171
|
-
/** @type {UnistParent} */
|
|
172
|
-
node
|
|
173
|
-
);
|
|
174
|
-
if (nodeAsParent.children && result[0] !== SKIP) {
|
|
175
|
-
offset = (reverse ? nodeAsParent.children.length : -1) + step;
|
|
176
|
-
grandparents = parents.concat(nodeAsParent);
|
|
177
|
-
while (offset > -1 && offset < nodeAsParent.children.length) {
|
|
178
|
-
const child = nodeAsParent.children[offset];
|
|
179
|
-
subresult = factory(child, offset, grandparents)();
|
|
180
|
-
if (subresult[0] === EXIT) {
|
|
181
|
-
return subresult;
|
|
182
|
-
}
|
|
183
|
-
offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return result;
|
|
188
|
-
}
|
|
189
|
-
__name(visit2, "visit");
|
|
190
|
-
}
|
|
191
|
-
__name(factory, "factory");
|
|
192
|
-
}
|
|
193
|
-
__name(visitParents, "visitParents");
|
|
194
|
-
function toResult(value) {
|
|
195
|
-
if (Array.isArray(value)) {
|
|
196
|
-
return value;
|
|
197
|
-
}
|
|
198
|
-
if (typeof value === "number") {
|
|
199
|
-
return [CONTINUE, value];
|
|
200
|
-
}
|
|
201
|
-
return value === null || value === void 0 ? empty : [value];
|
|
202
|
-
}
|
|
203
|
-
__name(toResult, "toResult");
|
|
204
|
-
|
|
205
|
-
// ../../node_modules/unist-util-visit/lib/index.js
|
|
206
|
-
function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
|
|
207
|
-
let reverse;
|
|
208
|
-
let test;
|
|
209
|
-
let visitor;
|
|
210
|
-
if (typeof testOrVisitor === "function" && typeof visitorOrReverse !== "function") {
|
|
211
|
-
test = void 0;
|
|
212
|
-
visitor = testOrVisitor;
|
|
213
|
-
reverse = visitorOrReverse;
|
|
214
|
-
} else {
|
|
215
|
-
test = testOrVisitor;
|
|
216
|
-
visitor = visitorOrReverse;
|
|
217
|
-
reverse = maybeReverse;
|
|
218
|
-
}
|
|
219
|
-
visitParents(tree, test, overload, reverse);
|
|
220
|
-
function overload(node, parents) {
|
|
221
|
-
const parent = parents[parents.length - 1];
|
|
222
|
-
const index = parent ? parent.children.indexOf(node) : void 0;
|
|
223
|
-
return visitor(node, index, parent);
|
|
224
|
-
}
|
|
225
|
-
__name(overload, "overload");
|
|
226
|
-
}
|
|
227
|
-
__name(visit, "visit");
|
|
228
|
-
|
|
229
|
-
export {
|
|
230
|
-
visit
|
|
231
|
-
};
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_1ynzi6bba2j from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_1ynzi6bba2j from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_1ynzi6bba2j from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_1ynzi6bba2j.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_1ynzi6bba2j.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_1ynzi6bba2j.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./chunk-D527LDYX.js";
|
|
15
|
-
|
|
16
|
-
// ../../node_modules/@ungap/structured-clone/esm/types.js
|
|
17
|
-
var VOID = -1;
|
|
18
|
-
var PRIMITIVE = 0;
|
|
19
|
-
var ARRAY = 1;
|
|
20
|
-
var OBJECT = 2;
|
|
21
|
-
var DATE = 3;
|
|
22
|
-
var REGEXP = 4;
|
|
23
|
-
var MAP = 5;
|
|
24
|
-
var SET = 6;
|
|
25
|
-
var ERROR = 7;
|
|
26
|
-
var BIGINT = 8;
|
|
27
|
-
|
|
28
|
-
// ../../node_modules/@ungap/structured-clone/esm/deserialize.js
|
|
29
|
-
var env = typeof self === "object" ? self : globalThis;
|
|
30
|
-
var deserializer = /* @__PURE__ */ __name(($, _) => {
|
|
31
|
-
const as = /* @__PURE__ */ __name((out, index) => {
|
|
32
|
-
$.set(index, out);
|
|
33
|
-
return out;
|
|
34
|
-
}, "as");
|
|
35
|
-
const unpair = /* @__PURE__ */ __name((index) => {
|
|
36
|
-
if ($.has(index))
|
|
37
|
-
return $.get(index);
|
|
38
|
-
const [type, value] = _[index];
|
|
39
|
-
switch (type) {
|
|
40
|
-
case PRIMITIVE:
|
|
41
|
-
case VOID:
|
|
42
|
-
return as(value, index);
|
|
43
|
-
case ARRAY: {
|
|
44
|
-
const arr = as([], index);
|
|
45
|
-
for (const index2 of value)
|
|
46
|
-
arr.push(unpair(index2));
|
|
47
|
-
return arr;
|
|
48
|
-
}
|
|
49
|
-
case OBJECT: {
|
|
50
|
-
const object = as({}, index);
|
|
51
|
-
for (const [key, index2] of value)
|
|
52
|
-
object[unpair(key)] = unpair(index2);
|
|
53
|
-
return object;
|
|
54
|
-
}
|
|
55
|
-
case DATE:
|
|
56
|
-
return as(new Date(value), index);
|
|
57
|
-
case REGEXP: {
|
|
58
|
-
const { source, flags } = value;
|
|
59
|
-
return as(new RegExp(source, flags), index);
|
|
60
|
-
}
|
|
61
|
-
case MAP: {
|
|
62
|
-
const map = as(/* @__PURE__ */ new Map(), index);
|
|
63
|
-
for (const [key, index2] of value)
|
|
64
|
-
map.set(unpair(key), unpair(index2));
|
|
65
|
-
return map;
|
|
66
|
-
}
|
|
67
|
-
case SET: {
|
|
68
|
-
const set = as(/* @__PURE__ */ new Set(), index);
|
|
69
|
-
for (const index2 of value)
|
|
70
|
-
set.add(unpair(index2));
|
|
71
|
-
return set;
|
|
72
|
-
}
|
|
73
|
-
case ERROR: {
|
|
74
|
-
const { name, message } = value;
|
|
75
|
-
return as(new env[name](message), index);
|
|
76
|
-
}
|
|
77
|
-
case BIGINT:
|
|
78
|
-
return as(BigInt(value), index);
|
|
79
|
-
case "BigInt":
|
|
80
|
-
return as(Object(BigInt(value)), index);
|
|
81
|
-
case "ArrayBuffer":
|
|
82
|
-
return as(new Uint8Array(value).buffer, value);
|
|
83
|
-
case "DataView": {
|
|
84
|
-
const { buffer } = new Uint8Array(value);
|
|
85
|
-
return as(new DataView(buffer), value);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return as(new env[type](value), index);
|
|
89
|
-
}, "unpair");
|
|
90
|
-
return unpair;
|
|
91
|
-
}, "deserializer");
|
|
92
|
-
var deserialize = /* @__PURE__ */ __name((serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0), "deserialize");
|
|
93
|
-
|
|
94
|
-
// ../../node_modules/@ungap/structured-clone/esm/serialize.js
|
|
95
|
-
var EMPTY = "";
|
|
96
|
-
var { toString } = {};
|
|
97
|
-
var { keys } = Object;
|
|
98
|
-
var typeOf = /* @__PURE__ */ __name((value) => {
|
|
99
|
-
const type = typeof value;
|
|
100
|
-
if (type !== "object" || !value)
|
|
101
|
-
return [PRIMITIVE, type];
|
|
102
|
-
const asString = toString.call(value).slice(8, -1);
|
|
103
|
-
switch (asString) {
|
|
104
|
-
case "Array":
|
|
105
|
-
return [ARRAY, EMPTY];
|
|
106
|
-
case "Object":
|
|
107
|
-
return [OBJECT, EMPTY];
|
|
108
|
-
case "Date":
|
|
109
|
-
return [DATE, EMPTY];
|
|
110
|
-
case "RegExp":
|
|
111
|
-
return [REGEXP, EMPTY];
|
|
112
|
-
case "Map":
|
|
113
|
-
return [MAP, EMPTY];
|
|
114
|
-
case "Set":
|
|
115
|
-
return [SET, EMPTY];
|
|
116
|
-
case "DataView":
|
|
117
|
-
return [ARRAY, asString];
|
|
118
|
-
}
|
|
119
|
-
if (asString.includes("Array"))
|
|
120
|
-
return [ARRAY, asString];
|
|
121
|
-
if (asString.includes("Error"))
|
|
122
|
-
return [ERROR, asString];
|
|
123
|
-
return [OBJECT, asString];
|
|
124
|
-
}, "typeOf");
|
|
125
|
-
var shouldSkip = /* @__PURE__ */ __name(([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol"), "shouldSkip");
|
|
126
|
-
var serializer = /* @__PURE__ */ __name((strict, json, $, _) => {
|
|
127
|
-
const as = /* @__PURE__ */ __name((out, value) => {
|
|
128
|
-
const index = _.push(out) - 1;
|
|
129
|
-
$.set(value, index);
|
|
130
|
-
return index;
|
|
131
|
-
}, "as");
|
|
132
|
-
const pair = /* @__PURE__ */ __name((value) => {
|
|
133
|
-
if ($.has(value))
|
|
134
|
-
return $.get(value);
|
|
135
|
-
let [TYPE, type] = typeOf(value);
|
|
136
|
-
switch (TYPE) {
|
|
137
|
-
case PRIMITIVE: {
|
|
138
|
-
let entry = value;
|
|
139
|
-
switch (type) {
|
|
140
|
-
case "bigint":
|
|
141
|
-
TYPE = BIGINT;
|
|
142
|
-
entry = value.toString();
|
|
143
|
-
break;
|
|
144
|
-
case "function":
|
|
145
|
-
case "symbol":
|
|
146
|
-
if (strict)
|
|
147
|
-
throw new TypeError("unable to serialize " + type);
|
|
148
|
-
entry = null;
|
|
149
|
-
break;
|
|
150
|
-
case "undefined":
|
|
151
|
-
return as([VOID], value);
|
|
152
|
-
}
|
|
153
|
-
return as([TYPE, entry], value);
|
|
154
|
-
}
|
|
155
|
-
case ARRAY: {
|
|
156
|
-
if (type) {
|
|
157
|
-
let spread = value;
|
|
158
|
-
if (type === "DataView") {
|
|
159
|
-
spread = new Uint8Array(value.buffer);
|
|
160
|
-
} else if (type === "ArrayBuffer") {
|
|
161
|
-
spread = new Uint8Array(value);
|
|
162
|
-
}
|
|
163
|
-
return as([type, [...spread]], value);
|
|
164
|
-
}
|
|
165
|
-
const arr = [];
|
|
166
|
-
const index = as([TYPE, arr], value);
|
|
167
|
-
for (const entry of value)
|
|
168
|
-
arr.push(pair(entry));
|
|
169
|
-
return index;
|
|
170
|
-
}
|
|
171
|
-
case OBJECT: {
|
|
172
|
-
if (type) {
|
|
173
|
-
switch (type) {
|
|
174
|
-
case "BigInt":
|
|
175
|
-
return as([type, value.toString()], value);
|
|
176
|
-
case "Boolean":
|
|
177
|
-
case "Number":
|
|
178
|
-
case "String":
|
|
179
|
-
return as([type, value.valueOf()], value);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
if (json && "toJSON" in value)
|
|
183
|
-
return pair(value.toJSON());
|
|
184
|
-
const entries = [];
|
|
185
|
-
const index = as([TYPE, entries], value);
|
|
186
|
-
for (const key of keys(value)) {
|
|
187
|
-
if (strict || !shouldSkip(typeOf(value[key])))
|
|
188
|
-
entries.push([pair(key), pair(value[key])]);
|
|
189
|
-
}
|
|
190
|
-
return index;
|
|
191
|
-
}
|
|
192
|
-
case DATE:
|
|
193
|
-
return as([TYPE, value.toISOString()], value);
|
|
194
|
-
case REGEXP: {
|
|
195
|
-
const { source, flags } = value;
|
|
196
|
-
return as([TYPE, { source, flags }], value);
|
|
197
|
-
}
|
|
198
|
-
case MAP: {
|
|
199
|
-
const entries = [];
|
|
200
|
-
const index = as([TYPE, entries], value);
|
|
201
|
-
for (const [key, entry] of value) {
|
|
202
|
-
if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
|
|
203
|
-
entries.push([pair(key), pair(entry)]);
|
|
204
|
-
}
|
|
205
|
-
return index;
|
|
206
|
-
}
|
|
207
|
-
case SET: {
|
|
208
|
-
const entries = [];
|
|
209
|
-
const index = as([TYPE, entries], value);
|
|
210
|
-
for (const entry of value) {
|
|
211
|
-
if (strict || !shouldSkip(typeOf(entry)))
|
|
212
|
-
entries.push(pair(entry));
|
|
213
|
-
}
|
|
214
|
-
return index;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
const { message } = value;
|
|
218
|
-
return as([TYPE, { name: type, message }], value);
|
|
219
|
-
}, "pair");
|
|
220
|
-
return pair;
|
|
221
|
-
}, "serializer");
|
|
222
|
-
var serialize = /* @__PURE__ */ __name((value, { json, lossy } = {}) => {
|
|
223
|
-
const _ = [];
|
|
224
|
-
return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
|
|
225
|
-
}, "serialize");
|
|
226
|
-
|
|
227
|
-
// ../../node_modules/@ungap/structured-clone/esm/index.js
|
|
228
|
-
var esm_default = typeof structuredClone === "function" ? (
|
|
229
|
-
/* c8 ignore start */
|
|
230
|
-
(any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any)
|
|
231
|
-
) : (any, options) => deserialize(serialize(any, options));
|
|
232
|
-
|
|
233
|
-
// ../../node_modules/space-separated-tokens/index.js
|
|
234
|
-
function parse(value) {
|
|
235
|
-
const input = String(value || "").trim();
|
|
236
|
-
return input ? input.split(/[ \t\n\r\f]+/g) : [];
|
|
237
|
-
}
|
|
238
|
-
__name(parse, "parse");
|
|
239
|
-
function stringify(values) {
|
|
240
|
-
return values.join(" ").trim();
|
|
241
|
-
}
|
|
242
|
-
__name(stringify, "stringify");
|
|
243
|
-
|
|
244
|
-
export {
|
|
245
|
-
esm_default,
|
|
246
|
-
parse,
|
|
247
|
-
stringify
|
|
248
|
-
};
|