@weasel-js/forge 1.9.4 → 1.10.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.
Files changed (48) hide show
  1. package/README.md +13 -7
  2. package/dist/{FrameController-BQjKhdwk.d.ts → FrameController-UeTY7ubF.d.ts} +25 -1
  3. package/dist/{chunk-B3PPHJTS.js → chunk-AP3DRQLI.js} +16 -16
  4. package/dist/chunk-AP3DRQLI.js.map +1 -0
  5. package/dist/{chunk-MQSFPRF6.js → chunk-BIAEGWGJ.js} +37 -19
  6. package/dist/chunk-BIAEGWGJ.js.map +1 -0
  7. package/dist/{chunk-JHL4ERDA.js → chunk-DFKCLZKS.js} +3 -3
  8. package/dist/chunk-DFKCLZKS.js.map +1 -0
  9. package/dist/{chunk-FRUA5WJF.js → chunk-DKWHGSBZ.js} +3 -3
  10. package/dist/{chunk-FRUA5WJF.js.map → chunk-DKWHGSBZ.js.map} +1 -1
  11. package/dist/{chunk-ZZCCIXEJ.js → chunk-E2FHBDNQ.js} +16 -25
  12. package/dist/chunk-E2FHBDNQ.js.map +1 -0
  13. package/dist/{chunk-TXLWQFF6.js → chunk-FL2MUPUL.js} +2 -2
  14. package/dist/chunk-FL2MUPUL.js.map +1 -0
  15. package/dist/{chunk-5KI5YSQ5.js → chunk-GB6PRJET.js} +3 -3
  16. package/dist/{chunk-5KI5YSQ5.js.map → chunk-GB6PRJET.js.map} +1 -1
  17. package/dist/{chunk-HRGPFQBW.js → chunk-ZAWXMUGZ.js} +6 -3
  18. package/dist/chunk-ZAWXMUGZ.js.map +1 -0
  19. package/dist/{config-Dfu-NKxd.d.ts → config-Cz7ZyGF-.d.ts} +5 -5
  20. package/dist/csf/preview-api.d.ts +5 -2
  21. package/dist/csf/preview-api.js +2 -2
  22. package/dist/csf/preview-api.js.map +1 -1
  23. package/dist/frame/index.css +19 -2
  24. package/dist/frame/index.css.map +1 -1
  25. package/dist/frame/index.d.ts +2 -2
  26. package/dist/frame/index.js +5 -5
  27. package/dist/frame/index.js.map +1 -1
  28. package/dist/index.d.ts +4 -4
  29. package/dist/index.js +3 -3
  30. package/dist/shell/index.css +41 -5
  31. package/dist/shell/index.css.map +1 -1
  32. package/dist/shell/index.d.ts +7 -6
  33. package/dist/shell/index.js +537 -334
  34. package/dist/shell/index.js.map +1 -1
  35. package/dist/test/index.d.ts +1 -1
  36. package/dist/test/index.js +6 -6
  37. package/dist/test/play.d.ts +3 -5
  38. package/dist/test/play.js.map +1 -1
  39. package/dist/vite/index.d.ts +28 -1
  40. package/dist/vite/index.js +413 -79
  41. package/dist/vite/index.js.map +1 -1
  42. package/package.json +10 -5
  43. package/dist/chunk-B3PPHJTS.js.map +0 -1
  44. package/dist/chunk-HRGPFQBW.js.map +0 -1
  45. package/dist/chunk-JHL4ERDA.js.map +0 -1
  46. package/dist/chunk-MQSFPRF6.js.map +0 -1
  47. package/dist/chunk-TXLWQFF6.js.map +0 -1
  48. package/dist/chunk-ZZCCIXEJ.js.map +0 -1
@@ -2,8 +2,9 @@ import * as react from 'react';
2
2
  import { RefObject, ReactNode } from 'react';
3
3
  import { LabContribution, StorageAdapter, RenderContext, InstrumentList } from '@weasel-js/labkit';
4
4
  import { FrameImporters } from '../frame/index.js';
