ember-storybook 0.2.0 → 0.3.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.
Files changed (58) hide show
  1. package/declarations/client/config.d.ts +13 -1
  2. package/declarations/client/config.d.ts.map +1 -1
  3. package/declarations/client/docs/block-params.d.ts +13 -1
  4. package/declarations/client/docs/block-params.d.ts.map +1 -1
  5. package/declarations/client/docs/blocks/blocks.d.ts.map +1 -1
  6. package/declarations/client/index.d.ts +1 -0
  7. package/declarations/client/index.d.ts.map +1 -1
  8. package/declarations/client/outlet-placeholder.d.ts +25 -0
  9. package/declarations/client/outlet-placeholder.d.ts.map +1 -0
  10. package/declarations/client/outlet.d.ts +97 -0
  11. package/declarations/client/outlet.d.ts.map +1 -0
  12. package/declarations/client/outlet.test.d.ts +2 -0
  13. package/declarations/client/outlet.test.d.ts.map +1 -0
  14. package/declarations/client/public-types.d.ts +1 -1
  15. package/declarations/client/public-types.d.ts.map +1 -1
  16. package/declarations/client/render-story.d.ts.map +1 -1
  17. package/declarations/client/render.d.ts.map +1 -1
  18. package/declarations/client/story-result.d.ts +7 -0
  19. package/declarations/client/story-result.d.ts.map +1 -1
  20. package/declarations/client/types.d.ts +49 -0
  21. package/declarations/client/types.d.ts.map +1 -1
  22. package/declarations/manager/ember-icon.d.ts +3 -0
  23. package/declarations/manager/ember-icon.d.ts.map +1 -0
  24. package/declarations/manager/index.d.ts +2 -0
  25. package/declarations/manager/index.d.ts.map +1 -0
  26. package/declarations/node/docgen/docgen.d.ts.map +1 -1
  27. package/declarations/node/parser.d.ts.map +1 -1
  28. package/declarations/preset.d.ts +1 -0
  29. package/declarations/preset.d.ts.map +1 -1
  30. package/dist/block-params-wjiT2Ht6.mjs +32 -0
  31. package/dist/block-params-wjiT2Ht6.mjs.map +1 -0
  32. package/dist/client/config.mjs +18 -2
  33. package/dist/client/config.mjs.map +1 -1
  34. package/dist/client/docs/config.mjs +87 -44
  35. package/dist/client/docs/config.mjs.map +1 -1
  36. package/dist/client/docs/renderer.mjs +1 -1
  37. package/dist/client/index.mjs +4 -3
  38. package/dist/{client-7-bGnBBX.mjs → client-DMN9EyIc.mjs} +9 -6
  39. package/dist/{client-7-bGnBBX.mjs.map → client-DMN9EyIc.mjs.map} +1 -1
  40. package/dist/index.mjs +4 -3
  41. package/dist/manager/index.mjs +82 -0
  42. package/dist/manager/index.mjs.map +1 -0
  43. package/dist/outlet-Dc5ySBso.mjs +119 -0
  44. package/dist/outlet-Dc5ySBso.mjs.map +1 -0
  45. package/dist/outlet-placeholder-DZpXQLIa.mjs +31 -0
  46. package/dist/outlet-placeholder-DZpXQLIa.mjs.map +1 -0
  47. package/dist/preset.mjs +102 -19
  48. package/dist/preset.mjs.map +1 -1
  49. package/dist/render-jYhDmzLM.mjs +220 -0
  50. package/dist/render-jYhDmzLM.mjs.map +1 -0
  51. package/dist/{story-result-CCx6LMia.mjs → story-result-D9erht0M.mjs} +7 -2
  52. package/dist/story-result-D9erht0M.mjs.map +1 -0
  53. package/package.json +5 -1
  54. package/dist/block-params-C68OkWMC.mjs +0 -12
  55. package/dist/block-params-C68OkWMC.mjs.map +0 -1
  56. package/dist/render-D_vlc6Py.mjs +0 -125
  57. package/dist/render-D_vlc6Py.mjs.map +0 -1
  58. package/dist/story-result-CCx6LMia.mjs.map +0 -1
@@ -1,5 +1,17 @@
1
- import type { ArgTypesEnhancer, Parameters } from 'storybook/internal/types';
1
+ import type { ArgTypesEnhancer, GlobalTypes, Parameters } from 'storybook/internal/types';
2
2
  export { render, renderToCanvas } from './render';
