@storybook/vue3 11.0.0-beta.4 → 11.0.0-rc.0
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.
|
@@ -154,7 +154,7 @@ var render = (props, context) => {
|
|
|
154
154
|
throw new Error(
|
|
155
155
|
`Unable to render story ${id} as the component annotation is missing from the default export`
|
|
156
156
|
);
|
|
157
|
-
return () => h(Component, props, getSlots(props,
|
|
157
|
+
return () => h(Component, props, getSlots(props, Component));
|
|
158
158
|
}, setup = (fn) => {
|
|
159
159
|
globalThis.PLUGINS_SETUP_FUNCTIONS ??= /* @__PURE__ */ new Set(), globalThis.PLUGINS_SETUP_FUNCTIONS.add(fn);
|
|
160
160
|
}, runSetupFunctions = async (app, storyContext) => {
|
|
@@ -191,10 +191,10 @@ async function renderToCanvas({ storyFn, forceRemount, showMain, showException,
|
|
|
191
191
|
teardown(vueApp, canvasElement);
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
function getSlots(props,
|
|
195
|
-
let
|
|
194
|
+
function getSlots(props, component) {
|
|
195
|
+
let runtimeProps = component.props, declaredProps = new Set(
|
|
196
196
|
(Array.isArray(runtimeProps) ? runtimeProps : Object.keys(runtimeProps ?? {})).map(camelize)
|
|
197
|
-
)
|
|
197
|
+
), isSlot = (key) => !declaredProps.has(key) && !/^on[A-Z]/.test(key), slots = Object.entries(props).filter(([key]) => isSlot(key)).map(([key, value]) => [key, typeof value == "function" ? value : () => value]);
|
|
198
198
|
return Object.fromEntries(slots);
|
|
199
199
|
}
|
|
200
200
|
function getArgs(element, storyContext) {
|
|
@@ -8,6 +8,7 @@ __export(entry_preview_docs_exports, {
|
|
|
8
8
|
decorators: () => decorators,
|
|
9
9
|
parameters: () => parameters
|
|
10
10
|
});
|
|
11
|
+
import { getSourceSnippetRuntime } from "storybook/internal/docs-tools";
|
|
11
12
|
|
|
12
13
|
// src/docs/print-hole.ts
|
|
13
14
|
import { printValue, unknownHoleKind } from "storybook/internal/docs-tools";
|
|
@@ -340,7 +341,7 @@ ${template}`;
|
|
|
340
341
|
) ? JSON.stringify(obj) : JSON.stringify(obj, null, 2);
|
|
341
342
|
|
|
342
343
|
// src/entry-preview-docs.ts
|
|
343
|
-
var
|
|
344
|
+
var snippetRuntime = getSourceSnippetRuntime(), decorators = snippetRuntime === "preview" ? [sourceDecorator] : [], parameters = snippetRuntime === "server" ? { docs: { source: { printHole } } } : {};
|
|
344
345
|
|
|
345
346
|
export {
|
|
346
347
|
decorators,
|
package/dist/entry-preview.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
entry_preview_exports,
|
|
3
3
|
renderToCanvas,
|
|
4
4
|
setup
|
|
5
|
-
} from "./_browser-chunks/chunk-
|
|
5
|
+
} from "./_browser-chunks/chunk-CQAJYHIB.js";
|
|
6
6
|
import {
|
|
7
7
|
entry_preview_docs_exports
|
|
8
|
-
} from "./_browser-chunks/chunk-
|
|
8
|
+
} from "./_browser-chunks/chunk-S434HE7Q.js";
|
|
9
9
|
import "./_browser-chunks/chunk-4BE7D4DS.js";
|
|
10
10
|
|
|
11
11
|
// src/globals.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/vue3",
|
|
3
|
-
"version": "11.0.0-
|
|
3
|
+
"version": "11.0.0-rc.0",
|
|
4
4
|
"description": "Storybook Vue 3 renderer: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"vue-tsc": "latest"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"storybook": "^11.0.0-
|
|
74
|
+
"storybook": "^11.0.0-rc.0",
|
|
75
75
|
"typescript": "^5.9.0 || ^6.0.0 || ^7.0.0",
|
|
76
76
|
"vue": "^3.0.0"
|
|
77
77
|
},
|