@repobuddy/storybook 2.1.0 → 2.1.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/esm/index.js CHANGED
@@ -1,254 +1,14 @@
1
1
  import { isRunningInTest } from "@repobuddy/test";
2
2
  import { prettify } from "htmlfy";
3
3
  import { useEffect, useState } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
4
5
  import { SyntaxHighlighter } from "storybook/internal/components";
5
6
  import { addons } from "storybook/preview-api";
6
7
  import { ThemeProvider, convert, themes } from "storybook/theming";
7
8
 
8
9
  export * from "@repobuddy/test"
9
10
 
10
- //#region rolldown:runtime
11
- var __create = Object.create;
12
- var __defProp = Object.defineProperty;
13
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
14
- var __getOwnPropNames = Object.getOwnPropertyNames;
15
- var __getProtoOf = Object.getPrototypeOf;
16
- var __hasOwnProp = Object.prototype.hasOwnProperty;
17
- var __commonJS = (cb, mod) => function() {
18
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
19
- };
20
- var __copyProps = (to, from, except, desc) => {
21
- if (from && typeof from === "object" || typeof from === "function") {
22
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
23
- key = keys[i];
24
- if (!__hasOwnProp.call(to, key) && key !== except) {
25
- __defProp(to, key, {
26
- get: ((k) => from[k]).bind(null, key),
27
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
28
- });
29
- }
30
- }
31
- }
32
- return to;
33
- };
34
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
35
- value: mod,
36
- enumerable: true
37
- }) : target, mod));
38
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
39
- if (typeof require !== "undefined") return require.apply(this, arguments);
40
- throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function.");
41
- });
42
-
43
- //#endregion
44
- //#region ../../node_modules/.pnpm/react@19.2.0/node_modules/react/cjs/react-jsx-runtime.development.js
45
- /**
46
- * @license React
47
- * react-jsx-runtime.development.js
48
- *
49
- * Copyright (c) Meta Platforms, Inc. and affiliates.
50
- *
51
- * This source code is licensed under the MIT license found in the
52
- * LICENSE file in the root directory of this source tree.
53
- */
54
- var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/react@19.2.0/node_modules/react/cjs/react-jsx-runtime.development.js": ((exports) => {
55
- (function() {
56
- function getComponentNameFromType(type) {
57
- if (null == type) return null;
58
- if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
59
- if ("string" === typeof type) return type;
60
- switch (type) {
61
- case REACT_FRAGMENT_TYPE: return "Fragment";
62
- case REACT_PROFILER_TYPE: return "Profiler";
63
- case REACT_STRICT_MODE_TYPE: return "StrictMode";
64
- case REACT_SUSPENSE_TYPE: return "Suspense";
65
- case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
66
- case REACT_ACTIVITY_TYPE: return "Activity";
67
- }
68
- if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
69
- case REACT_PORTAL_TYPE: return "Portal";
70
- case REACT_CONTEXT_TYPE: return type.displayName || "Context";
71
- case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer";
72
- case REACT_FORWARD_REF_TYPE:
73
- var innerType = type.render;
74
- type = type.displayName;
75
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
76
- return type;
77
- case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
78
- case REACT_LAZY_TYPE:
79
- innerType = type._payload;
80
- type = type._init;
81
- try {
82
- return getComponentNameFromType(type(innerType));
83
- } catch (x) {}
84
- }
85
- return null;
86
- }
87
- function testStringCoercion(value) {
88
- return "" + value;
89
- }
90
- function checkKeyStringCoercion(value) {
91
- try {
92
- testStringCoercion(value);
93
- var JSCompiler_inline_result = !1;
94
- } catch (e) {
95
- JSCompiler_inline_result = !0;
96
- }
97
- if (JSCompiler_inline_result) {
98
- JSCompiler_inline_result = console;
99
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
100
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
101
- JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
102
- return testStringCoercion(value);
103
- }
104
- }
105
- function getTaskName(type) {
106
- if (type === REACT_FRAGMENT_TYPE) return "<>";
107
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
108
- try {
109
- var name = getComponentNameFromType(type);
110
- return name ? "<" + name + ">" : "<...>";
111
- } catch (x) {
112
- return "<...>";
113
- }
114
- }
115
- function getOwner() {
116
- var dispatcher = ReactSharedInternals.A;
117
- return null === dispatcher ? null : dispatcher.getOwner();
118
- }
119
- function UnknownOwner() {
120
- return Error("react-stack-top-frame");
121
- }
122
- function hasValidKey(config) {
123
- if (hasOwnProperty.call(config, "key")) {
124
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
125
- if (getter && getter.isReactWarning) return !1;
126
- }
127
- return void 0 !== config.key;
128
- }
129
- function defineKeyPropWarningGetter(props, displayName) {
130
- function warnAboutAccessingKey() {
131
- specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
132
- }
133
- warnAboutAccessingKey.isReactWarning = !0;
134
- Object.defineProperty(props, "key", {
135
- get: warnAboutAccessingKey,
136
- configurable: !0
137
- });
138
- }
139
- function elementRefGetterWithDeprecationWarning() {
140
- var componentName = getComponentNameFromType(this.type);
141
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
142
- componentName = this.props.ref;
143
- return void 0 !== componentName ? componentName : null;
144
- }
145
- function ReactElement(type, key, props, owner, debugStack, debugTask) {
146
- var refProp = props.ref;
147
- type = {
148
- $$typeof: REACT_ELEMENT_TYPE,
149
- type,
150
- key,
151
- props,
152
- _owner: owner
153
- };
154
- null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
155
- enumerable: !1,
156
- get: elementRefGetterWithDeprecationWarning
157
- }) : Object.defineProperty(type, "ref", {
158
- enumerable: !1,
159
- value: null
160
- });
161
- type._store = {};
162
- Object.defineProperty(type._store, "validated", {
163
- configurable: !1,
164
- enumerable: !1,
165
- writable: !0,
166
- value: 0
167
- });
168
- Object.defineProperty(type, "_debugInfo", {
169
- configurable: !1,
170
- enumerable: !1,
171
- writable: !0,
172
- value: null
173
- });
174
- Object.defineProperty(type, "_debugStack", {
175
- configurable: !1,
176
- enumerable: !1,
177
- writable: !0,
178
- value: debugStack
179
- });
180
- Object.defineProperty(type, "_debugTask", {
181
- configurable: !1,
182
- enumerable: !1,
183
- writable: !0,
184
- value: debugTask
185
- });
186
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
187
- return type;
188
- }
189
- function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
190
- var children = config.children;
191
- if (void 0 !== children) if (isStaticChildren) if (isArrayImpl(children)) {
192
- for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++) validateChildKeys(children[isStaticChildren]);
193
- Object.freeze && Object.freeze(children);
194
- } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
195
- else validateChildKeys(children);
196
- if (hasOwnProperty.call(config, "key")) {
197
- children = getComponentNameFromType(type);
198
- var keys = Object.keys(config).filter(function(k) {
199
- return "key" !== k;
200
- });
201
- isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
202
- didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = !0);
203
- }
204
- children = null;
205
- void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
206
- hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
207
- if ("key" in config) {
208
- maybeKey = {};
209
- for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
210
- } else maybeKey = config;
211
- children && defineKeyPropWarningGetter(maybeKey, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
212
- return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
213
- }
214
- function validateChildKeys(node) {
215
- isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
216
- }
217
- function isValidElement(object) {
218
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
219
- }
220
- var React = __require("react"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
221
- return null;
222
- };
223
- React = { react_stack_bottom_frame: function(callStackForError) {
224
- return callStackForError();
225
- } };
226
- var specialPropKeyWarningShown;
227
- var didWarnAboutElementRef = {};
228
- var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
229
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
230
- var didWarnAboutKeySpread = {};
231
- exports.Fragment = REACT_FRAGMENT_TYPE;
232
- exports.jsx = function(type, config, maybeKey) {
233
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
234
- return jsxDEVImpl(type, config, maybeKey, !1, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
235
- };
236
- exports.jsxs = function(type, config, maybeKey) {
237
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
238
- return jsxDEVImpl(type, config, maybeKey, !0, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
239
- };
240
- })();
241
- }) });
242
-
243
- //#endregion
244
- //#region ../../node_modules/.pnpm/react@19.2.0/node_modules/react/jsx-runtime.js
245
- var require_jsx_runtime = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/react@19.2.0/node_modules/react/jsx-runtime.js": ((exports, module) => {
246
- module.exports = require_react_jsx_runtime_development();
247
- }) });
248
-
249
- //#endregion
250
11
  //#region src/components/show_html.tsx
