@forgeax/app-shell 0.18.0 → 0.20.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.
package/dist/react.d.ts CHANGED
@@ -66,6 +66,24 @@ declare function DetachedSurfaceFrame({ children, panel, centered, }: DetachedSu
66
66
  /** Product-neutral status text for a detached frame; callers retain the copy. */
67
67
  declare function DetachedSurfaceStatus({ children, tone, }: DetachedSurfaceStatusProps): ReactElement;
68
68
 
69
+ interface SurfacePlaceholderProps {
70
+ title: ReactNode;
71
+ /** Optional caller-owned modifier; product variants remain outside App Shell. */
72
+ className?: string;
73
+ }
74
+ /** Product-neutral empty renderer placeholder with stable shell hooks. */
75
+ declare function SurfacePlaceholder({ title, className, }: SurfacePlaceholderProps): ReactElement;
76
+
77
+ interface SurfaceRegionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
78
+ children: ReactNode;
79
+ /** Caller-owned content layered outside the fill body. */
80
+ overlay?: ReactNode;
81
+ /** Optional caller-owned modifier for the fill body. */
82
+ bodyClassName?: string;
83
+ }
84
+ /** Product-neutral full-size surface region with an explicit fill body. */
85
+ declare const SurfaceRegion: react.ForwardRefExoticComponent<SurfaceRegionProps & react.RefAttributes<HTMLDivElement>>;
86
+
69
87
  type ShellSlotElement = 'aside' | 'div' | 'main' | 'section';
70
88
  interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
71
89
  as?: ShellSlotElement;
@@ -74,4 +92,4 @@ interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
74
92
  /** Structural shell marker that preserves the caller's semantic element. */
75
93
  declare function ShellSlot({ as, name, ...props }: ShellSlotProps): ReactElement;
76
94
 
77
- export { DetachedPanelBoundary, type DetachedPanelBoundaryProps, DetachedSurfaceFrame, type DetachedSurfaceFrameProps, DetachedSurfaceStatus, type DetachedSurfaceStatusProps, type DetachedSurfaceStatusTone, type PanelContentPadding, type PanelContentPolicy, type PanelContentScroll, type PanelContentTone, PanelSurface, type PanelSurfaceProps, ResizeHandle, type ResizeHandleProps, ShellSlot, type ShellSlotElement, type ShellSlotProps, SlotDebugOverlay, hashSlotHue, isSlotDebugEnabled, useLocalSize };
95
+ export { DetachedPanelBoundary, type DetachedPanelBoundaryProps, DetachedSurfaceFrame, type DetachedSurfaceFrameProps, DetachedSurfaceStatus, type DetachedSurfaceStatusProps, type DetachedSurfaceStatusTone, type PanelContentPadding, type PanelContentPolicy, type PanelContentScroll, type PanelContentTone, PanelSurface, type PanelSurfaceProps, ResizeHandle, type ResizeHandleProps, ShellSlot, type ShellSlotElement, type ShellSlotProps, SlotDebugOverlay, SurfacePlaceholder, type SurfacePlaceholderProps, SurfaceRegion, type SurfaceRegionProps, hashSlotHue, isSlotDebugEnabled, useLocalSize };
package/dist/react.js CHANGED
@@ -344,6 +344,44 @@ function DetachedSurfaceStatus({
344
344
  return /* @__PURE__ */ jsx4("span", { className: "fx-detached-surface-status-text", "data-tone": tone, children });
345
345
  }
346
346
 
347
+ // src/surface-placeholder.tsx
348
+ import { jsx as jsx5 } from "react/jsx-runtime";
349
+ function SurfacePlaceholder({
350
+ title,
351
+ className
352
+ }) {
353
+ return /* @__PURE__ */ jsx5("div", { className: className ? `surface-placeholder ${className}` : "surface-placeholder", children: /* @__PURE__ */ jsx5("div", { className: "surface-placeholder-title", children: title }) });
354
+ }
355
+
356
+ // src/surface-region.tsx
357
+ import {
358
+ forwardRef
359
+ } from "react";
360
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
361
+ var joinClassNames = (base, modifier) => modifier ? `${base} ${modifier}` : base;
362
+ var SurfaceRegion = forwardRef(
363
+ function SurfaceRegion2({
364
+ children,
365
+ overlay,
366
+ className,
367
+ bodyClassName,
368
+ ...props
369
+ }, ref) {
370
+ return /* @__PURE__ */ jsxs2(
371
+ "div",
372
+ {
373
+ ...props,
374
+ ref,
375
+ className: joinClassNames("fx-surface-region", className),
376
+ children: [
377
+ overlay == null ? null : /* @__PURE__ */ jsx6("div", { className: "fx-surface-region-overlay", children: overlay }),
378
+ /* @__PURE__ */ jsx6("div", { className: joinClassNames("fx-surface-region-body", bodyClassName), children })
379
+ ]
380
+ }
381
+ );
382
+ }
383
+ );
384
+
347
385
  // src/react.tsx
348
386
  function ShellSlot({
349
387
  as = "div",
@@ -360,6 +398,8 @@ export {
360
398
  ResizeHandle,
361
399
  ShellSlot,
362
400
  SlotDebugOverlay,
401
+ SurfacePlaceholder,
402
+ SurfaceRegion,
363
403
  hashSlotHue,
364
404
  isSlotDebugEnabled,
365
405
  useLocalSize
@@ -0,0 +1,19 @@
1
+ .fx-surface-region {
2
+ position: relative;
3
+ width: 100%;
4
+ height: 100%;
5
+ display: flex;
6
+ flex-direction: column;
7
+ min-height: 0;
8
+ }
9
+
10
+ .fx-surface-region-body {
11
+ flex: 1 1 auto;
12
+ min-height: 0;
13
+ display: flex;
14
+ flex-direction: column;
15
+ }
16
+
17
+ .fx-surface-region-overlay {
18
+ display: contents;
19
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@forgeax/app-shell",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "description": "Generic Dock, Panel, Window, and Slot composition primitives",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
- "sideEffects": ["./dist/resize.css", "./dist/panel.css", "./dist/detached.css"],
7
+ "sideEffects": ["./dist/resize.css", "./dist/panel.css", "./dist/detached.css", "./dist/surface.css"],
8
8
  "files": ["dist"],
9
9
  "main": "./dist/index.js",
10
10
  "types": "./dist/index.d.ts",
@@ -27,12 +27,13 @@
27
27
  },
28
28
  "./resize.css": "./dist/resize.css",
29
29
  "./panel.css": "./dist/panel.css",
30
- "./detached.css": "./dist/detached.css"
30
+ "./detached.css": "./dist/detached.css",
31
+ "./surface.css": "./dist/surface.css"
31
32
  },
32
33
  "scripts": {
33
34
  "typecheck": "tsc --noEmit",
34
35
  "test": "bun test test",
35
- "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",
36
+ "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",
36
37
  "check": "bun run typecheck && bun run test && bun run build",
37
38
  "release:preflight": "bun run scripts/release-preflight.ts"
38
39
  },