@storybook/vue3 11.0.0-beta.4 → 11.0.0-beta.5

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, context));
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, context) {
195
- let { argTypes, component } = context, runtimeProps = component?.props, declaredProps = globalThis.FEATURES?.docgenServer ? new Set(
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
- ) : void 0, isSlot = (key) => argTypes[key]?.table?.category === "slots" || declaredProps !== void 0 && !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]);
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 isDocgenServerEnabled = globalThis.FEATURES?.docgenServer, decorators = isDocgenServerEnabled ? [] : [sourceDecorator], parameters = isDocgenServerEnabled ? { docs: { source: { printHole } } } : {};
344
+ var snippetRuntime = getSourceSnippetRuntime(), decorators = snippetRuntime === "preview" ? [sourceDecorator] : [], parameters = snippetRuntime === "server" ? { docs: { source: { printHole } } } : {};
344
345
 
345
346
  export {
346
347
  decorators,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  decorators,
3
3
  parameters
4
- } from "./_browser-chunks/chunk-A2HT2Y5M.js";
4
+ } from "./_browser-chunks/chunk-S434HE7Q.js";
5
5
  import "./_browser-chunks/chunk-4BE7D4DS.js";
6
6
  export {
7
7
  decorators,
@@ -5,7 +5,7 @@ import {
5
5
  parameters,
6
6
  render,
7
7
  renderToCanvas
8
- } from "./_browser-chunks/chunk-B2JTNJGN.js";
8
+ } from "./_browser-chunks/chunk-CQAJYHIB.js";
9
9
  import "./_browser-chunks/chunk-4BE7D4DS.js";
10
10
  export {
11
11
  decorateStory as applyDecorators,
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-B2JTNJGN.js";
5
+ } from "./_browser-chunks/chunk-CQAJYHIB.js";
6
6
  import {
7
7
  entry_preview_docs_exports
8
- } from "./_browser-chunks/chunk-A2HT2Y5M.js";
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-beta.4",
3
+ "version": "11.0.0-beta.5",
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-beta.4",
74
+ "storybook": "^11.0.0-beta.5",
75
75
  "typescript": "^5.9.0 || ^6.0.0 || ^7.0.0",
76
76
  "vue": "^3.0.0"
77
77
  },