251
- var import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime());
252
12
  /**
253
13
  * A component that displays the HTML of a subject element.
254
14
  * Uses `htmlfy` internally to format and prettify the HTML output.
@@ -268,7 +28,7 @@ function ShowHtml({ selector = "[data-testid=\"subject\"]", config, ...props })
268
28
  }));
269
29
  else setHtml("No subject found");
270
30
  }, [selector]);
271
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
31
+ return /* @__PURE__ */ jsx("pre", {
272
32
  ...props,
273
33
  children: html
274
34
  });
@@ -290,18 +50,18 @@ function showDocSource() {
290
50
  channel.on("DARK_MODE", setIsDark);
291
51
  return () => channel.off("DARK_MODE", setIsDark);
292
52
  }, []);
293
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeProvider, {
53
+ return /* @__PURE__ */ jsx(ThemeProvider, {
294
54
  theme: convert(docs?.theme ?? (isDark ? themes.dark : themes.light)),
295
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
55
+ children: /* @__PURE__ */ jsxs("section", {
296
56
  style: {
297
57
  display: "flex",
298
58
  flexDirection: "column",
299
59
  gap: "1rem"
300
60
  },
301
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SyntaxHighlighter, {
61
+ children: [/* @__PURE__ */ jsx(SyntaxHighlighter, {
302
62
  language: docs?.source?.language,
303
63
  children: docs?.source?.code
304
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Story, {})]
64
+ }), /* @__PURE__ */ jsx(Story, {})]
305
65
  })
306
66
  });