3
3
  export declare const parameters: Parameters;
4
+ /**
5
+ * The "Ember" toolbar menu: how a route story should render `{{outlet}}`.
6
+ *
7
+ * `defaultValue` seeds the global (Storybook merges global-type defaults under
8
+ * any project `initialGlobals`), so a project can still change the starting
9
+ * value with `initialGlobals: { outlet: 'placeholder' }`.
10
+ *
11
+ * No `toolbar` here: the menu UI (with the Ember brand icon) is a custom tool
12
+ * in `src/manager`, because Storybook 10 only resolves toolbar icons against
13
+ * its fixed built-in icon map.
14
+ */
15
+ export declare const globalTypes: GlobalTypes;
4
16
  export declare const argTypesEnhancers: ArgTypesEnhancer[];
5
17
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/client/config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAElD,eAAO,MAAM,UAAU,EAAE,UAKxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,EAAsB,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/client/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE1F,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAElD,eAAO,MAAM,UAAU,EAAE,UAKxB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,WAKzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,EAAsB,CAAC"}
@@ -1,4 +1,16 @@
1
1
  import type { BlockInfo, BlockParam } from 'ember-docgen';
2
- /** Flatten the params union into plain block params, unwrapping yield hashes. */
2
+ /**
3
+ * Unwrap the params union to plain block params at the yield surface: a
4
+ * yield hash expands to its named entries, but unfolded named types
5
+ * (`nested`) are not descended into. Use for anything reflecting what the
6
+ * block actually receives (e.g. slot bindings).
7
+ */
8
+ export declare function unwrapBlockParamsShallow(params: BlockInfo['params']): BlockParam[];
9
+ /**
10
+ * Unwrap every block param: yield hashes expand to their named entries and
11
+ * unfolded named types descend into all members — the whole param tree. Use
12
+ * wherever every referenced component must be found (subcomponent
13
+ * collection, ref rewriting).
14
+ */
3
15
  export declare function unwrapBlockParams(params: BlockInfo['params']): BlockParam[];
4
16
  //# sourceMappingURL=block-params.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"block-params.d.ts","sourceRoot":"","sources":["../../../src/client/docs/block-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AAM1E,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,UAAU,EAAE,CAE3E"}
