@storybook/addon-docs 10.1.0-alpha.1 → 10.1.0-alpha.11

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.
Files changed (34) hide show
  1. package/dist/_browser-chunks/Color-S5NAVK5F.js +1096 -0
  2. package/dist/_browser-chunks/{DocsRenderer-HT7GNKAR.js → DocsRenderer-GHJI37HO.js} +2 -2
  3. package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
  4. package/dist/_browser-chunks/chunk-CYSK6WYR.js +7 -0
  5. package/dist/_browser-chunks/chunk-DDRHE7EB.js +949 -0
  6. package/dist/_browser-chunks/{chunk-74ZUTOZN.js → chunk-OATZR77O.js} +9 -22
  7. package/dist/_browser-chunks/chunk-UUESKCKV.js +31 -0
  8. package/dist/_node-chunks/chunk-CRYBIEDD.js +168 -0
  9. package/dist/_node-chunks/{chunk-ZUONB4NC.js → chunk-ETYU6ZWB.js} +13 -19
  10. package/dist/_node-chunks/chunk-PF5AWRIF.js +22630 -0
  11. package/dist/_node-chunks/chunk-ZRMSQWBE.js +196 -0
  12. package/dist/_node-chunks/mdx-plugin-655B5P4B.js +1032 -0
  13. package/dist/_node-chunks/rehype-external-links-V53KQFON.js +121 -0
  14. package/dist/_node-chunks/{rehype-slug-BU5JP743.js → rehype-slug-GNVPIIPH.js} +24 -58
  15. package/dist/angular/index.js +3 -5
  16. package/dist/blocks.d.ts +5 -2
  17. package/dist/blocks.js +4660 -6643
  18. package/dist/ember/index.js +3 -5
  19. package/dist/index.d.ts +8 -1
  20. package/dist/index.js +4 -6
  21. package/dist/manager.js +11 -22
  22. package/dist/mdx-loader.js +13 -19
  23. package/dist/preset.js +161 -454
  24. package/dist/preview.js +2 -2
  25. package/package.json +6 -6
  26. package/dist/_browser-chunks/Color-64QXVMR3.js +0 -1675
  27. package/dist/_browser-chunks/chunk-DMNQCVA2.js +0 -12
  28. package/dist/_browser-chunks/chunk-UZFOWTVP.js +0 -974
  29. package/dist/_browser-chunks/chunk-YDZYZRYC.js +0 -39
  30. package/dist/_node-chunks/chunk-AV2VT7UZ.js +0 -231
  31. package/dist/_node-chunks/chunk-SD2N3D7I.js +0 -36332
  32. package/dist/_node-chunks/chunk-Z4H2MKFK.js +0 -248
  33. package/dist/_node-chunks/mdx-plugin-2AVHNGP4.js +0 -1654
  34. package/dist/_node-chunks/rehype-external-links-4APV7Y23.js +0 -168