307
67
  };
@@ -483,7 +243,7 @@ const ctx = { isRunningInTest };
483
243
  */
484
244
  function whenRunningInTest(decoratorOrHandler) {
485
245
  return function RunInTest(Story, context) {
486
- return ctx.isRunningInTest() ? decoratorOrHandler(Story, context) ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Story, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Story, {});
246
+ return ctx.isRunningInTest() ? decoratorOrHandler(Story, context) ?? /* @__PURE__ */ jsx(Story, {}) : /* @__PURE__ */ jsx(Story, {});
487
247
  };
488
248
  }
489
249
 
@@ -1,8 +1,8 @@
1
1
  import { DocsContextProps } from "@storybook/addon-docs/blocks";
2
2
  import { PropsWithChildren } from "react";
3
3
  import { ThemeVars } from "storybook/theming";
4
- import { CSSProperties } from "@just-web/css";
5
4
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
+ import { CSSProperties } from "@just-web/css";
6
6
  import { DecoratorFunction } from "storybook/internal/types";
7
7
 
8
8
  //#region src/storybook-dark-mode/dark_mode_docs_container.d.ts
@@ -2,250 +2,10 @@ import { DARK_MODE_EVENT_NAME, useDarkMode } from "@storybook-community/storyboo
2
2
  import { DocsContainer } from "@storybook/addon-docs/blocks";
3
3
  import { useEffect, useState } from "react";
4
4
  import { themes } from "storybook/theming";
5
+ import { jsx } from "react/jsx-runtime";
5
6
  import { toDOMStyle } from "@just-web/css";
6
7
 