5
- import { j as IndexEntry, F as FrameSetup, e as DepGraph, L as LoadedStory, k as Layout, G as Globals, l as FromFrame, c as A11yReport, m as ToFrame, n as CssVarReport } from '../FrameController-BQjKhdwk.js';
6
- import { S as ShellConfig, a as GlobalDeclarations, e as Libraries } from '../config-Dfu-NKxd.js';
5
+ import { m as IndexEntry, F as FrameSetup, f as DepGraph, L as LoadedStory, k as Layout, G as Globals, n as FromFrame, c as A11yReport, o as ToFrame, p as CssVarReport } from '../FrameController-UeTY7ubF.js';
6
+ export { q as DescribedEntry, r as DescribedShape, s as SchemaDescription, t as SectionDescription } from '../FrameController-UeTY7ubF.js';
7
+ import { S as ShellConfig, a as GlobalDeclarations, e as Libraries } from '../config-Cz7ZyGF-.js';
7
8
  import '@weasel-js/labkit/config';
8
9
  import '@weasel-js/theme';
9
10
  import '@weasel-js/ui';
@@ -114,6 +115,7 @@ interface StoryRegistry {
114
115
  /** Drops what was loaded from `file` and loads it again for every entry that had it, as after an edit. */
115
116
  reload: (file: string) => void;
116
117
  }
118
+ /** What `useStoryRegistry` loads stories from, and what it shows them with. */
117
119
  interface StoryRegistryOptions {
118
120
  frameUrl: string;
119
121
  globals?: GlobalDeclarations;
@@ -132,7 +134,6 @@ interface StoryRegistryOptions {
132
134
  */
133
135
  declare function useStoryRegistry(index: readonly IndexEntry[], options: StoryRegistryOptions): StoryRegistry;
134
136
 
135
- type Send = (msg: ToFrame) => void;
136
137
  /** What an axe run in the frame came back with. */
137
138
  type A11yOutcome = {
138
139
  ok: true;
@@ -143,13 +144,13 @@ type A11yOutcome = {
143
144
  };
144
145
  /** The half of a trial's frame that answers a request: each call is one round trip over the frame's channel. */
145
146
  interface TrialFrameCalls {
146
- send: Send;
147
+ send: (msg: ToFrame) => void;
147
148
  audit: () => Promise<A11yOutcome>;
148
149
  }
149
150
  /** What trial chrome can reach of the frame its trial shows. */
150
151
  interface TrialFrame {
151
152
  /** Null while no frame is connected. */
152
- send: Send | null;
153
+ send: ((msg: ToFrame) => void) | null;
153
154
  /** The frame's latest `vars` report. */
154
155
  vars: readonly CssVarReport[];
155
156
  /** Runs axe over the story and records the answer as `a11y`. Null while no frame is connected. */
@@ -171,4 +172,4 @@ declare const TrialFramesContext: react.Context<TrialFrames | null>;
171
172
  /** The frame of the trial `trialId` names, re-read when it connects or reports. */
172
173
  declare function useTrialFrame(trialId: string): TrialFrame;
173
174
 
174
- export { A11Y_SECTION, type A11yOutcome, A11yPanel, type MountWorkshopOptions, type MountedWorkshop, StoryGlobalsContext, type StoryRegistry, StoryTrial, type StoryTrialProps, type TrialFrame, type TrialFrames, TrialFramesContext, TrialHost, type TrialHostProps, Workshop, type WorkshopProps, mountWorkshop, useStoryRegistry, useTrialFrame };
175
+ export { A11Y_SECTION, type A11yOutcome, A11yPanel, CssVarReport, IndexEntry, Libraries, type MountWorkshopOptions, type MountedWorkshop, type StoryChanges, StoryGlobalsContext, type StoryRegistry, type StoryRegistryOptions, StoryTrial, type StoryTrialProps, type TrialFrame, type TrialFrameCalls, type TrialFrames, TrialFramesContext, TrialHost, type TrialHostProps, Workshop, type WorkshopProps, mountWorkshop, useStoryRegistry, useTrialFrame };