@forgeax/app-shell 0.64.0 → 0.65.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/dist/dock.js CHANGED
@@ -29,7 +29,6 @@ import {
29
29
  resolveRegion,
30
30
  trackDockPanelVisibility
31
31
  } from "./chunk-MYY2LEZI.js";
32
- import "./chunk-QGM4M3NI.js";
33
32
  export {
34
33
  DOCK_REGIONS,
35
34
  REGIONS,
package/dist/index.js CHANGED
@@ -1,5 +1,3 @@
1
- import "./chunk-QGM4M3NI.js";
2
-
3
1
  // src/index.ts
4
2
  var AppShellRegistry = class {
5
3
  #contributions = /* @__PURE__ */ new Map();
package/dist/react.d.ts CHANGED
@@ -346,6 +346,16 @@ interface ActivePanelObservationOptions<ChangeEvent = unknown> {
346
346
  /** Observe active-panel changes without owning panel selection or reconciliation policy. */
347
347
  declare function installActivePanelObservation<ChangeEvent>(options: ActivePanelObservationOptions<ChangeEvent>): () => void;
348
348
 
349
+ interface LayoutFromJsonObservationSubscription {
350
+ dispose(): void;
351
+ }
352
+ interface LayoutFromJsonObservationOptions<HydrationEvent = unknown> {
353
+ readonly subscribe: (listener: (event: HydrationEvent) => void) => LayoutFromJsonObservationSubscription;
354
+ readonly onHydrated: (event: HydrationEvent) => void;
355
+ }
356
+ /** Observe completed layout hydration without owning product reconciliation policy. */
357
+ declare function installLayoutFromJsonObservation<HydrationEvent>(options: LayoutFromJsonObservationOptions<HydrationEvent>): () => void;
358
+
349
359
  type PanelContentPadding = 'none' | 'sm' | 'md';
350
360
  type PanelContentScroll = 'none' | 'auto';
351
361
  type PanelContentTone = 'default' | 'surface' | 'tool';
@@ -487,4 +497,4 @@ interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
487
497
  /** Structural shell marker that preserves the caller's semantic element. */
488
498
  declare function ShellSlot({ as, name, ...props }: ShellSlotProps): ReactElement;
489
499
 
490
- export { type ActivePanelObservationOptions, type ActivePanelObservationSubscription, type AnchoredResizeDirection, AnchoredResizeHandle, type AnchoredResizeHandleProps, type AnchoredResizeSession, type BoundedFrameRetryLifecycleOptions, type CaptureInteractionEventTarget, type CaptureInteractionObservationOptions, type CoalescedFrameTaskLifecycle, type CoalescedFrameTaskLifecycleOptions, type CustomEventObservationOptions, type CustomEventObservationTarget, DetachedPanelBoundary, type DetachedPanelBoundaryProps, DetachedSurfaceFrame, type DetachedSurfaceFrameProps, DetachedSurfaceStatus, type DetachedSurfaceStatusProps, type DetachedSurfaceStatusTone, type DockLayoutControlBinding, type DockLayoutControlBindingOptions, DockLayoutMenu, type DockLayoutMenuPanel, type DockLayoutMenuProps, DockTabAction, type DockTabActionProps, DockTabFrame, type DockTabFrameProps, DockTabIcon, type DockTabIconProps, DockTabStatusSummary, type DockTabStatusSummaryItem, type DockTabStatusSummaryProps, type DockTabStatusTone, DockTabTitle, type DockTabTitleProps, type DragPresenceEventTarget, type DragPresenceLifecycleOptions, FloatingMenu, type FloatingMenuAnchor, type FloatingMenuPoint, type FloatingMenuProps, type LiveTabPlacement, type LiveTabPlacementSource, type LiveTabTitleSource, OWNED_INTERACTION_SURFACE_SELECTOR, type OutsideDismissEventTarget, type OutsideDismissLifecycleOptions, type OutsideDismissReason, type PanelContentPadding, type PanelContentPolicy, type PanelContentScroll, type PanelContentTone, PanelEmptyState, type PanelEmptyStateProps, type PanelMembershipObservationOptions, type PanelMembershipObservationSubscription, PanelSurface, type PanelSurfaceProps, type PersistentSizeStorage, type PersistentSizeStore, type PersistentSizeStoreOptions, type PersistentSizeUpdate, type PointerDragFinishReason, type PointerDragSessionOptions, type PointerReorderFinishReason, type PointerReorderSession, type PointerReorderSessionOptions, type ReplaceableObservationSetLifecycle, type ReplaceableObservationSetOptions, type ReplaceableObservationSubscription, ResizeHandle, type ResizeHandleProps, ShellSlot, type ShellSlotElement, type ShellSlotProps, SlotDebugOverlay, SurfacePlaceholder, type SurfacePlaceholderProps, SurfaceRegion, type SurfaceRegionProps, type TabCloseInteractions, type TabCloseInteractionsOptions, type TabPinnedStateSource, type ThresholdPointerDragFinishReason, type ThresholdPointerDragSession, type ThresholdPointerDragSessionOptions, type ViewportResizeEventTarget, type ViewportResizeObservationOptions, applyAnchoredResizeDelta, beginAnchoredResize, createCoalescedFrameTaskLifecycle, createPersistentSizeStore, createReplaceableObservationSetLifecycle, hashSlotHue, installActivePanelObservation, installBoundedFrameRetryLifecycle, installCaptureInteractionObservation, installCustomEventObservation, installDragPresenceLifecycle, installOutsideDismissLifecycle, installPanelMembershipObservation, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, installViewportResizeObservation, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
500
+ export { type ActivePanelObservationOptions, type ActivePanelObservationSubscription, type AnchoredResizeDirection, AnchoredResizeHandle, type AnchoredResizeHandleProps, type AnchoredResizeSession, type BoundedFrameRetryLifecycleOptions, type CaptureInteractionEventTarget, type CaptureInteractionObservationOptions, type CoalescedFrameTaskLifecycle, type CoalescedFrameTaskLifecycleOptions, type CustomEventObservationOptions, type CustomEventObservationTarget, DetachedPanelBoundary, type DetachedPanelBoundaryProps, DetachedSurfaceFrame, type DetachedSurfaceFrameProps, DetachedSurfaceStatus, type DetachedSurfaceStatusProps, type DetachedSurfaceStatusTone, type DockLayoutControlBinding, type DockLayoutControlBindingOptions, DockLayoutMenu, type DockLayoutMenuPanel, type DockLayoutMenuProps, DockTabAction, type DockTabActionProps, DockTabFrame, type DockTabFrameProps, DockTabIcon, type DockTabIconProps, DockTabStatusSummary, type DockTabStatusSummaryItem, type DockTabStatusSummaryProps, type DockTabStatusTone, DockTabTitle, type DockTabTitleProps, type DragPresenceEventTarget, type DragPresenceLifecycleOptions, FloatingMenu, type FloatingMenuAnchor, type FloatingMenuPoint, type FloatingMenuProps, type LayoutFromJsonObservationOptions, type LayoutFromJsonObservationSubscription, type LiveTabPlacement, type LiveTabPlacementSource, type LiveTabTitleSource, OWNED_INTERACTION_SURFACE_SELECTOR, type OutsideDismissEventTarget, type OutsideDismissLifecycleOptions, type OutsideDismissReason, type PanelContentPadding, type PanelContentPolicy, type PanelContentScroll, type PanelContentTone, PanelEmptyState, type PanelEmptyStateProps, type PanelMembershipObservationOptions, type PanelMembershipObservationSubscription, PanelSurface, type PanelSurfaceProps, type PersistentSizeStorage, type PersistentSizeStore, type PersistentSizeStoreOptions, type PersistentSizeUpdate, type PointerDragFinishReason, type PointerDragSessionOptions, type PointerReorderFinishReason, type PointerReorderSession, type PointerReorderSessionOptions, type ReplaceableObservationSetLifecycle, type ReplaceableObservationSetOptions, type ReplaceableObservationSubscription, ResizeHandle, type ResizeHandleProps, ShellSlot, type ShellSlotElement, type ShellSlotProps, SlotDebugOverlay, SurfacePlaceholder, type SurfacePlaceholderProps, SurfaceRegion, type SurfaceRegionProps, type TabCloseInteractions, type TabCloseInteractionsOptions, type TabPinnedStateSource, type ThresholdPointerDragFinishReason, type ThresholdPointerDragSession, type ThresholdPointerDragSessionOptions, type ViewportResizeEventTarget, type ViewportResizeObservationOptions, applyAnchoredResizeDelta, beginAnchoredResize, createCoalescedFrameTaskLifecycle, createPersistentSizeStore, createReplaceableObservationSetLifecycle, hashSlotHue, installActivePanelObservation, installBoundedFrameRetryLifecycle, installCaptureInteractionObservation, installCustomEventObservation, installDragPresenceLifecycle, installLayoutFromJsonObservation, installOutsideDismissLifecycle, installPanelMembershipObservation, installPointerDragSession, installPointerReorderSession, installThresholdPointerDragSession, installViewportResizeObservation, isDismissExemptInteractionTarget, isSlotDebugEnabled, useDockLayoutControlBinding, useLiveTabPlacement, useLiveTabTitle, useLocalSize, usePersistentSizeStore, useTabCloseInteractions, useTabPinnedState };
package/dist/react.js CHANGED
@@ -5,430 +5,6 @@ import {
5
5
  import {
6
6
  shouldShowDetachedPlaceholder
7
7
  } from "./chunk-QMT4V6XC.js";
8
- import {
9
- __commonJS,
10
- __require,
11
- __toESM
12
- } from "./chunk-QGM4M3NI.js";
13
-
14
- // node_modules/react-dom/cjs/react-dom.production.js
15
- var require_react_dom_production = __commonJS({
16
- "node_modules/react-dom/cjs/react-dom.production.js"(exports) {
17
- "use strict";
18
- var React = __require("react");
19
- function formatProdErrorMessage(code) {
20
- var url = "https://react.dev/errors/" + code;
21
- if (1 < arguments.length) {
22
- url += "?args[]=" + encodeURIComponent(arguments[1]);
23
- for (var i = 2; i < arguments.length; i++)
24
- url += "&args[]=" + encodeURIComponent(arguments[i]);
25
- }
26
- return "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
27
- }
28
- function noop() {
29
- }
30
- var Internals = {
31
- d: {
32
- f: noop,
33
- r: function() {
34
- throw Error(formatProdErrorMessage(522));
35
- },
36
- D: noop,
37
- C: noop,
38
- L: noop,
39
- m: noop,
40
- X: noop,
41
- S: noop,
42
- M: noop
43
- },
44
- p: 0,
45
- findDOMNode: null
46
- };
47
- var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
48
- function createPortal$1(children, containerInfo, implementation) {
49
- var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
50
- return {
51
- $$typeof: REACT_PORTAL_TYPE,
52
- key: null == key ? null : "" + key,
53
- children,
54
- containerInfo,
55
- implementation
56
- };
57
- }
58
- var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
59
- function getCrossOriginStringAs(as, input) {
60
- if ("font" === as) return "";
61
- if ("string" === typeof input)
62
- return "use-credentials" === input ? input : "";
63
- }
64
- exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
65
- exports.createPortal = function(children, container) {
66
- var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
67
- if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
68
- throw Error(formatProdErrorMessage(299));
69
- return createPortal$1(children, container, null, key);
70
- };
71
- exports.flushSync = function(fn) {
72
- var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
73
- try {
74
- if (ReactSharedInternals.T = null, Internals.p = 2, fn) return fn();
75
- } finally {
76
- ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f();
77
- }
78
- };
79
- exports.preconnect = function(href, options) {
80
- "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
81
- };
82
- exports.prefetchDNS = function(href) {
83
- "string" === typeof href && Internals.d.D(href);
84
- };
85
- exports.preinit = function(href, options) {
86
- if ("string" === typeof href && options && "string" === typeof options.as) {
87
- var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
88
- "style" === as ? Internals.d.S(
89
- href,
90
- "string" === typeof options.precedence ? options.precedence : void 0,
91
- {
92
- crossOrigin,
93
- integrity,
94
- fetchPriority
95
- }
96
- ) : "script" === as && Internals.d.X(href, {
97
- crossOrigin,
98
- integrity,
99
- fetchPriority,
100
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
101
- });
102
- }
103
- };
104
- exports.preinitModule = function(href, options) {
105
- if ("string" === typeof href)
106
- if ("object" === typeof options && null !== options) {
107
- if (null == options.as || "script" === options.as) {
108
- var crossOrigin = getCrossOriginStringAs(
109
- options.as,
110
- options.crossOrigin
111
- );
112
- Internals.d.M(href, {
113
- crossOrigin,
114
- integrity: "string" === typeof options.integrity ? options.integrity : void 0,
115
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
116
- });
117
- }
118
- } else null == options && Internals.d.M(href);
119
- };
120
- exports.preload = function(href, options) {
121
- if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
122
- var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
123
- Internals.d.L(href, as, {
124
- crossOrigin,
125
- integrity: "string" === typeof options.integrity ? options.integrity : void 0,
126
- nonce: "string" === typeof options.nonce ? options.nonce : void 0,
127
- type: "string" === typeof options.type ? options.type : void 0,
128
- fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
129
- referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
130
- imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
131
- imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
132
- media: "string" === typeof options.media ? options.media : void 0
133
- });
134
- }
135
- };
136
- exports.preloadModule = function(href, options) {
137
- if ("string" === typeof href)
138
- if (options) {
139
- var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
140
- Internals.d.m(href, {
141
- as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
142
- crossOrigin,
143
- integrity: "string" === typeof options.integrity ? options.integrity : void 0
144
- });
145
- } else Internals.d.m(href);
146
- };
147
- exports.requestFormReset = function(form) {
148
- Internals.d.r(form);
149
- };
150
- exports.unstable_batchedUpdates = function(fn, a) {
151
- return fn(a);
152
- };
153
- exports.useFormState = function(action, initialState, permalink) {
154
- return ReactSharedInternals.H.useFormState(action, initialState, permalink);
155
- };
156
- exports.useFormStatus = function() {
157
- return ReactSharedInternals.H.useHostTransitionStatus();
158
- };
159
- exports.version = "19.2.8";
160
- }
161
- });
162
-
163
- // node_modules/react-dom/cjs/react-dom.development.js
164
- var require_react_dom_development = __commonJS({
165
- "node_modules/react-dom/cjs/react-dom.development.js"(exports) {
166
- "use strict";
167
- "production" !== process.env.NODE_ENV && (function() {
168
- function noop() {
169
- }
170
- function testStringCoercion(value) {
171
- return "" + value;
172
- }
173
- function createPortal$1(children, containerInfo, implementation) {
174
- var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
175
- try {
176
- testStringCoercion(key);
177
- var JSCompiler_inline_result = false;
178
- } catch (e) {
179
- JSCompiler_inline_result = true;
180
- }
181
- JSCompiler_inline_result && (console.error(
182
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
183
- "function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"
184
- ), testStringCoercion(key));
185
- return {
186
- $$typeof: REACT_PORTAL_TYPE,
187
- key: null == key ? null : "" + key,
188
- children,
189
- containerInfo,
190
- implementation
191
- };
192
- }
193
- function getCrossOriginStringAs(as, input) {
194
- if ("font" === as) return "";
195
- if ("string" === typeof input)
196
- return "use-credentials" === input ? input : "";
197
- }
198
- function getValueDescriptorExpectingObjectForWarning(thing) {
199
- return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"';
200
- }
201
- function getValueDescriptorExpectingEnumForWarning(thing) {
202
- return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : 'something with type "' + typeof thing + '"';
203
- }
204
- function resolveDispatcher() {
205
- var dispatcher = ReactSharedInternals.H;
206
- null === dispatcher && console.error(
207
- "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
208
- );
209
- return dispatcher;
210
- }
211
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
212
- var React = __require("react"), Internals = {
213
- d: {
214
- f: noop,
215
- r: function() {
216
- throw Error(
217
- "Invalid form element. requestFormReset must be passed a form that was rendered by React."
218
- );
219
- },
220
- D: noop,
221
- C: noop,
222
- L: noop,
223
- m: noop,
224
- X: noop,
225
- S: noop,
226
- M: noop
227
- },
228
- p: 0,
229
- findDOMNode: null
230
- }, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
231
- "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error(
232
- "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
233
- );
234
- exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
235
- exports.createPortal = function(children, container) {
236
- var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
237
- if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
238
- throw Error("Target container is not a DOM element.");
239
- return createPortal$1(children, container, null, key);
240
- };
241
- exports.flushSync = function(fn) {
242
- var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
243
- try {
244
- if (ReactSharedInternals.T = null, Internals.p = 2, fn)
245
- return fn();
246
- } finally {
247
- ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error(
248
- "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
249
- );
250
- }
251
- };
252
- exports.preconnect = function(href, options) {
253
- "string" === typeof href && href ? null != options && "object" !== typeof options ? console.error(
254
- "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
255
- getValueDescriptorExpectingEnumForWarning(options)
256
- ) : null != options && "string" !== typeof options.crossOrigin && console.error(
257
- "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
258
- getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
259
- ) : console.error(
260
- "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
261
- getValueDescriptorExpectingObjectForWarning(href)
262
- );
263
- "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
264
- };
265
- exports.prefetchDNS = function(href) {
266
- if ("string" !== typeof href || !href)
267
- console.error(
268
- "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
269
- getValueDescriptorExpectingObjectForWarning(href)
270
- );
271
- else if (1 < arguments.length) {
272
- var options = arguments[1];
273
- "object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error(
274
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
275
- getValueDescriptorExpectingEnumForWarning(options)
276
- ) : console.error(
277
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
278
- getValueDescriptorExpectingEnumForWarning(options)
279
- );
280
- }
281
- "string" === typeof href && Internals.d.D(href);
282
- };
283
- exports.preinit = function(href, options) {
284
- "string" === typeof href && href ? null == options || "object" !== typeof options ? console.error(
285
- "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
286
- getValueDescriptorExpectingEnumForWarning(options)
287
- ) : "style" !== options.as && "script" !== options.as && console.error(
288
- 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
289
- getValueDescriptorExpectingEnumForWarning(options.as)
290
- ) : console.error(
291
- "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
292
- getValueDescriptorExpectingObjectForWarning(href)
293
- );
294
- if ("string" === typeof href && options && "string" === typeof options.as) {
295
- var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
296
- "style" === as ? Internals.d.S(
297
- href,
298
- "string" === typeof options.precedence ? options.precedence : void 0,
299
- {
300
- crossOrigin,
301
- integrity,
302
- fetchPriority
303
- }
304
- ) : "script" === as && Internals.d.X(href, {
305
- crossOrigin,
306
- integrity,
307
- fetchPriority,
308
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
309
- });
310
- }
311
- };
312
- exports.preinitModule = function(href, options) {
313
- var encountered = "";
314
- "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
315
- void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + ".");
316
- if (encountered)
317
- console.error(
318
- "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
319
- encountered
320
- );
321
- else
322
- switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) {
323
- case "script":
324
- break;
325
- default:
326
- encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error(
327
- 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
328
- encountered,
329
- href
330
- );
331
- }
332
- if ("string" === typeof href)
333
- if ("object" === typeof options && null !== options) {
334
- if (null == options.as || "script" === options.as)
335
- encountered = getCrossOriginStringAs(
336
- options.as,
337
- options.crossOrigin
338
- ), Internals.d.M(href, {
339
- crossOrigin: encountered,
340
- integrity: "string" === typeof options.integrity ? options.integrity : void 0,
341
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
342
- });
343
- } else null == options && Internals.d.M(href);
344
- };
345
- exports.preload = function(href, options) {
346
- var encountered = "";
347
- "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
348
- null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
349
- encountered && console.error(
350
- 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
351
- encountered
352
- );
353
- if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
354
- encountered = options.as;
355
- var crossOrigin = getCrossOriginStringAs(
356
- encountered,
357
- options.crossOrigin
358
- );
359
- Internals.d.L(href, encountered, {
360
- crossOrigin,
361
- integrity: "string" === typeof options.integrity ? options.integrity : void 0,
362
- nonce: "string" === typeof options.nonce ? options.nonce : void 0,
363
- type: "string" === typeof options.type ? options.type : void 0,
364
- fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
365
- referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
366
- imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
367
- imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
368
- media: "string" === typeof options.media ? options.media : void 0
369
- });
370
- }
371
- };
372
- exports.preloadModule = function(href, options) {
373
- var encountered = "";
374
- "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
375
- void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
376
- encountered && console.error(
377
- 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
378
- encountered
379
- );
380
- "string" === typeof href && (options ? (encountered = getCrossOriginStringAs(
381
- options.as,
382
- options.crossOrigin
383
- ), Internals.d.m(href, {
384
- as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
385
- crossOrigin: encountered,
386
- integrity: "string" === typeof options.integrity ? options.integrity : void 0
387
- })) : Internals.d.m(href));
388
- };
389
- exports.requestFormReset = function(form) {
390
- Internals.d.r(form);
391
- };
392
- exports.unstable_batchedUpdates = function(fn, a) {
393
- return fn(a);
394
- };
395
- exports.useFormState = function(action, initialState, permalink) {
396
- return resolveDispatcher().useFormState(action, initialState, permalink);
397
- };
398
- exports.useFormStatus = function() {
399
- return resolveDispatcher().useHostTransitionStatus();
400
- };
401
- exports.version = "19.2.8";
402
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
403
- })();
404
- }
405
- });
406
-
407
- // node_modules/react-dom/index.js
408
- var require_react_dom = __commonJS({
409
- "node_modules/react-dom/index.js"(exports, module) {
410
- "use strict";
411
- function checkDCE() {
412
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") {
413
- return;
414
- }
415
- if (process.env.NODE_ENV !== "production") {
416
- throw new Error("^_^");
417
- }
418
- try {
419
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
420
- } catch (err) {
421
- console.error(err);
422
- }
423
- }
424
- if (process.env.NODE_ENV === "production") {
425
- checkDCE();
426
- module.exports = require_react_dom_production();
427
- } else {
428
- module.exports = require_react_dom_development();
429
- }
430
- }
431
- });
432
8
 
