@weasel-js/forge 1.9.3 → 1.9.4
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/README.md +22 -0
- package/dist/{FrameController-CpcY0DNB.d.ts → FrameController-BQjKhdwk.d.ts} +2 -36
- package/dist/chunk-5DXUNLV2.js +6 -0
- package/dist/chunk-5DXUNLV2.js.map +1 -0
- package/dist/{chunk-MGQWCPYE.js → chunk-5KI5YSQ5.js} +4 -5
- package/dist/chunk-5KI5YSQ5.js.map +1 -0
- package/dist/{chunk-Q2EZXJFE.js → chunk-B3PPHJTS.js} +59 -45
- package/dist/chunk-B3PPHJTS.js.map +1 -0
- package/dist/{chunk-CJX3W5HY.js → chunk-FRUA5WJF.js} +4 -3
- package/dist/chunk-FRUA5WJF.js.map +1 -0
- package/dist/{chunk-GZPQMGXJ.js → chunk-JHL4ERDA.js} +4 -3
- package/dist/chunk-JHL4ERDA.js.map +1 -0
- package/dist/{chunk-JVRHBI3V.js → chunk-MQSFPRF6.js} +20 -44
- package/dist/chunk-MQSFPRF6.js.map +1 -0
- package/dist/chunk-TXLWQFF6.js +10 -0
- package/dist/chunk-TXLWQFF6.js.map +1 -0
- package/dist/{chunk-BGOHALHO.js → chunk-ZZCCIXEJ.js} +11 -90
- package/dist/chunk-ZZCCIXEJ.js.map +1 -0
- package/dist/{config-BfsYw5lg.d.ts → config-Dfu-NKxd.d.ts} +27 -4
- package/dist/csf/preview-api.js +2 -2
- package/dist/frame/index.d.ts +2 -2
- package/dist/frame/index.js +6 -40
- package/dist/frame/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/shell/index.css +61 -61
- package/dist/shell/index.css.map +1 -1
- package/dist/shell/index.d.ts +5 -13
- package/dist/shell/index.js +345 -332
- package/dist/shell/index.js.map +1 -1
- package/dist/test/index.d.ts +4 -2
- package/dist/test/index.js +7 -7
- package/dist/test/index.js.map +1 -1
- package/dist/test/play.d.ts +3 -3
- package/dist/test/play.js.map +1 -1
- package/dist/vite/index.d.ts +3 -1
- package/dist/vite/index.js +365 -101
- package/dist/vite/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/chunk-BGOHALHO.js.map +0 -1
- package/dist/chunk-CJX3W5HY.js.map +0 -1
- package/dist/chunk-GZPQMGXJ.js.map +0 -1
- package/dist/chunk-JVRHBI3V.js.map +0 -1
- package/dist/chunk-KJGXJD3U.js +0 -15
- package/dist/chunk-KJGXJD3U.js.map +0 -1
- package/dist/chunk-MGQWCPYE.js.map +0 -1
- package/dist/chunk-Q2EZXJFE.js.map +0 -1
package/dist/shell/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ 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
|
|
6
|
-
import { S as ShellConfig, a as GlobalDeclarations } from '../config-
|
|
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';
|
|
7
7
|
import '@weasel-js/labkit/config';
|
|
8
8
|
import '@weasel-js/theme';
|
|
9
9
|
import '@weasel-js/ui';
|
|
@@ -94,7 +94,7 @@ interface TrialHostProps {
|
|
|
94
94
|
/**
|
|
95
95
|
* One story's box in the workshop document: what a frame document was, as an element. It applies the globals to
|
|
96
96
|
* itself, keeps its CSS variable overrides on itself, contains fixed-position descendants and portals, reports its
|
|
97
|
-
* vars
|
|
97
|
+
* vars and audits to the trial's frame registry, and unmounts its content while out of view.
|
|
98
98
|
*/
|
|
99
99
|
declare function TrialHost({ layout, setup, config, children, hostRef, onRendered }: TrialHostProps): react.JSX.Element;
|
|
100
100
|
|
|
@@ -122,6 +122,8 @@ interface StoryRegistryOptions {
|
|
|
122
122
|
importers?: FrameImporters;
|
|
123
123
|
/** The frame config, applied to each story host in the document. */
|
|
124
124
|
setup?: FrameSetup;
|
|
125
|
+
/** Names the library an index page's component ships in. Default: its title's first segment. */
|
|
126
|
+
libraries?: Libraries;
|
|
125
127
|
load?: (mod: Record<string, unknown>, title: string, parameters?: Record<string, unknown>) => LoadedStory[];
|
|
126
128
|
}
|
|
127
129
|
/**
|
|
@@ -143,8 +145,6 @@ type A11yOutcome = {
|
|
|
143
145
|
interface TrialFrameCalls {
|
|
144
146
|
send: Send;
|
|
145
147
|
audit: () => Promise<A11yOutcome>;
|
|
146
|
-
/** Rejects when the frame could not draw itself, or went away before it did. */
|
|
147
|
-
capture: () => Promise<CapturedPicture>;
|
|
148
148
|
}
|
|
149
149
|
/** What trial chrome can reach of the frame its trial shows. */
|
|
150
150
|
interface TrialFrame {
|
|
@@ -156,10 +156,6 @@ interface TrialFrame {
|
|
|
156
156
|
audit: (() => Promise<A11yOutcome>) | null;
|
|
157
157
|
/** What the last audit found; null until one has run against the connected frame. */
|
|
158
158
|
a11y: A11yOutcome | null;
|
|
159
|
-
/** The story's own picture, for an export to draw over. Null while no frame is connected. */
|
|
160
|
-
capture: (() => Promise<CapturedPicture>) | null;
|
|
161
|
-
/** The story's content box, as the frame last measured it; null until it has. */
|
|
162
|
-
size: Viewport | null;
|
|
163
159
|
}
|
|
164
160
|
/** Each trial's frame, keyed by trial id: `FrameView` connects and reports, trial chrome reads. */
|
|
165
161
|
interface TrialFrames {
|
|
@@ -167,10 +163,6 @@ interface TrialFrames {
|
|
|
167
163
|
connect(trialId: string, calls: TrialFrameCalls): () => void;
|
|
168
164
|
report(trialId: string, vars: readonly CssVarReport[]): void;
|
|
169
165
|
reportA11y(trialId: string, outcome: A11yOutcome): void;
|
|
170
|
-
reportSize(trialId: string, size: Viewport): void;
|
|
171
|
-
/** The element a trial's frame is mounted in — stable across the frame reloads that replace the link,
|
|
172
|
-
* because an annotation target's ref has to outlive them. */
|
|
173
|
-
hostRef(trialId: string): RefObject<HTMLElement | null>;
|
|
174
166
|
get(trialId: string): TrialFrame;
|
|
175
167
|
subscribe(listener: () => void): () => void;
|
|
176
168
|
}
|