7
- //#region rolldown:runtime
8
- var __create = Object.create;
9
- var __defProp = Object.defineProperty;
10
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
- var __getOwnPropNames = Object.getOwnPropertyNames;
12
- var __getProtoOf = Object.getPrototypeOf;
13
- var __hasOwnProp = Object.prototype.hasOwnProperty;
14
- var __commonJS = (cb, mod) => function() {
15
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
- };
17
- var __copyProps = (to, from, except, desc) => {
18
- if (from && typeof from === "object" || typeof from === "function") {
19
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
20
- key = keys[i];
21
- if (!__hasOwnProp.call(to, key) && key !== except) {
22
- __defProp(to, key, {
23
- get: ((k) => from[k]).bind(null, key),
24
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
25
- });
26
- }
27
- }
28
- }
29
- return to;
30
- };
31
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
32
- value: mod,
33
- enumerable: true
34
- }) : target, mod));
35
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
36
- if (typeof require !== "undefined") return require.apply(this, arguments);
37
- throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function.");
38
- });
39
-
40
- //#endregion
41
- //#region ../../node_modules/.pnpm/react@19.2.0/node_modules/react/cjs/react-jsx-runtime.development.js
42
- /**
43
- * @license React
44
- * react-jsx-runtime.development.js
45
- *
46
- * Copyright (c) Meta Platforms, Inc. and affiliates.
47
- *
48
- * This source code is licensed under the MIT license found in the
49
- * LICENSE file in the root directory of this source tree.
50
- */
51
- var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/react@19.2.0/node_modules/react/cjs/react-jsx-runtime.development.js": ((exports) => {
52
- (function() {
53
- function getComponentNameFromType(type) {
54
- if (null == type) return null;
55
- if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
56
- if ("string" === typeof type) return type;
57
- switch (type) {
58
- case REACT_FRAGMENT_TYPE: return "Fragment";
59
- case REACT_PROFILER_TYPE: return "Profiler";
60
- case REACT_STRICT_MODE_TYPE: return "StrictMode";
61
- case REACT_SUSPENSE_TYPE: return "Suspense";
62
- case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
63
- case REACT_ACTIVITY_TYPE: return "Activity";
64
- }
65
- if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
66
- case REACT_PORTAL_TYPE: return "Portal";
67
- case REACT_CONTEXT_TYPE: return type.displayName || "Context";
68
- case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer";
69
- case REACT_FORWARD_REF_TYPE:
70
- var innerType = type.render;
71
- type = type.displayName;
72
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
73
- return type;
74
- case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
75
- case REACT_LAZY_TYPE:
76
- innerType = type._payload;
77
- type = type._init;
78
- try {
79
- return getComponentNameFromType(type(innerType));
80
- } catch (x) {}
81
- }
82
- return null;
83
- }
84
- function testStringCoercion(value) {
85
- return "" + value;
86
- }
87
- function checkKeyStringCoercion(value) {
88
- try {
89
- testStringCoercion(value);
90
- var JSCompiler_inline_result = !1;
91
- } catch (e) {
92
- JSCompiler_inline_result = !0;
93
- }
94
- if (JSCompiler_inline_result) {
95
- JSCompiler_inline_result = console;
96
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
97
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
98
- JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
99
- return testStringCoercion(value);
100
- }
101
- }
102
- function getTaskName(type) {
103
- if (type === REACT_FRAGMENT_TYPE) return "<>";
104
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
105
- try {
106
- var name = getComponentNameFromType(type);
107
- return name ? "<" + name + ">" : "<...>";
108
- } catch (x) {
109
- return "<...>";
110
- }
111
- }
112
- function getOwner() {
113
- var dispatcher = ReactSharedInternals.A;
114
- return null === dispatcher ? null : dispatcher.getOwner();
115
- }
116
- function UnknownOwner() {
117
- return Error("react-stack-top-frame");
118
- }
119
- function hasValidKey(config) {
120
- if (hasOwnProperty.call(config, "key")) {
121
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
122
- if (getter && getter.isReactWarning) return !1;
123
- }
124
- return void 0 !== config.key;
125
- }
126
- function defineKeyPropWarningGetter(props, displayName) {
127
- function warnAboutAccessingKey() {
128
- specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
129
- }
130
- warnAboutAccessingKey.isReactWarning = !0;
131
- Object.defineProperty(props, "key", {
132
- get: warnAboutAccessingKey,
133
- configurable: !0
134
- });
135
- }
136
- function elementRefGetterWithDeprecationWarning() {
137
- var componentName = getComponentNameFromType(this.type);
138
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
139
- componentName = this.props.ref;
140
- return void 0 !== componentName ? componentName : null;
141
- }
142
- function ReactElement(type, key, props, owner, debugStack, debugTask) {
143
- var refProp = props.ref;
144
- type = {
145
- $$typeof: REACT_ELEMENT_TYPE,
146
- type,
147
- key,
148
- props,
149
- _owner: owner
150
- };
151
- null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
152
- enumerable: !1,
153
- get: elementRefGetterWithDeprecationWarning
154
- }) : Object.defineProperty(type, "ref", {
155
- enumerable: !1,
156
- value: null
157
- });
158
- type._store = {};
159
- Object.defineProperty(type._store, "validated", {
160
- configurable: !1,
161
- enumerable: !1,
162
- writable: !0,
163
- value: 0
164
- });
165
- Object.defineProperty(type, "_debugInfo", {
166
- configurable: !1,
167
- enumerable: !1,
168
- writable: !0,
169
- value: null
170
- });
171
- Object.defineProperty(type, "_debugStack", {
172
- configurable: !1,
173
- enumerable: !1,
174
- writable: !0,
175
- value: debugStack
176
- });
177
- Object.defineProperty(type, "_debugTask", {
178
- configurable: !1,
179
- enumerable: !1,
180
- writable: !0,
181
- value: debugTask
182
- });
183
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
184
- return type;
185
- }
186
- function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
187
- var children = config.children;
188
- if (void 0 !== children) if (isStaticChildren) if (isArrayImpl(children)) {
189
- for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++) validateChildKeys(children[isStaticChildren]);
190
- Object.freeze && Object.freeze(children);
191
- } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
192
- else validateChildKeys(children);
193
- if (hasOwnProperty.call(config, "key")) {
194
- children = getComponentNameFromType(type);
195
- var keys = Object.keys(config).filter(function(k) {
196
- return "key" !== k;
197
- });
198
- isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
199
- didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = !0);
200
- }
201
- children = null;
202
- void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
203
- hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
204
- if ("key" in config) {
205
- maybeKey = {};
206
- for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
207
- } else maybeKey = config;
208
- children && defineKeyPropWarningGetter(maybeKey, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
209
- return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
210
- }
211
- function validateChildKeys(node) {
212
- isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
213
- }
214
- function isValidElement(object) {
215
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
216
- }
217
- var React = __require("react"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
218
- return null;
219
- };
220
- React = { react_stack_bottom_frame: function(callStackForError) {
221
- return callStackForError();
222
- } };
223
- var specialPropKeyWarningShown;
224
- var didWarnAboutElementRef = {};
225
- var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
226
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
227
- var didWarnAboutKeySpread = {};
228
- exports.Fragment = REACT_FRAGMENT_TYPE;
229
- exports.jsx = function(type, config, maybeKey) {
230
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
231
- return jsxDEVImpl(type, config, maybeKey, !1, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
232
- };
233
- exports.jsxs = function(type, config, maybeKey) {
234
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
235
- return jsxDEVImpl(type, config, maybeKey, !0, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
236
- };
237
- })();
238
- }) });
239
-
240
- //#endregion
241
- //#region ../../node_modules/.pnpm/react@19.2.0/node_modules/react/jsx-runtime.js
242
- var require_jsx_runtime = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/react@19.2.0/node_modules/react/jsx-runtime.js": ((exports, module) => {
243
- module.exports = require_react_jsx_runtime_development();
244
- }) });
245
-
246
- //#endregion
247
8
  //#region src/storybook-dark-mode/dark_mode_docs_container.tsx