433
9
  // src/react.tsx
434
10
  import { createElement } from "react";
@@ -2200,6 +1776,37 @@ function installActivePanelObservation(options) {
2200
1776
  };
2201
1777
  }
2202
1778
 
1779
+ // src/layout-from-json-observation.ts
1780
+ function installLayoutFromJsonObservation(options) {
1781
+ let live = true;
1782
+ let subscription;
1783
+ const onHydrated = (event) => {
1784
+ if (!live) return;
1785
+ try {
1786
+ options.onHydrated(event);
1787
+ } catch {
1788
+ }
1789
+ };
1790
+ const disposeSubscription = () => {
1791
+ if (!subscription) return;
1792
+ try {
1793
+ subscription.dispose();
1794
+ } catch {
1795
+ }
1796
+ };
1797
+ try {
1798
+ subscription = options.subscribe(onHydrated);
1799
+ } catch {
1800
+ live = false;
1801
+ disposeSubscription();
1802
+ }
1803
+ return () => {
1804
+ if (!live) return;
1805
+ live = false;
1806
+ disposeSubscription();
1807
+ };
1808
+ }
1809
+
2203
1810
  // src/panel.tsx
2204
1811
  import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
2205
1812
  function PanelEmptyState({
@@ -2365,8 +1972,8 @@ function useDockLayoutControlBinding({
2365
1972
  }
2366
1973
 
2367
1974
  // src/floating-menu.tsx
2368
- var import_react_dom = __toESM(require_react_dom(), 1);
2369
1975
  import { useEffect as useEffect5, useLayoutEffect, useRef as useRef3, useState as useState3 } from "react";
1976
+ import { createPortal } from "react-dom";
2370
1977
  import { Fragment, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
2371
1978
  var VIEWPORT_PADDING = 8;
2372
1979
  function FloatingMenu({
@@ -2425,7 +2032,7 @@ function FloatingMenu({
2425
2032
  return () => document.removeEventListener("keydown", closeOnEscape);
2426
2033
  }, [onClose, open]);
2427
2034
  if (!open) return null;
2428
- return (0, import_react_dom.createPortal)(
2035
+ return createPortal(
2429
2036
  /* @__PURE__ */ jsxs5(Fragment, { children: [
2430
2037
  /* @__PURE__ */ jsx9(
2431
2038
  "div",
@@ -2580,6 +2187,7 @@ export {
2580
2187
  installCaptureInteractionObservation,
2581
2188
  installCustomEventObservation,
2582
2189
  installDragPresenceLifecycle,
2190
+ installLayoutFromJsonObservation,
2583
2191
  installOutsideDismissLifecycle,
2584
2192
  installPanelMembershipObservation,
2585
2193
  installPointerDragSession,
@@ -2596,27 +2204,3 @@ export {
2596
2204
  useTabCloseInteractions,
2597
2205
  useTabPinnedState
2598
2206
  };
2599
- /*! Bundled license information:
2600
-
2601
- react-dom/cjs/react-dom.production.js:
2602
- (**
2603
- * @license React
2604
- * react-dom.production.js
2605
- *
2606
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2607
- *
2608
- * This source code is licensed under the MIT license found in the
2609
- * LICENSE file in the root directory of this source tree.
2610
- *)
2611
-
2612
- react-dom/cjs/react-dom.development.js:
2613
- (**
2614
- * @license React
2615
- * react-dom.development.js
2616
- *
2617
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2618
- *
2619
- * This source code is licensed under the MIT license found in the
2620
- * LICENSE file in the root directory of this source tree.
2621
- *)
2622
- */
package/dist/window.js CHANGED
@@ -11,7 +11,6 @@ import {
11
11
  surfaceKey,
12
12
  surfaceWindowLabel
13
13
  } from "./chunk-QMT4V6XC.js";
14
- import "./chunk-QGM4M3NI.js";
15
14
  export {
16
15
  canOpenPanelWindow,
17
16
  createBrowserWindowManager,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeax/app-shell",
3
- "version": "0.64.0",
3
+ "version": "0.65.1",
4
4
  "description": "Generic Dock, Panel, Window, and Slot composition primitives",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -34,7 +34,7 @@
34
34
  "scripts": {
35
35
  "typecheck": "tsc --noEmit",
36
36
  "test": "bun test test",
37
- "build": "tsup src/index.ts src/dock.ts src/window.ts src/react.tsx --format esm --dts --outDir dist && bun run scripts/copy-resize-css.ts && bun run scripts/copy-panel-css.ts && bun run scripts/copy-detached-surface-css.ts && bun run scripts/copy-surface-css.ts && bun run scripts/copy-dock-tab-css.ts",
37
+ "build": "tsup src/index.ts src/dock.ts src/window.ts src/react.tsx --format esm --dts --outDir dist --external react --external react-dom && bun run scripts/copy-resize-css.ts && bun run scripts/copy-panel-css.ts && bun run scripts/copy-detached-surface-css.ts && bun run scripts/copy-surface-css.ts && bun run scripts/copy-dock-tab-css.ts",
38
38
  "check": "bun run typecheck && bun run test && bun run build",
39
39
  "release:preflight": "bun run scripts/release-preflight.ts"
40
40
  },
@@ -42,7 +42,8 @@
42
42
  "@forgeax/extension-contracts": "^0.1.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "react": "^19.0.0"
45
+ "react": "^19.0.0",
46
+ "react-dom": "^19.0.0"
46
47
  },
47
48
  "devDependencies": {
48
49
  "@happy-dom/global-registrator": "^20.10.2",
@@ -1,37 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x + '" is not supported');
12
- });
13
- var __commonJS = (cb, mod) => function __require2() {
14
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
- };
16
- var __copyProps = (to, from, except, desc) => {
17
- if (from && typeof from === "object" || typeof from === "function") {
18
- for (let key of __getOwnPropNames(from))
19
- if (!__hasOwnProp.call(to, key) && key !== except)
20
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
- mod
31
- ));
32
-
33
- export {
34
- __require,
35
- __commonJS,
36
- __toESM
37
- };