1
+ {"version":3,"file":"block-params.d.ts","sourceRoot":"","sources":["../../../src/client/docs/block-params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AAM1E;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,UAAU,EAAE,CAElF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,UAAU,EAAE,CAkB3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../../src/client/docs/blocks/blocks.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAA8B,MAAM,cAAc,CAAC;AAE1E,eAAO,MAAM,SAAS;;;mGAInB,CAAC;AAOJ,eAAO,MAAM,QAAQ;;;yGAIlB,CAAC;AAyKJ,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,iBAAiB,EACjB,IAAI,EACL,EAAE;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAClC,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;;;2HAiCA;AAED,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,iBAAiB,EACjB,IAAI,EACL,EAAE;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAClC,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;;;sGAOA"}
1
+ {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../../src/client/docs/blocks/blocks.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAA8B,MAAM,cAAc,CAAC;AAE1E,eAAO,MAAM,SAAS;;;mGAInB,CAAC;AAOJ,eAAO,MAAM,QAAQ;;;yGAIlB,CAAC;AA+NJ,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,iBAAiB,EACjB,IAAI,EACL,EAAE;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAClC,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;;;2HAiCA;AAED,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,iBAAiB,EACjB,IAAI,EACL,EAAE;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAClC,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;;;sGAOA"}
@@ -1,4 +1,5 @@
1
1
  import './globals';
2
+ export { OutletPlaceholder } from './outlet-placeholder';
2
3
  export * from './portable-stories';
3
4
  export * from './public-types';
4
5
  export { renderToCanvas } from './render';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { TOC } from '@ember/component/template-only';
2
+ interface OutletPlaceholderSignature {
3
+ Element: HTMLDivElement;
4
+ Args: {
5
+ /** Shown inside the box. A route template only receives `@model`. */
6
+ model?: string;
7
+ };
8
+ }
9
+ /**
10
+ * A visible stand-in for `{{outlet}}`, for route stories where an empty hole is
11
+ * hard to see (e.g. on the docs page).
12
+ *
13
+ * It is rendered *as a route template*, so it must be template-only (the outlet
14
+ * only accepts a raw template or an internal-manager component) and the only
15
+ * value it can receive is `@model` — pass a string to label the box:
16
+ *
17
+ * ```js
18
+ * parameters: {
19
+ * ember: { route: { outlet: { template: OutletPlaceholder, model: 'settings' } } }
20
+ * }
21
+ * ```
22
+ */
23
+ export declare const OutletPlaceholder: TOC<OutletPlaceholderSignature>;
24
+ export {};
25
+ //# sourceMappingURL=outlet-placeholder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outlet-placeholder.d.ts","sourceRoot":"","sources":["../../src/client/outlet-placeholder.gts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAE1D,UAAU,0BAA0B;IAClC,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE;QACJ,qEAAqE;QACrE,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,GAAG,CAAC,0BAA0B,CAe5D,CAAC"}
@@ -0,0 +1,97 @@
1
+ import type { OutletMode, OutletStub, RouteParameters } from './types';
2
+ import type ApplicationInstance from '@ember/application/instance';
3
+ /**
4
+ * What Ember's outlet hands a route template. A route template is *not* a
5
+ * component story: it receives exactly `@model` and `@controller`, because that
6
+ * is all `{{outlet}}` passes down (`OUTLET_COMPONENT_TEMPLATE` in ember-source).
7
+ */
8
+ export interface OutletRenderState {
9
+ owner: object;
10
+ name: string;
11
+ controller: unknown;
12
+ model: unknown;
13
+ template: object;
14
+ }
15
+ /**
16
+ * Mirrors ember-source's internal `OutletState`. The shape is structural, not
17
+ * nominal, so a plain object is accepted by `setOutletState`; the leaf's
18
+ * `outlets.main` is what a nested `{{outlet}}` reads.
19
+ */
20
+ export interface OutletState {
21
+ render: OutletRenderState;
22
+ outlets: {
23
+ main: OutletState | undefined;
24
+ };
25
+ }
26
+ export interface RouteStoryInput {
27
+ /** The route template — the story's `component`. */
28
+ template: object;
29
+ /** `parameters.ember.route`. */
30
+ route: RouteParameters;
31
+ /**
32
+ * The resolved stub for `{{outlet}}` — see {@link resolveOutletStub}.
33
+ * `undefined` leaves the outlet as a hole.
34
+ */
35
+ outlet?: OutletStub;
36
+ /** Final (decorated) story args; `model`/`controller` feed the route. */
37
+ args: Record<string, unknown>;
38
+ /** Story name, used when `route.name` is not given. */
39
+ storyName: string;
40
+ /** The booted app instance the route renders under. */
41
+ owner: object;
42
+ }
43
+ /**
44
+ * Name of the Storybook global that decides how `{{outlet}}` is rendered
45
+ * (`hole` | `placeholder`). Declared here so the toolbar item and the renderer
46
+ * read and write the same key.
47
+ */
48
+ export declare const OUTLET_GLOBAL_KEY = "outlet";
49
+ export interface OutletResolveInput {
50
+ /** `parameters.ember.route` of the story being rendered. */
51
+ route: RouteParameters;
52
+ /** Value of the {@link OUTLET_GLOBAL_KEY} global, if any. */
53
+ mode?: OutletMode;
54
+ /**
55
+ * Produces the stub rendered when the global asks for a visible placeholder.
56
+ * Called lazily (and so may be an async chunk load) and only when needed;
57
+ * injected so this module stays free of Ember-owned template components.
58
+ */
59
+ placeholder: () => OutletStub | Promise<OutletStub>;
60
+ }
61
+ /**
62
+ * Decides what `{{outlet}}` renders.
63
+ *
64
+ * An explicit `route.outlet` is author intent and always wins, so a story stays
65
+ * deterministic no matter how the toolbar is set. Otherwise the global decides:
66
+ * `placeholder` renders the injected marker, anything else leaves a hole.
67
+ */
68
+ export declare function resolveOutletStub({ route, mode, placeholder }: OutletResolveInput): Promise<OutletStub | undefined>;
69
+ /**
70
+ * Builds the `OutletState` for a route story.
71
+ *
72
+ * `{{outlet}}` reads its child from Glimmer's *dynamic scope*, which
73
+ * `renderComponent` never populates — so route templates are rendered through
74
+ * Ember's own outlet root instead, and this is the state handed to it. Leaving
75
+ * `outlets.main` undefined is what makes `{{outlet}}` render a hole.
76
+ */
77
+ export declare function buildRouteOutletState({ template, route, outlet, args, storyName, owner }: RouteStoryInput): OutletState;
78
+ /**
79
+ * Ember's `OutletView` (the router's top-level view), reduced to the surface
80
+ * this module drives. It is only reachable through the container, so the type is
81
+ * declared here rather than imported from `@ember/-internals`.
82
+ */
83
+ export interface OutletView {
84
+ appendTo(target: HTMLElement): void;
85
+ setOutletState(state: OutletState): void;
86
+ }
87
+ /**
88
+ * Renders `state` into `element` through Ember's outlet root and waits for the
89
+ * render to settle.
90
+ */
91
+ export declare function mountOutletView(application: ApplicationInstance, state: OutletState, element: HTMLElement): Promise<OutletView>;
92
+ /**
93
+ * Swaps what the outlet renders, in place. This is how the router updates a live
94
+ * route tree, so arg changes do not tear the route's components down.
95
+ */
96
+ export declare function updateOutletView(view: OutletView, state: OutletState): Promise<void>;
97
+ //# sourceMappingURL=outlet.d.ts.map
@@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AAW,EACZ,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAMtD;AAsBD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,KAAK,EACL,MAAM,EACN,IAAI,EACJ,SAAS,EACT,KAAK,EACN,EAAE,eAAe,GAAG,WAAW,CAa/B;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IACpC,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;CAC1C;AAyDD;;;GAGG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,mBAAmB,EAChC,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,UAAU,CAAC,CAMrB;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1F"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=outlet.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outlet.test.d.ts","sourceRoot":"","sources":["../../src/client/outlet.test.ts"],"names":[],"mappings":""}
@@ -23,5 +23,5 @@ export type Decorator<TArgs = StrictArgs> = DecoratorFunction<EmberRenderer, TAr
23
23
  export type Loader<TArgs = StrictArgs> = LoaderFunction<EmberRenderer, TArgs>;
24
24
  export type StoryContext<TArgs = StrictArgs> = GenericStoryContext<EmberRenderer, TArgs>;
25
25
  export type Preview = ProjectAnnotations<EmberRenderer>;
26
- export { type EmberRenderer } from './types';
26
+ export { type EmberGlobals, type EmberParameters, type EmberRenderer, type OutletMode, type OutletStub, type RouteParameters } from './types';
27
27
  //# sourceMappingURL=public-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"public-types.d.ts","sourceRoot":"","sources":["../../src/client/public-types.ts"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,UAAU,oBAAoB;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/B,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,qBAAa,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IAC9D,MAAM;;;;;;OAaH;CASJ"}
1
+ {"version":3,"file":"render-story.d.ts","sourceRoot":"","sources":["../../src/client/render-story.gts"],"names":[],"mappings":"AAgDA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAQ3C,UAAU,oBAAoB;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/B,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,qBAAa,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IAC9D,MAAM;;;;;;OAyBH;CASJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/client/render.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAgB,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEzE,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAiB3E,eAAO,MAAM,MAAM,EAAE,WAAW,CAAC,aAAa,CAc7C,CAAC;AAsEF,wBAAsB,cAAc,CAClC,EACE,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,YAAY,EACb,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG;IAAE,YAAY,EAAE,YAAY,CAAA;CAAE,EAChE,aAAa,EAAE,aAAa,CAAC,eAAe,CAAC,uBA4F9C"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/client/render.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAGV,aAAa,EAGb,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAiB3E,eAAO,MAAM,MAAM,EAAE,WAAW,CAAC,aAAa,CAgB7C,CAAC;AA8LF,wBAAsB,cAAc,CAClC,EACE,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,YAAY,EACb,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG;IAAE,YAAY,EAAE,YAAY,CAAA;CAAE,EAChE,aAAa,EAAE,aAAa,CAAC,eAAe,CAAC,uBAwI9C"}
@@ -1,3 +1,4 @@
1
+ import type { RouteParameters } from './types';
1
2
  type Args = Record<string, unknown>;
2
3
  /**
3
4
  * Structural shapes of `@ember/application` and `@ember/application/instance`.
@@ -17,10 +18,15 @@ export type ApplicationInstanceClass = new (...args: never[]) => object;
17
18
  * args to `render` via `originalStoryFn(args, context)` — but nothing else. To
18
19
  * make those args reach `renderToCanvas`, `render` reports them back alongside
19
20
  * the component instead of returning a bare component.
21
+ *
22
+ * `route` rides along the same way: it is the only channel by which a story
23
+ * rendered through `<RenderStory>` (which never sees the story context) can learn
24
+ * it is a route story.
20
25
  */
21
26
  export interface EmberStoryResult {
22
27
  component: object;
23
28
  args: Args;
29
+ route?: RouteParameters;
24
30
  }
25
31
  export declare function isEmberStoryResult(value: unknown): value is EmberStoryResult;
26
32
  /**
@@ -35,6 +41,7 @@ export declare function isEmberStoryResult(value: unknown): value is EmberStoryR
35
41
  export declare function normalizeStoryResult(result: unknown, fallbackArgs: Args): {
36
42
  component: object;
37
43
  args: Args;
44
+ route?: RouteParameters;
38
45
  };
39
46
  export declare function createAppResolver(params: {
40
47
  application: ApplicationClass;
@@ -1 +1 @@
1
- {"version":3,"file":"story-result.d.ts","sourceRoot":"","sources":["../../src/client/story-result.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpC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A;KAAE,CAAC;CACxE;AAED,MAAM,MAAM,wBAAwB,GAAG,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,MAAM,CAAC;AAExE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAS5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,IAAI,GACjB;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB,CAMA;AAmBD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,mBAAmB,EAAE,wBAAwB,CAAC;CAC/C,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,KAAK,MAAM,CA2CrE"}
@@ -8,21 +8,70 @@ export interface ShowErrorArgs {
8
8
  description: string;
9
9
  }
10
10
  export type AppParamater = typeof Application | ApplicationInstance | ((options?: Record<string, unknown>) => typeof Application | ApplicationInstance);
11
+ /**
12
+ * A single-level stub rendered in place of `{{outlet}}`. Ember has no named
13
+ * outlets anymore, so a route template has exactly one child, and a story stubs
14
+ * precisely that one child — deeper nesting is not modelled.
15
+ */
16
+ export interface OutletStub {
17
+ /** Route name surfaced in the placeholder label and the debug render tree. */
18
+ name?: string;
19
+ /** Template/component rendered as the child route. Omitted => empty hole. */
20
+ template?: object;
21
+ /** Value passed to the child as `@model`. */
22
+ model?: unknown;
23
+ /** Value passed to the child as `@controller`. */
24
+ controller?: unknown;
25
+ }
26
+ /**
27
+ * Opt-in marker that a story renders a *route* template rather than a component.
28
+ *
29
+ * Route templates receive only `@model` and `@controller` (that is all Ember's
30
+ * outlet hands them), and their `{{outlet}}` is stubbed via {@link OutletStub}.
31
+ */
32
+ export interface RouteParameters {
33
+ /** Route name for the debug render tree; falls back to the story name. */
34
+ name?: string;
35
+ /** `@model` for the route template; falls back to `args.model`. */
36
+ model?: unknown;
37
+ /** `@controller` for the route template; falls back to `args.controller`. */
38
+ controller?: unknown;
39
+ /** What `{{outlet}}` renders. Omitted => empty hole. */
40
+ outlet?: OutletStub;
41
+ }
11
42
  export interface EmberParameters {
12
43
  ember?: {
13
44
  app?: AppParamater;
14
45
  configure?: (app: ApplicationInstance) => void;
15
46
  owner?: Record<`${string}:${string}`, object>;
16
47
  updateGlobals?: (globals: Record<string, unknown>, owner: Owner) => void;
48
+ /** Present => render through Ember's outlet root so `{{outlet}}` works. */
49
+ route?: RouteParameters;
17
50
  };
18
51
  }
52
+ /**
53
+ * How a route story renders `{{outlet}}`, chosen from the "Ember" toolbar menu.
54
+ *
55
+ * - `hole` (default): nothing renders — like a route with no active child.
56
+ * - `placeholder`: a marker component renders in its place.
57
+ */
58
+ export type OutletMode = 'hole' | 'placeholder';
59
+ /**
60
+ * Globals the framework contributes. Declared on {@link EmberRenderer} so
61
+ * `initialGlobals` and `context.globals` are typed for consumers.
62
+ */
63
+ export interface EmberGlobals {
64
+ outlet?: OutletMode;
65
+ }
19
66
  export interface EmberRenderer extends WebRenderer {
20
67
  component: object;
21
68
  storyResult: object;
22
69
  csf4: true;
23
70
  parameters: EmberParameters;
71
+ globals: EmberGlobals;
24
72
  }
25
73
  export type StoryContext = DefaultStoryContext<EmberRenderer> & {
26
74
  parameters: DefaultStoryContext<EmberRenderer>['parameters'] & EmberParameters;
75
+ globals: DefaultStoryContext<EmberRenderer>['globals'] & EmberGlobals;
27
76
  };
28
77
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":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AAC,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAC;QAC/C,KAAK,CAAC,EAAE,MAAM,CAAC,GAAG,MAAM,IAAI,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC;QAC9C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;QACzE,2EAA2E;QAC3E,KAAK,CAAC,EAAE,eAAe,CAAC;KACzB,CAAC;CACH;AAED;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,aAAa,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,aAAc,SAAQ,WAAW;IAGhD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,MAAM,YAAY,GAAG,mBAAmB,CAAC,aAAa,CAAC,GAAG;IAC9D,UAAU,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC;IAC/E,OAAO,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,GAAG,YAAY,CAAC;CACvE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare function EmberIcon(props: SVGProps<SVGSVGElement>): import("react").ReactSVGElement;
3
+ //# sourceMappingURL=ember-icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ember-icon.d.ts","sourceRoot":"","sources":["../../src/manager/ember-icon.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAkBtC,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,mCAYvD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manager/index.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"docgen.d.ts","sourceRoot":"","sources":["../../../src/node/docgen/docgen.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAyC1D,wBAAsB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA0BtF"}
1
+ {"version":3,"file":"docgen.d.ts","sourceRoot":"","sources":["../../../src/node/docgen/docgen.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAyC1D,wBAAsB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA+BtF"}
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/node/parser.ts"],"names":[],"mappings":"AAKA,OAAO,EAAW,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE1F,OAAO,EAAW,KAAK,YAAY,EAAqB,MAAM,UAAU,CAAC;AAEzE,OAAO,KAAK,EAAmB,OAAO,EAAsB,MAAM,YAAY,CAAC;AAE/E;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAExD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAW9F;AAED,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,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G;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;;;;;WAOG;QACH,aAAa,CAAC,EAAE,MAAM,CAAC;QAEvB;;;;;WAKG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,OAAO,EAAE,CAAC,WAAW,GAAG;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;CACxD;AAkDD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAkF7E;AAqBD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAwHvE"}
@@ -2,6 +2,7 @@ import { type StorybookConfigVite } from '@storybook/builder-vite';
2
2
  import type { StorybookConfig } from './types';
3
3
  import type { PresetProperty } from 'storybook/internal/types';
4
4
  export declare const previewAnnotations: PresetProperty<'previewAnnotations'>;
5
+ export declare const managerEntries: (entries?: string[]) => string[];
5
6
  export declare const viteFinal: StorybookConfigVite['viteFinal'];
6
7
  export declare const experimental_indexers: StorybookConfig['experimental_indexers'];
7
8
  export declare const core: PresetProperty<'core'>;
@@ -1 +1 @@
1
- {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../src/preset.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAAsB,MAAM,yBAAyB,CAAC;AAKvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAoB/D,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,oBAAoB,CAkBnE,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,mBAAmB,CAAC,WAAW,CAkBtD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAAe,CAAC,uBAAuB,CAE1E,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,cAAc,CAAC,MAAM,CAcvC,CAAC"}
1
+ {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../src/preset.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAAsB,MAAM,yBAAyB,CAAC;AAKvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAoB/D,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,oBAAoB,CAkBnE,CAAC;AAIF,eAAO,MAAM,cAAc,GAAI,UAAS,MAAM,EAAO,KAAG,MAAM,EAG7D,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,mBAAmB,CAAC,WAAW,CAkBtD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAAe,CAAC,uBAAuB,CAE1E,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,cAAc,CAAC,MAAM,CAcvC,CAAC"}
@@ -0,0 +1,32 @@
1
+ //#region src/client/docs/block-params.ts
2
+ function isBlockParam(param) {
3
+ return Object.hasOwn(param, "name") && Object.hasOwn(param, "type");
4
+ }
5
+ /**
6
+ * Unwrap the params union to plain block params at the yield surface: a
7
+ * yield hash expands to its named entries, but unfolded named types
8
+ * (`nested`) are not descended into. Use for anything reflecting what the
9
+ * block actually receives (e.g. slot bindings).
10
+ */
11
+ function unwrapBlockParamsShallow(params) {
12
+ return params.flatMap((param) => isBlockParam(param) ? [param] : Object.values(param));
13
+ }
14
+ /**
15
+ * Unwrap every block param: yield hashes expand to their named entries and
16
+ * unfolded named types descend into all members — the whole param tree. Use
17
+ * wherever every referenced component must be found (subcomponent
18
+ * collection, ref rewriting).
19
+ */
20
+ function unwrapBlockParams(params) {
21
+ const result = [];
22
+ for (const param of params) if (isBlockParam(param)) {
23
+ result.push(param);
24
+ const nested = param.nested;
25
+ if (nested && nested.length > 0) result.push(...unwrapBlockParams(nested));
26
+ } else result.push(...unwrapBlockParams(Object.values(param)));
27
+ return result;
28
+ }
29
+ //#endregion
30
+ export { unwrapBlockParamsShallow as n, unwrapBlockParams as t };
31
+
32
+ //# sourceMappingURL=block-params-wjiT2Ht6.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-params-wjiT2Ht6.mjs","names":["isBlockParam","param","Object","hasOwn","unwrapBlockParamsShallow","params","flatMap","values","unwrapBlockParams","result","push","nested","length"],"sources":["../src/client/docs/block-params.ts"],"sourcesContent":["import type { BlockInfo, BlockParam, HashBlockParam } from 'ember-docgen';\n\nfunction isBlockParam(param: BlockParam | HashBlockParam): param is BlockParam {\n return Object.hasOwn(param, 'name') && Object.hasOwn(param, 'type');\n}\n\n/**\n * Unwrap the params union to plain block params at the yield surface: a\n * yield hash expands to its named entries, but unfolded named types\n * (`nested`) are not descended into. Use for anything reflecting what the\n * block actually receives (e.g. slot bindings).\n */\nexport function unwrapBlockParamsShallow(params: BlockInfo['params']): BlockParam[] {\n return params.flatMap((param) => (isBlockParam(param) ? [param] : Object.values(param)));\n}\n\n/**\n * Unwrap every block param: yield hashes expand to their named entries and\n * unfolded named types descend into all members — the whole param tree. Use\n * wherever every referenced component must be found (subcomponent\n * collection, ref rewriting).\n */\nexport function unwrapBlockParams(params: BlockInfo['params']): BlockParam[] {\n const result: BlockParam[] = [];\n\n for (const param of params) {\n if (isBlockParam(param)) {\n result.push(param);\n\n const nested = param.nested;\n\n if (nested && nested.length > 0) {\n result.push(...unwrapBlockParams(nested));\n }\n } else {\n result.push(...unwrapBlockParams(Object.values(param)));\n }\n }\n\n return result;\n}\n"],"mappings":";AAEA,SAASA,aAAaC,OAAyD;CAC7E,OAAOC,OAAOC,OAAOF,OAAO,MAAM,KAAKC,OAAOC,OAAOF,OAAO,MAAM;AACpE;;;;;;;AAQA,SAAgBG,yBAAyBC,QAA2C;CAClF,OAAOA,OAAOC,SAASL,UAAWD,aAAaC,KAAK,IAAI,CAACA,KAAK,IAAIC,OAAOK,OAAON,KAAK,CAAE;AACzF;;;;;;;AAQA,SAAgBO,kBAAkBH,QAA2C;CAC3E,MAAMI,SAAuB,CAAA;CAE7B,KAAK,MAAMR,SAASI,QAClB,IAAIL,aAAaC,KAAK,GAAG;EACvBQ,OAAOC,KAAKT,KAAK;EAEjB,MAAMU,SAASV,MAAMU;EAErB,IAAIA,UAAUA,OAAOC,SAAS,GAC5BH,OAAOC,KAAK,GAAGF,kBAAkBG,MAAM,CAAC;CAE5C,OACEF,OAAOC,KAAK,GAAGF,kBAAkBN,OAAOK,OAAON,KAAK,CAAC,CAAC;CAI1D,OAAOQ;AACT"}
@@ -1,12 +1,28 @@
1
- import { n as renderToCanvas, t as render } from "../render-D_vlc6Py.mjs";
1
+ import { n as renderToCanvas, t as render } from "../render-jYhDmzLM.mjs";
2
+ import { t as OUTLET_GLOBAL_KEY } from "../outlet-Dc5ySBso.mjs";
2
3
  import { enhanceArgTypes } from "storybook/internal/docs-tools";
3
4
  //#region src/client/config.ts
4
5
  const parameters = {
5
6
  renderer: "ember",
6
7
  docs: { story: { inline: true } }
7
8
  };
9
+ /**
10
+ * The "Ember" toolbar menu: how a route story should render `{{outlet}}`.
11
+ *
12
+ * `defaultValue` seeds the global (Storybook merges global-type defaults under
13
+ * any project `initialGlobals`), so a project can still change the starting
14
+ * value with `initialGlobals: { outlet: 'placeholder' }`.
15
+ *
16
+ * No `toolbar` here: the menu UI (with the Ember brand icon) is a custom tool
17
+ * in `src/manager`, because Storybook 10 only resolves toolbar icons against
18
+ * its fixed built-in icon map.
19
+ */
20
+ const globalTypes = { [OUTLET_GLOBAL_KEY]: {
21
+ description: "How a route story renders {{outlet}}",
22
+ defaultValue: "hole"
23
+ } };
8
24
  const argTypesEnhancers = [enhanceArgTypes];
9
25
  //#endregion
10
- export { argTypesEnhancers, parameters, render, renderToCanvas };
26
+ export { argTypesEnhancers, globalTypes, parameters, render, renderToCanvas };
11
27
 
12
28
  //# sourceMappingURL=config.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.mjs","names":["enhanceArgTypes","render","renderToCanvas","parameters","renderer","docs","story","inline","argTypesEnhancers"],"sources":["../../src/client/config.ts"],"sourcesContent":["import { enhanceArgTypes } from 'storybook/internal/docs-tools';\n\nimport type { ArgTypesEnhancer, Parameters } from 'storybook/internal/types';\n\nexport { render, renderToCanvas } from './render';\n\nexport const parameters: Parameters = {\n renderer: 'ember',\n docs: {\n story: { inline: true }\n }\n};\n\nexport const argTypesEnhancers: ArgTypesEnhancer[] = [enhanceArgTypes];\n"],"mappings":";;;AAMA,MAAaG,aAAyB;CACpCC,UAAU;CACVC,MAAM,EACJC,OAAO,EAAEC,QAAQ,KAAK,EACxB;AACF;AAEA,MAAaC,oBAAwC,CAACR,eAAe"}
1
+ {"version":3,"file":"config.mjs","names":["enhanceArgTypes","OUTLET_GLOBAL_KEY","render","renderToCanvas","parameters","renderer","docs","story","inline","globalTypes","description","defaultValue","argTypesEnhancers"],"sources":["../../src/client/config.ts"],"sourcesContent":["import { enhanceArgTypes } from 'storybook/internal/docs-tools';\n\nimport { OUTLET_GLOBAL_KEY } from './outlet';\n\nimport type { ArgTypesEnhancer, GlobalTypes, Parameters } from 'storybook/internal/types';\n\nexport { render, renderToCanvas } from './render';\n\nexport const parameters: Parameters = {\n renderer: 'ember',\n docs: {\n story: { inline: true }\n }\n};\n\n/**\n * The \"Ember\" toolbar menu: how a route story should render `{{outlet}}`.\n *\n * `defaultValue` seeds the global (Storybook merges global-type defaults under\n * any project `initialGlobals`), so a project can still change the starting\n * value with `initialGlobals: { outlet: 'placeholder' }`.\n *\n * No `toolbar` here: the menu UI (with the Ember brand icon) is a custom tool\n * in `src/manager`, because Storybook 10 only resolves toolbar icons against\n * its fixed built-in icon map.\n */\nexport const globalTypes: GlobalTypes = {\n [OUTLET_GLOBAL_KEY]: {\n description: 'How a route story renders {{outlet}}',\n defaultValue: 'hole'\n }\n};\n\nexport const argTypesEnhancers: ArgTypesEnhancer[] = [enhanceArgTypes];\n"],"mappings":";;;;AAQA,MAAaI,aAAyB;CACpCC,UAAU;CACVC,MAAM,EACJC,OAAO,EAAEC,QAAQ,KAAK,EACxB;AACF;;;;;;;;;;;;AAaA,MAAaC,cAA2B,GACrCR,oBAAoB;CACnBS,aAAa;CACbC,cAAc;AAChB,EACF;AAEA,MAAaC,oBAAwC,CAACZ,eAAe"}