@forgeax/app-shell 0.19.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 +11 -1
- package/dist/react.js +30 -0
- package/dist/surface.css +19 -0
- package/package.json +5 -4
package/dist/react.d.ts
CHANGED
|
@@ -74,6 +74,16 @@ interface SurfacePlaceholderProps {
|
|
|
74
74
|
/** Product-neutral empty renderer placeholder with stable shell hooks. */
|
|
75
75
|
declare function SurfacePlaceholder({ title, className, }: SurfacePlaceholderProps): ReactElement;
|
|
76
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
|
+
|
|
77
87
|
type ShellSlotElement = 'aside' | 'div' | 'main' | 'section';
|
|
78
88
|
interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
|
|
79
89
|
as?: ShellSlotElement;
|
|
@@ -82,4 +92,4 @@ interface ShellSlotProps extends HTMLAttributes<HTMLElement> {
|
|
|
82
92
|
/** Structural shell marker that preserves the caller's semantic element. */
|
|
83
93
|
declare function ShellSlot({ as, name, ...props }: ShellSlotProps): ReactElement;
|
|
84
94
|
|
|
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 };
|
|
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
|
@@ -353,6 +353,35 @@ function SurfacePlaceholder({
|
|
|
353
353
|
return /* @__PURE__ */ jsx5("div", { className: className ? `surface-placeholder ${className}` : "surface-placeholder", children: /* @__PURE__ */ jsx5("div", { className: "surface-placeholder-title", children: title }) });
|
|
354
354
|
}
|
|
355
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
|
+
|
|
356
385
|
// src/react.tsx
|
|
357
386
|
function ShellSlot({
|
|
358
387
|
as = "div",
|
|
@@ -370,6 +399,7 @@ export {
|
|
|
370
399
|
ShellSlot,
|
|
371
400
|
SlotDebugOverlay,
|
|
372
401
|
SurfacePlaceholder,
|
|
402
|
+
SurfaceRegion,
|
|
373
403
|
hashSlotHue,
|
|
374
404
|
isSlotDebugEnabled,
|
|
375
405
|
useLocalSize
|
package/dist/surface.css
ADDED
|
@@ -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.
|
|
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
|
},
|