248
- var import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime());
249
9
  /**
250
10
  * Creates a `DocsContainer` for `storybook` that works with `@storybook-community/storybook-dark-mode`.
251
11
  *
@@ -270,7 +30,7 @@ function createDarkModeDocsContainer(customThemes) {
270
30
  props.context.channel.on(DARK_MODE_EVENT_NAME, setDark);
271
31
  return () => props.context.channel.removeListener(DARK_MODE_EVENT_NAME, setDark);
272
32
  }, [props.context.channel]);
273
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DocsContainer, {
33
+ return /* @__PURE__ */ jsx(DocsContainer, {
274
34
  ...props,
275
35
  theme: isDark ? customThemes?.dark ?? themes.dark : customThemes?.light ?? themes.light,
276
36
  children: props.children
@@ -311,7 +71,7 @@ function defineDarkModeParam(darkMode) {
311
71
  function withDarkMode(options) {
312
72
  return function darkModeDecorator(Story, { parameters }) {
313
73
  const darkMode = parameters.darkMode;
314
- if (!darkMode) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Story, {});
74
+ if (!darkMode) return /* @__PURE__ */ jsx(Story, {});
315
75
  const dark = useDarkMode();
316
76
  const target = darkMode.classTarget === "html" ? document.documentElement : document.body;
317
77
  if (dark) {
@@ -323,7 +83,7 @@ function withDarkMode(options) {
323
83
  }
324
84
  if (options?.bodyClass) addClass(document.body, options.bodyClass);
325
85
  if (options?.bodyStyle) addStyle(document.body, options.bodyStyle);
326
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Story, {});
86
+ return /* @__PURE__ */ jsx(Story, {});
327
87
  };
328
88
  }
329
89
  function addClass(target, className) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobuddy/storybook",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Storybook repo buddy",
5
5
  "keywords": [
6
6
  "storybook",