@forgeax/app-shell 0.19.0 → 0.21.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/panel.css CHANGED
@@ -39,3 +39,28 @@
39
39
  .fx-panel-content[data-tone="tool"] {
40
40
  background: var(--color-background-base, #191919);
41
41
  }
42
+
43
+ .fx-panel-empty {
44
+ height: 100%;
45
+ min-height: 120px;
46
+ display: flex;
47
+ flex-direction: column;
48
+ align-items: center;
49
+ justify-content: center;
50
+ gap: 6px;
51
+ padding: 16px;
52
+ color: var(--color-text-tertiary, #778);
53
+ text-align: center;
54
+ }
55
+
56
+ .fx-panel-empty-title {
57
+ color: var(--color-text-secondary, #aab);
58
+ font-size: 13px;
59
+ font-weight: 600;
60
+ }
61
+
62
+ .fx-panel-empty-detail {
63
+ font-family: var(--font-mono, monospace);
64
+ font-size: 11px;
65
+ opacity: 0.72;
66
+ }
package/dist/react.d.ts CHANGED
@@ -37,6 +37,12 @@ interface PanelSurfaceProps extends Omit<HTMLAttributes<HTMLElement>, 'children'
37
37
  readonly content?: PanelContentPolicy;
38
38
  readonly children?: ReactNode;
39
39
  }
40
+ interface PanelEmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'title'> {
41
+ readonly title: ReactNode;
42
+ readonly detail?: ReactNode;
43
+ }
44
+ /** Product-neutral empty panel presentation with caller-owned content. */
45
+ declare function PanelEmptyState({ title, detail, className, ...props }: PanelEmptyStateProps): ReactElement;
40
46
  /** Product-neutral panel section and content presentation. */
41
47
  declare function PanelSurface({ id, registered, singleTab, header, content, children, className, ...props }: PanelSurfaceProps): ReactElement;
42
48
 
@@ -74,6 +80,16 @@ interface SurfacePlaceholderProps {
74
80
  /** Product-neutral empty renderer placeholder with stable shell hooks. */
75
81
  declare function SurfacePlaceholder({ title, className, }: SurfacePlaceholderProps): ReactElement;
76
82
 
83
+ interface SurfaceRegionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
84
+ children: ReactNode;
85
+ /** Caller-owned content layered outside the fill body. */
86
+ overlay?: ReactNode;
87
+ /** Optional caller-owned modifier for the fill body. */
88
+ bodyClassName?: string;
89
+ }
90
+ /** Product-neutral full-size surface region with an explicit fill body. */
91
+ declare const SurfaceRegion: react.ForwardRefExoticComponent<SurfaceRegionProps & react.RefAttributes<HTMLDivElement>>;
92
+
77
93
  type ShellSlotElement = 'aside' | 'div' | 'main' | 'section';
78
94
  interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
79
95
  as?: ShellSlotElement;
@@ -82,4 +98,4 @@ interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
82
98
  /** Structural shell marker that preserves the caller's semantic element. */
83
99
  declare function ShellSlot({ as, name, ...props }: ShellSlotProps): ReactElement;
84
100
 
85
- 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, hashSlotHue, isSlotDebugEnabled, useLocalSize };
101
+ export { DetachedPanelBoundary, type DetachedPanelBoundaryProps, DetachedSurfaceFrame, type DetachedSurfaceFrameProps, DetachedSurfaceStatus, type DetachedSurfaceStatusProps, type DetachedSurfaceStatusTone, type PanelContentPadding, type PanelContentPolicy, type PanelContentScroll, type PanelContentTone, PanelEmptyState, type PanelEmptyStateProps, 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
@@ -261,6 +261,24 @@ function ResizeHandle({
261
261
 
262
262
  // src/panel.tsx
263
263
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
264
+ function PanelEmptyState({
265
+ title,
266
+ detail,
267
+ className,
268
+ ...props
269
+ }) {
270
+ return /* @__PURE__ */ jsxs(
271
+ "div",
272
+ {
273
+ ...props,
274
+ className: className ? `fx-panel-empty ${className}` : "fx-panel-empty",
275
+ children: [
276
+ /* @__PURE__ */ jsx3("div", { className: "fx-panel-empty-title", children: title }),
277
+ detail == null ? null : /* @__PURE__ */ jsx3("div", { className: "fx-panel-empty-detail", children: detail })
278
+ ]
279
+ }
280
+ );
281
+ }
264
282
  function PanelSurface({
265
283
  id,
266
284
  registered = false,
@@ -353,6 +371,35 @@ function SurfacePlaceholder({
353
371
  return /* @__PURE__ */ jsx5("div", { className: className ? `surface-placeholder ${className}` : "surface-placeholder", children: /* @__PURE__ */ jsx5("div", { className: "surface-placeholder-title", children: title }) });
354
372
  }
355
373
 
374
+ // src/surface-region.tsx
375
+ import {
376
+ forwardRef
377
+ } from "react";
378
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
379
+ var joinClassNames = (base, modifier) => modifier ? `${base} ${modifier}` : base;
380
+ var SurfaceRegion = forwardRef(
381
+ function SurfaceRegion2({
382
+ children,
383
+ overlay,
384
+ className,
385
+ bodyClassName,
386
+ ...props
387
+ }, ref) {
388
+ return /* @__PURE__ */ jsxs2(
389
+ "div",
390
+ {
391
+ ...props,
392
+ ref,
393
+ className: joinClassNames("fx-surface-region", className),
394
+ children: [
395
+ overlay == null ? null : /* @__PURE__ */ jsx6("div", { className: "fx-surface-region-overlay", children: overlay }),
396
+ /* @__PURE__ */ jsx6("div", { className: joinClassNames("fx-surface-region-body", bodyClassName), children })
397
+ ]
398
+ }
399
+ );
400
+ }
401
+ );
402
+
356
403
  // src/react.tsx
357
404
  function ShellSlot({
358
405
  as = "div",
@@ -365,11 +412,13 @@ export {
365
412
  DetachedPanelBoundary,
366
413
  DetachedSurfaceFrame,
367
414
  DetachedSurfaceStatus,
415
+ PanelEmptyState,
368
416
  PanelSurface,
369
417
  ResizeHandle,
370
418
  ShellSlot,
371
419
  SlotDebugOverlay,
372
420
  SurfacePlaceholder,
421
+ SurfaceRegion,
373
422
  hashSlotHue,
374
423
  isSlotDebugEnabled,
375
424
  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.19.0",
3
+ "version": "0.21.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
  },