@@ -1,168 +0,0 @@
1
- import CJS_COMPAT_NODE_URL_8xvp5b3rljg from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8xvp5b3rljg from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8xvp5b3rljg from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_8xvp5b3rljg.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8xvp5b3rljg.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8xvp5b3rljg.createRequire(import.meta.url);
8
-
9
- // ------------------------------------------------------------
10
- // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
- // ------------------------------------------------------------
12
- import {
13
- esm_default,
14
- parse
15
- } from "./chunk-Z4H2MKFK.js";
16
- import {
17
- visit
18
- } from "./chunk-AV2VT7UZ.js";
19
- import {
20
- __name
21
- } from "./chunk-ZUONB4NC.js";
22
-
23
- // ../../node_modules/hast-util-is-element/lib/index.js
24
- var convertElement = (
25
- // Note: overloads in JSDoc can’t yet use different `@template`s.
26
- /**
27
- * @type {(
28
- * (<Condition extends TestFunction>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &
29
- * (<Condition extends string>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &
30
- * ((test?: null | undefined) => (element?: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &
31
- * ((test?: Test) => Check)
32
- * )}
33
- */
34
- /**
35
- * @param {Test | null | undefined} [test]
36
- * @returns {Check}
37
- */
38
- /* @__PURE__ */ __name(function(test) {
39
- if (test === null || test === void 0) {
40
- return element;
41
- }
42
- if (typeof test === "string") {
43
- return tagNameFactory(test);
44
- }
45
- if (typeof test === "object") {
46
- return anyFactory(test);
47
- }
48
- if (typeof test === "function") {
49
- return castFactory(test);
50
- }
51
- throw new Error("Expected function, string, or array as `test`");
52
- }, "convertElement")
53
- );
54
- function anyFactory(tests) {
55
- const checks = [];
56
- let index = -1;
57
- while (++index < tests.length) {
58
- checks[index] = convertElement(tests[index]);
59
- }
60
- return castFactory(any);
61
- function any(...parameters) {
62
- let index2 = -1;
63
- while (++index2 < checks.length) {
64
- if (checks[index2].apply(this, parameters)) return true;
65
- }
66
- return false;
67
- }
68
- __name(any, "any");
69
- }
70
- __name(anyFactory, "anyFactory");
71
- function tagNameFactory(check) {
72
- return castFactory(tagName);
73
- function tagName(element2) {
74
- return element2.tagName === check;
75
- }
76
- __name(tagName, "tagName");
77
- }
78
- __name(tagNameFactory, "tagNameFactory");
79
- function castFactory(testFunction) {
80
- return check;
81
- function check(value, index, parent) {
82
- return Boolean(
83
- looksLikeAnElement(value) && testFunction.call(
84
- this,
85
- value,
86
- typeof index === "number" ? index : void 0,
87
- parent || void 0
88
- )
89
- );
90
- }
91
- __name(check, "check");
92
- }
93
- __name(castFactory, "castFactory");
94
- function element(element2) {
95
- return Boolean(
96
- element2 && typeof element2 === "object" && "type" in element2 && element2.type === "element" && "tagName" in element2 && typeof element2.tagName === "string"
97
- );
98
- }
99
- __name(element, "element");
100
- function looksLikeAnElement(value) {
101
- return value !== null && typeof value === "object" && "type" in value && "tagName" in value;
102
- }
103
- __name(looksLikeAnElement, "looksLikeAnElement");
104
-
105
- // ../../node_modules/is-absolute-url/index.js
106
- var ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
107
- var WINDOWS_PATH_REGEX = /^[a-zA-Z]:\\/;
108
- function isAbsoluteUrl(url) {
109
- if (typeof url !== "string") {
110
- throw new TypeError(`Expected a \`string\`, got \`${typeof url}\``);
111
- }
112
- if (WINDOWS_PATH_REGEX.test(url)) {
113
- return false;
114
- }
115
- return ABSOLUTE_URL_REGEX.test(url);
116
- }
117
- __name(isAbsoluteUrl, "isAbsoluteUrl");
118
-
119
- // ../../node_modules/rehype-external-links/lib/index.js
120
- var defaultProtocols = ["http", "https"];
121
- var defaultRel = ["nofollow"];
122
- var emptyOptions = {};
123
- function rehypeExternalLinks(options) {
124
- const settings = options || emptyOptions;
125
- const protocols = settings.protocols || defaultProtocols;
126
- const is = convertElement(settings.test);
127
- return function(tree) {
128
- visit(tree, "element", function(node, index, parent) {
129
- if (node.tagName === "a" && typeof node.properties.href === "string" && is(node, index, parent)) {
130
- const url = node.properties.href;
131
- if (isAbsoluteUrl(url) ? protocols.includes(url.slice(0, url.indexOf(":"))) : url.startsWith("//")) {
132
- const contentRaw = createIfNeeded(settings.content, node);
133
- const content = contentRaw && !Array.isArray(contentRaw) ? [contentRaw] : contentRaw;
134
- const relRaw = createIfNeeded(settings.rel, node) || defaultRel;
135
- const rel = typeof relRaw === "string" ? parse(relRaw) : relRaw;
136
- const target = createIfNeeded(settings.target, node);
137
- const properties = createIfNeeded(settings.properties, node);
138
- if (properties) {
139
- Object.assign(node.properties, esm_default(properties));
140
- }
141
- if (rel.length > 0) {
142
- node.properties.rel = [...rel];
143
- }
144
- if (target) {
145
- node.properties.target = target;
146
- }
147
- if (content) {
148
- const properties2 = createIfNeeded(settings.contentProperties, node) || {};
149
- node.children.push({
150
- type: "element",
151
- tagName: "span",
152
- properties: esm_default(properties2),
153
- children: esm_default(content)
154
- });
155
- }
156
- }
157
- }
158
- });
159
- };
160
- }
161
- __name(rehypeExternalLinks, "rehypeExternalLinks");
162
- function createIfNeeded(value, element2) {
163
- return typeof value === "function" ? value(element2) : value;
164
- }
165
- __name(createIfNeeded, "createIfNeeded");
166
- export {
167
- rehypeExternalLinks as default
168
- };