@molecule/app-ide-panel-logic 1.2.0 → 1.3.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.
- package/README.md +368 -3
- package/dist/command-metadata.d.ts +225 -4
- package/dist/command-metadata.d.ts.map +1 -1
- package/dist/command-metadata.js +163 -2
- package/dist/command-metadata.js.map +1 -1
- package/dist/components/chat-autocommit-utilities.d.ts.map +1 -1
- package/dist/components/chat-autocommit-utilities.js +3 -2
- package/dist/components/chat-autocommit-utilities.js.map +1 -1
- package/dist/components/chat-models-utilities.d.ts +16 -0
- package/dist/components/chat-models-utilities.d.ts.map +1 -1
- package/dist/components/chat-models-utilities.js +25 -0
- package/dist/components/chat-models-utilities.js.map +1 -1
- package/dist/components/chat-settings-utilities.d.ts +65 -4
- package/dist/components/chat-settings-utilities.d.ts.map +1 -1
- package/dist/components/chat-settings-utilities.js +155 -4
- package/dist/components/chat-settings-utilities.js.map +1 -1
- package/dist/components/chat-share-utilities.d.ts +39 -0
- package/dist/components/chat-share-utilities.d.ts.map +1 -1
- package/dist/components/chat-share-utilities.js +91 -0
- package/dist/components/chat-share-utilities.js.map +1 -1
- package/dist/components/chat-tips-utilities.d.ts +72 -7
- package/dist/components/chat-tips-utilities.d.ts.map +1 -1
- package/dist/components/chat-tips-utilities.js +68 -0
- package/dist/components/chat-tips-utilities.js.map +1 -1
- package/dist/components/context-usage-utilities.d.ts +32 -0
- package/dist/components/context-usage-utilities.d.ts.map +1 -0
- package/dist/components/context-usage-utilities.js +77 -0
- package/dist/components/context-usage-utilities.js.map +1 -0
- package/dist/components/headless-hooks.d.ts +89 -0
- package/dist/components/headless-hooks.d.ts.map +1 -0
- package/dist/components/headless-hooks.js +254 -0
- package/dist/components/headless-hooks.js.map +1 -0
- package/dist/components/preview-panel-logic.d.ts +182 -0
- package/dist/components/preview-panel-logic.d.ts.map +1 -0
- package/dist/components/preview-panel-logic.js +1993 -0
- package/dist/components/preview-panel-logic.js.map +1 -0
- package/dist/components/preview-panel-session.d.ts +62 -0
- package/dist/components/preview-panel-session.d.ts.map +1 -0
- package/dist/components/preview-panel-session.js +40 -0
- package/dist/components/preview-panel-session.js.map +1 -0
- package/dist/components/quick-picker-utilities.d.ts +19 -0
- package/dist/components/quick-picker-utilities.d.ts.map +1 -0
- package/dist/components/quick-picker-utilities.js +36 -0
- package/dist/components/quick-picker-utilities.js.map +1 -0
- package/dist/components/tool-call-utilities.d.ts +14 -5
- package/dist/components/tool-call-utilities.d.ts.map +1 -1
- package/dist/components/tool-call-utilities.js +111 -51
- package/dist/components/tool-call-utilities.js.map +1 -1
- package/dist/panels.d.ts +8 -2
- package/dist/panels.d.ts.map +1 -1
- package/dist/panels.js +8 -2
- package/dist/panels.js.map +1 -1
- package/dist/settings-metadata.d.ts +33 -2
- package/dist/settings-metadata.d.ts.map +1 -1
- package/dist/settings-metadata.js +138 -2
- package/dist/settings-metadata.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runs a hook-shaped render function (one written against {@link PrimitiveHooks}) outside React,
|
|
3
|
+
* as a store: `getState` returns the function's latest result, `subscribe` hears every change.
|
|
4
|
+
*
|
|
5
|
+
* Shared IDE behaviour that is naturally written as a React-style hook (see
|
|
6
|
+
* `usePreviewPanelLogic`) is written ONCE against these four primitives. React passes its own
|
|
7
|
+
* hooks and runs that code itself; Vue, Svelte, Solid and Angular run it through
|
|
8
|
+
* {@link createHeadlessHooksSession}, which follows React's rules for the parts that change
|
|
9
|
+
* behaviour:
|
|
10
|
+
*
|
|
11
|
+
* - A setter called with the current value (`Object.is`) changes nothing.
|
|
12
|
+
* - Effects run only while connected (mounted). After each render, every effect whose deps
|
|
13
|
+
* changed first has its previous cleanup run (all cleanups, in declaration order), then its new
|
|
14
|
+
* run (in declaration order). `connect` runs every effect; disconnecting runs every cleanup.
|
|
15
|
+
* - Updates are batched: a handler from the result runs inside {@link HeadlessHooksSession.batch},
|
|
16
|
+
* so its updates produce one render, synchronously, before it returns; updates from a timer,
|
|
17
|
+
* a promise continuation or a DOM listener are batched into one render on the next microtask.
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
/** The most render passes one flush may take before the render is called non-settling. */
|
|
22
|
+
const MAX_PASSES = 50;
|
|
23
|
+
let batchDepth = 0;
|
|
24
|
+
const pendingFlushes = new Set();
|
|
25
|
+
const sameDeps = (a, b) => a !== undefined &&
|
|
26
|
+
b !== undefined &&
|
|
27
|
+
a.length === b.length &&
|
|
28
|
+
a.every((value, index) => Object.is(value, b[index]));
|
|
29
|
+
const runBatch = (fn) => {
|
|
30
|
+
batchDepth += 1;
|
|
31
|
+
try {
|
|
32
|
+
return fn();
|
|
33
|
+
}
|
|
34
|
+
finally {
|
|
35
|
+
batchDepth -= 1;
|
|
36
|
+
if (batchDepth === 0) {
|
|
37
|
+
while (pendingFlushes.size > 0) {
|
|
38
|
+
const [flush] = pendingFlushes;
|
|
39
|
+
pendingFlushes.delete(flush);
|
|
40
|
+
flush();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Runs `render` as a store (see the module docs). The first render happens here; effects wait
|
|
47
|
+
* for {@link HeadlessHooksSession.connect}.
|
|
48
|
+
*
|
|
49
|
+
* @param render - The hook-shaped render function; it must call the same hooks in the same order
|
|
50
|
+
* on every render.
|
|
51
|
+
* @returns The session.
|
|
52
|
+
*/
|
|
53
|
+
export function createHeadlessHooksSession(render) {
|
|
54
|
+
const slots = [];
|
|
55
|
+
const listeners = new Set();
|
|
56
|
+
const wrappers = new WeakMap();
|
|
57
|
+
let index = 0;
|
|
58
|
+
let firstRender = true;
|
|
59
|
+
let dirty = true;
|
|
60
|
+
let rendering = false;
|
|
61
|
+
let connected = false;
|
|
62
|
+
let microtaskQueued = false;
|
|
63
|
+
let result;
|
|
64
|
+
const take = (kind, create) => {
|
|
65
|
+
const at = index;
|
|
66
|
+
index += 1;
|
|
67
|
+
if (firstRender) {
|
|
68
|
+
const slot = create();
|
|
69
|
+
slots.push(slot);
|
|
70
|
+
return slot;
|
|
71
|
+
}
|
|
72
|
+
const slot = slots[at];
|
|
73
|
+
if (!slot || slot.kind !== kind) {
|
|
74
|
+
throw new Error(`createHeadlessHooksSession: hook ${at} was ${slot ? `a ${slot.kind}` : 'missing'} on the first render and is a ${kind} now; call the same hooks in the same order on every render`);
|
|
75
|
+
}
|
|
76
|
+
return slot;
|
|
77
|
+
};
|
|
78
|
+
const commit = () => {
|
|
79
|
+
const changed = slots.filter((slot) => slot.kind === 'effect' && slot.changed);
|
|
80
|
+
for (const slot of changed) {
|
|
81
|
+
const cleanup = slot.cleanup;
|
|
82
|
+
slot.cleanup = undefined;
|
|
83
|
+
cleanup?.();
|
|
84
|
+
}
|
|
85
|
+
for (const slot of changed) {
|
|
86
|
+
slot.changed = false;
|
|
87
|
+
slot.committed = slot.deps ?? [];
|
|
88
|
+
const cleanup = slot.effect();
|
|
89
|
+
if (typeof cleanup === 'function')
|
|
90
|
+
slot.cleanup = cleanup;
|
|
91
|
+
// An effect without deps runs after every render.
|
|
92
|
+
if (slot.deps === undefined)
|
|
93
|
+
slot.committed = undefined;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
const flush = () => {
|
|
97
|
+
if (rendering)
|
|
98
|
+
return;
|
|
99
|
+
rendering = true;
|
|
100
|
+
let rendered = false;
|
|
101
|
+
try {
|
|
102
|
+
let passes = 0;
|
|
103
|
+
while (dirty) {
|
|
104
|
+
passes += 1;
|
|
105
|
+
if (passes > MAX_PASSES) {
|
|
106
|
+
throw new Error(`createHeadlessHooksSession: the render did not settle after ${MAX_PASSES} passes (an effect or the render sets state every time)`);
|
|
107
|
+
}
|
|
108
|
+
dirty = false;
|
|
109
|
+
index = 0;
|
|
110
|
+
result = render(hooks);
|
|
111
|
+
firstRender = false;
|
|
112
|
+
rendered = true;
|
|
113
|
+
if (connected)
|
|
114
|
+
commit();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
finally {
|
|
118
|
+
rendering = false;
|
|
119
|
+
}
|
|
120
|
+
if (rendered)
|
|
121
|
+
for (const listener of [...listeners])
|
|
122
|
+
listener();
|
|
123
|
+
};
|
|
124
|
+
const markDirty = () => {
|
|
125
|
+
dirty = true;
|
|
126
|
+
if (rendering)
|
|
127
|
+
return;
|
|
128
|
+
if (batchDepth > 0) {
|
|
129
|
+
pendingFlushes.add(flush);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (microtaskQueued)
|
|
133
|
+
return;
|
|
134
|
+
microtaskQueued = true;
|
|
135
|
+
queueMicrotask(() => {
|
|
136
|
+
microtaskQueued = false;
|
|
137
|
+
flush();
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
const hooks = {
|
|
141
|
+
useState(initial) {
|
|
142
|
+
const slot = take('state', () => {
|
|
143
|
+
const created = {
|
|
144
|
+
kind: 'state',
|
|
145
|
+
value: initial,
|
|
146
|
+
set: (next) => {
|
|
147
|
+
const value = typeof next === 'function'
|
|
148
|
+
? next(created.value)
|
|
149
|
+
: next;
|
|
150
|
+
if (Object.is(value, created.value))
|
|
151
|
+
return;
|
|
152
|
+
created.value = value;
|
|
153
|
+
markDirty();
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
return created;
|
|
157
|
+
});
|
|
158
|
+
return [slot.value, slot.set];
|
|
159
|
+
},
|
|
160
|
+
useRef(initial) {
|
|
161
|
+
return take('ref', () => ({ kind: 'ref', box: { current: initial } })).box;
|
|
162
|
+
},
|
|
163
|
+
useEffect(effect, deps) {
|
|
164
|
+
const slot = take('effect', () => ({
|
|
165
|
+
kind: 'effect',
|
|
166
|
+
committed: undefined,
|
|
167
|
+
effect,
|
|
168
|
+
deps,
|
|
169
|
+
changed: true,
|
|
170
|
+
cleanup: undefined,
|
|
171
|
+
}));
|
|
172
|
+
slot.effect = effect;
|
|
173
|
+
slot.deps = deps;
|
|
174
|
+
slot.changed = !sameDeps(slot.committed, deps);
|
|
175
|
+
},
|
|
176
|
+
useCallback(fn, deps) {
|
|
177
|
+
const slot = take('callback', () => ({ kind: 'callback', fn, deps }));
|
|
178
|
+
if (!sameDeps(slot.deps, deps)) {
|
|
179
|
+
slot.fn = fn;
|
|
180
|
+
slot.deps = deps;
|
|
181
|
+
}
|
|
182
|
+
return slot.fn;
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
const batch = (fn) => runBatch(fn);
|
|
186
|
+
/** The result with each function field wrapped in `batch` (one wrapper per function). */
|
|
187
|
+
const wrapped = (value) => {
|
|
188
|
+
if (typeof value !== 'object' || value === null)
|
|
189
|
+
return value;
|
|
190
|
+
const out = {};
|
|
191
|
+
for (const [key, field] of Object.entries(value)) {
|
|
192
|
+
if (typeof field !== 'function') {
|
|
193
|
+
out[key] = field;
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
let wrapper = wrappers.get(field);
|
|
197
|
+
if (!wrapper) {
|
|
198
|
+
wrapper = (...args) => batch(() => field(...args));
|
|
199
|
+
wrappers.set(field, wrapper);
|
|
200
|
+
}
|
|
201
|
+
out[key] = wrapper;
|
|
202
|
+
}
|
|
203
|
+
return out;
|
|
204
|
+
};
|
|
205
|
+
let view;
|
|
206
|
+
let viewOf;
|
|
207
|
+
flush();
|
|
208
|
+
return {
|
|
209
|
+
getState() {
|
|
210
|
+
if (viewOf !== result || view === undefined) {
|
|
211
|
+
viewOf = result;
|
|
212
|
+
view = wrapped(result);
|
|
213
|
+
}
|
|
214
|
+
return view;
|
|
215
|
+
},
|
|
216
|
+
subscribe(listener) {
|
|
217
|
+
listeners.add(listener);
|
|
218
|
+
return () => {
|
|
219
|
+
listeners.delete(listener);
|
|
220
|
+
};
|
|
221
|
+
},
|
|
222
|
+
rerender() {
|
|
223
|
+
batch(() => markDirty());
|
|
224
|
+
},
|
|
225
|
+
connect() {
|
|
226
|
+
batch(() => {
|
|
227
|
+
connected = true;
|
|
228
|
+
for (const slot of slots) {
|
|
229
|
+
if (slot.kind === 'effect') {
|
|
230
|
+
slot.committed = undefined;
|
|
231
|
+
slot.changed = true;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
// A pass that commits every effect, even when no state changed.
|
|
235
|
+
markDirty();
|
|
236
|
+
});
|
|
237
|
+
return () => {
|
|
238
|
+
if (!connected)
|
|
239
|
+
return;
|
|
240
|
+
connected = false;
|
|
241
|
+
for (const slot of slots) {
|
|
242
|
+
if (slot.kind !== 'effect')
|
|
243
|
+
continue;
|
|
244
|
+
const cleanup = slot.cleanup;
|
|
245
|
+
slot.cleanup = undefined;
|
|
246
|
+
slot.committed = undefined;
|
|
247
|
+
cleanup?.();
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
},
|
|
251
|
+
batch,
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
//# sourceMappingURL=headless-hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless-hooks.js","sourceRoot":"","sources":["../../src/components/headless-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAuFH,0FAA0F;AAC1F,MAAM,UAAU,GAAG,EAAE,CAAA;AAErB,IAAI,UAAU,GAAG,CAAC,CAAA;AAClB,MAAM,cAAc,GAAG,IAAI,GAAG,EAAc,CAAA;AAE5C,MAAM,QAAQ,GAAG,CAAC,CAAiC,EAAE,CAAiC,EAAW,EAAE,CACjG,CAAC,KAAK,SAAS;IACf,CAAC,KAAK,SAAS;IACf,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;IACrB,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AAEvD,MAAM,QAAQ,GAAG,CAAI,EAAW,EAAK,EAAE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N,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The live preview panel's behaviour, written once for every framework: server polling, stuck-load
|
|
3
|
+
* recovery, the `molecule:*` postMessage bridge, the health check, the freeze watchdog, the blank
|
|
4
|
+
* notice, wake patience, back/forward and the AI `uiCommand` relay.
|
|
5
|
+
*
|
|
6
|
+
* {@link usePreviewPanelLogic} is that behaviour as one hook-shaped function. It takes the four
|
|
7
|
+
* primitive hooks it needs ({@link PrimitiveHooks}) instead of importing a framework: the React
|
|
8
|
+
* panel passes React's own `useState`/`useRef`/`useEffect`/`useCallback`, so React runs exactly the
|
|
9
|
+
* code it always ran; the Vue, Svelte, Solid and Angular panels run the same function through
|
|
10
|
+
* `createPreviewPanelSession`, which supplies those hooks itself and exposes the result as a
|
|
11
|
+
* store (`getState`/`subscribe`). The panel's timing rules (which effect re-arms on what, what a
|
|
12
|
+
* render-time reset guarantees) are therefore defined in one place, and a port cannot drift from
|
|
13
|
+
* them.
|
|
14
|
+
*
|
|
15
|
+
* @module
|
|
16
|
+
*/
|
|
17
|
+
import type { DeviceFrame, PreviewState } from '@molecule/app-live-preview';
|
|
18
|
+
import type { PreviewRenderState, PreviewStuckReport, PreviewUiCommand, PreviewUiResult } from '../types.js';
|
|
19
|
+
import { type DeviceOrientation } from './device-cycle.js';
|
|
20
|
+
import type { PrimitiveHooks } from './headless-hooks.js';
|
|
21
|
+
/**
|
|
22
|
+
* Max recovery cycles (reload + remount) before giving up. After this cap the
|
|
23
|
+
* panel STOPS retrying and shows a themed loop-breaker (Reload + Open in new tab)
|
|
24
|
+
* instead of remounting indefinitely — the old `longRetry()` looped forever.
|
|
25
|
+
*/
|
|
26
|
+
export declare const MAX_RECOVERY_CYCLES = 3;
|
|
27
|
+
/**
|
|
28
|
+
* Whether a URL points at a raw document (see {@link RAW_DOCUMENT_EXTENSIONS}) rather than
|
|
29
|
+
* an app page. Decided from the path's extension alone — the panel cannot read a
|
|
30
|
+
* cross-origin frame's content type.
|
|
31
|
+
*
|
|
32
|
+
* @param url - The absolute URL the preview is navigating to.
|
|
33
|
+
* @returns `true` when the browser will show the document itself, with no bridge.
|
|
34
|
+
*/
|
|
35
|
+
export declare function isRawDocumentUrl(url: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The targetOrigin for an OUTBOUND postMessage into the preview iframe: the
|
|
38
|
+
* iframe's CURRENT src origin when that parses, `'*'` only when it doesn't.
|
|
39
|
+
*
|
|
40
|
+
* Why: the inbound side of this bridge is gated on window identity
|
|
41
|
+
* (`event.source === iframe.contentWindow`), but the outbound side grew six
|
|
42
|
+
* wildcard posts — commands that can drive the page (click/fill/navigate)
|
|
43
|
+
* deliverable to WHATEVER page ever ended up in this frame. Targeting the
|
|
44
|
+
* frame's current src origin pins delivery to the page the panel believes it
|
|
45
|
+
* is talking to. The fallback stays `'*'` (never break the bridge: a stranded
|
|
46
|
+
* command loop is the whole preview going dark), and an unparsable src is
|
|
47
|
+
* exactly the case where no origin is known anyway.
|
|
48
|
+
*
|
|
49
|
+
* @param iframe - The preview iframe element (may be null pre-mount).
|
|
50
|
+
* @returns The targetOrigin string for `postMessage`.
|
|
51
|
+
*/
|
|
52
|
+
export declare function previewTargetOrigin(iframe: HTMLIFrameElement | null): string;
|
|
53
|
+
/** One runtime or pre-render error the preview forwards to the host. */
|
|
54
|
+
export interface PreviewErrorReport {
|
|
55
|
+
/** The error message. */
|
|
56
|
+
message: string;
|
|
57
|
+
/** Where it came from (a script URL, `pre-render`, `molecule:blank`). */
|
|
58
|
+
source?: string;
|
|
59
|
+
/** 1-based line, when the sender knows it. */
|
|
60
|
+
line?: number;
|
|
61
|
+
/** 1-based column, when the sender knows it. */
|
|
62
|
+
column?: number;
|
|
63
|
+
}
|
|
64
|
+
/** The live-preview store's state and the actions the panel's behaviour calls on it. */
|
|
65
|
+
export interface PreviewPanelPreview {
|
|
66
|
+
/** The live-preview state (load target, current location, device, history, `loadNonce`). */
|
|
67
|
+
state: PreviewState;
|
|
68
|
+
/** Selects a device frame. */
|
|
69
|
+
setDevice: (device: DeviceFrame) => void;
|
|
70
|
+
/** Records a navigation the previewed page reported (`isReplace` for `replaceState`). */
|
|
71
|
+
recordNavigation: (url: string, isReplace?: boolean) => void;
|
|
72
|
+
/** Moves the history cursor back. */
|
|
73
|
+
back: () => void;
|
|
74
|
+
/** Moves the history cursor forward. */
|
|
75
|
+
forward: () => void;
|
|
76
|
+
}
|
|
77
|
+
/** The host-facing inputs of the preview panel's behaviour (every framework's panel takes these props). */
|
|
78
|
+
export interface PreviewPanelLogicProps {
|
|
79
|
+
/**
|
|
80
|
+
* Called with batched errors from the preview iframe (pre-render errors, runtime errors, and a
|
|
81
|
+
* `molecule:blank` page), de-duplicated by signature.
|
|
82
|
+
*/
|
|
83
|
+
onPreviewError?: (errors: PreviewErrorReport[]) => void;
|
|
84
|
+
/** Called when the preview gives up loading, times out, or freezes. */
|
|
85
|
+
onPreviewStuck?: (report?: PreviewStuckReport) => void;
|
|
86
|
+
/**
|
|
87
|
+
* Asked to restart the backend dev server when reloads provably cannot produce a render against
|
|
88
|
+
* a serving host. Return `false` to decline; nothing is spent and the panel may ask again later.
|
|
89
|
+
*/
|
|
90
|
+
onRestartBackend?: () => Promise<boolean | void> | boolean | void;
|
|
91
|
+
/** Called whenever the render verdict changes, with the preview's current location. */
|
|
92
|
+
onRenderState?: (state: PreviewRenderState, url?: string) => void;
|
|
93
|
+
/** An AI-driven interaction to relay into the preview (a new `id` sends it). */
|
|
94
|
+
uiCommand?: PreviewUiCommand | null;
|
|
95
|
+
/** Called with the bridge's answer to a {@link PreviewPanelLogicProps.uiCommand}. */
|
|
96
|
+
onUiResult?: (id: string, result: PreviewUiResult) => void;
|
|
97
|
+
/** Bumped by the host on every file change; reloads a BROKEN preview after an edit. */
|
|
98
|
+
fileChangeTick?: number;
|
|
99
|
+
/** Whether the agent is building right now. */
|
|
100
|
+
isBuilding?: boolean;
|
|
101
|
+
/** When the backing preview server was last woken (ms epoch), for wake patience. */
|
|
102
|
+
wakeAt?: number;
|
|
103
|
+
}
|
|
104
|
+
/** What a framework's preview panel renders from: the behaviour's state and its handlers. */
|
|
105
|
+
export interface PreviewPanelLogic {
|
|
106
|
+
/** The box the view puts the preview `<iframe>` element in. */
|
|
107
|
+
iframeRef: {
|
|
108
|
+
current: HTMLIFrameElement | null;
|
|
109
|
+
};
|
|
110
|
+
/** The global portrait/landscape preference for rotatable devices. */
|
|
111
|
+
orientation: DeviceOrientation;
|
|
112
|
+
/** A viewport the previewed page asked for (`molecule:viewport`), overriding the device frame. */
|
|
113
|
+
requestedSize: {
|
|
114
|
+
width: number;
|
|
115
|
+
height: number;
|
|
116
|
+
} | null;
|
|
117
|
+
/** Whether the selected device can rotate. */
|
|
118
|
+
canRotate: boolean;
|
|
119
|
+
/** The preview's current location (the load target until the page reports one). */
|
|
120
|
+
currentLocation: string;
|
|
121
|
+
/** Whether {@link PreviewPanelLogic.currentLocation} is served over https. */
|
|
122
|
+
isSecureLocation: boolean;
|
|
123
|
+
/** Whether the server has ever answered for this load target. */
|
|
124
|
+
everLoaded: boolean;
|
|
125
|
+
/** Whether the iframe is revealed (the ready handshake, or the onLoad grace on a reload). */
|
|
126
|
+
iframeReady: boolean;
|
|
127
|
+
/** Whether the overlay is fading out. */
|
|
128
|
+
fadingOut: boolean;
|
|
129
|
+
/** The iframe's `src` (empty until the server answers). */
|
|
130
|
+
iframeSrc: string;
|
|
131
|
+
/** The iframe's remount key: a change mounts a fresh `<iframe>` element. */
|
|
132
|
+
iframeMountKey: number;
|
|
133
|
+
/** Stuck-load recovery cycles run for this load. */
|
|
134
|
+
stuckRetryCount: number;
|
|
135
|
+
/** Whether the panel stopped retrying and shows the "can't load here" notice. */
|
|
136
|
+
previewGaveUp: boolean;
|
|
137
|
+
/** The last frame the app posted while it rendered fine, shown blurred while it rebuilds. */
|
|
138
|
+
lastGoodFrame: string | null;
|
|
139
|
+
/** Whether the app confirmed it rendered content (`molecule:ready`). */
|
|
140
|
+
confirmedContent: boolean;
|
|
141
|
+
/** Whether the overlay shows the actionable "preview is blank" notice. */
|
|
142
|
+
blankPostBuild: boolean;
|
|
143
|
+
/** Whether the preview's main thread stopped heartbeating. */
|
|
144
|
+
previewFrozen: boolean;
|
|
145
|
+
/** The URL bar's draft text. */
|
|
146
|
+
urlDraft: string;
|
|
147
|
+
/** Whether the person is editing the URL bar. */
|
|
148
|
+
urlEditing: boolean;
|
|
149
|
+
/** The single render verdict reported to the host. */
|
|
150
|
+
renderState: PreviewRenderState;
|
|
151
|
+
/** Ends the overlay fade (the overlay's `transitionend`). */
|
|
152
|
+
setFadingOut: (value: boolean) => void;
|
|
153
|
+
/** Sets the URL bar's draft. */
|
|
154
|
+
setUrlDraft: (value: string) => void;
|
|
155
|
+
/** Marks the URL bar as being edited (focus) or not (blur). */
|
|
156
|
+
setUrlEditing: (value: boolean) => void;
|
|
157
|
+
/** Selects a device frame (and drops a page-requested viewport). */
|
|
158
|
+
handleDeviceChange: (device: DeviceFrame) => void;
|
|
159
|
+
/** Toggles portrait/landscape and persists it. */
|
|
160
|
+
handleRotate: () => void;
|
|
161
|
+
/** The iframe's `load` event. */
|
|
162
|
+
handleIframeLoad: () => void;
|
|
163
|
+
/** A person's Reload: a fresh episode with a full automatic-recovery budget. */
|
|
164
|
+
handleUserRetry: () => void;
|
|
165
|
+
/** Reloads a frozen preview. */
|
|
166
|
+
handleReloadFrozen: () => void;
|
|
167
|
+
/** Back: moves the history cursor and runs `history.back()` inside the preview. */
|
|
168
|
+
handleBack: () => void;
|
|
169
|
+
/** Forward: moves the history cursor and runs `history.forward()` inside the preview. */
|
|
170
|
+
handleForward: () => void;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* The live preview panel's behaviour as one hook-shaped function (see the module docs). Call it
|
|
174
|
+
* once per render of the panel, at the top level, with the same `hooks` every time.
|
|
175
|
+
*
|
|
176
|
+
* @param hooks - The primitive hooks (React's own, or the headless session's).
|
|
177
|
+
* @param preview - The live-preview state and actions.
|
|
178
|
+
* @param props - The host's inputs.
|
|
179
|
+
* @returns The state the view renders and the handlers it wires.
|
|
180
|
+
*/
|
|
181
|
+
export declare function usePreviewPanelLogic(hooks: PrimitiveHooks, preview: PreviewPanelPreview, props: PreviewPanelLogicProps): PreviewPanelLogic;
|
|
182
|
+
//# sourceMappingURL=preview-panel-logic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-panel-logic.d.ts","sourceRoot":"","sources":["../../src/components/preview-panel-logic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAI3E,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,mBAAmB,CAAA;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAyDzD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAA;AAkKpC;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAYrD;AA2KD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAAG,MAAM,CAU5E;AAED,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,wFAAwF;AACxF,MAAM,WAAW,mBAAmB;IAClC,4FAA4F;IAC5F,KAAK,EA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