@konitif/workbench 0.285.8 → 0.285.9

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 CHANGED
@@ -13,6 +13,7 @@ npm install @konitif/workbench
13
13
 
14
14
  - Workspace, layout, panel and shell contracts.
15
15
  - Tool and widget admission, registries and hosting adapters.
16
+ - Generic widget-zone visibility and placement-drop projection.
16
17
  - Runtime lifecycle, checkpoint, recovery and observability contracts.
17
18
  - Project preflight and repository-quality contracts.
18
19
  - Explicit workspace persistence, synchronization and surface ports.
@@ -0,0 +1,15 @@
1
+ export type WorkbenchWidgetZoneProjectionReason = 'closed' | 'visible-content' | 'empty-edit-drop-target' | 'empty-runtime';
2
+ export interface WorkbenchWidgetZoneProjection {
3
+ visible: boolean;
4
+ acceptsPlacementDrop: boolean;
5
+ reason: WorkbenchWidgetZoneProjectionReason;
6
+ }
7
+ /**
8
+ * Projects an authored widget-zone state into host-facing visibility and drop
9
+ * affordances without owning either the zone content or its renderer.
10
+ */
11
+ export declare function projectWorkbenchWidgetZone(input: {
12
+ containerOpen: boolean;
13
+ visiblePlacementCount: number;
14
+ layoutEditingEnabled: boolean;
15
+ }): WorkbenchWidgetZoneProjection;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Projects an authored widget-zone state into host-facing visibility and drop
3
+ * affordances without owning either the zone content or its renderer.
4
+ */
5
+ export function projectWorkbenchWidgetZone(input) {
6
+ if (!input.containerOpen) {
7
+ return { visible: false, acceptsPlacementDrop: false, reason: 'closed' };
8
+ }
9
+ if (input.visiblePlacementCount > 0) {
10
+ return {
11
+ visible: true,
12
+ acceptsPlacementDrop: input.layoutEditingEnabled,
13
+ reason: 'visible-content'
14
+ };
15
+ }
16
+ if (input.layoutEditingEnabled) {
17
+ return { visible: true, acceptsPlacementDrop: true, reason: 'empty-edit-drop-target' };
18
+ }
19
+ return { visible: false, acceptsPlacementDrop: false, reason: 'empty-runtime' };
20
+ }
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from "./boot/index.js";
2
2
  export * from "./application/launch/workbenchLaunchPolicy.js";
3
3
  export * from "./application/launch/catalogShareReference.js";
4
4
  export * from "./application/widgets/createWorkbenchWidgetAdapter.js";
5
+ export * from "./application/widgets/widgetZoneProjection.js";
5
6
  export * from "./application/tool/experienceToolSelection.js";
6
7
  export * from "./stage/index.js";
7
8
  export * from "./application/shell/state.js";
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ export * from "./boot/index.js";
2
2
  export * from "./application/launch/workbenchLaunchPolicy.js";
3
3
  export * from "./application/launch/catalogShareReference.js";
4
4
  export * from "./application/widgets/createWorkbenchWidgetAdapter.js";
5
+ export * from "./application/widgets/widgetZoneProjection.js";
5
6
  export * from "./application/tool/experienceToolSelection.js";
6
7
  export * from "./stage/index.js";
7
8
  export * from "./application/shell/state.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@konitif/workbench",
3
3
  "license": "PolyForm-Noncommercial-1.0.0",
4
- "version": "0.285.8",
4
+ "version": "0.285.9",
5
5
  "description": "Workspace composition, docking, registries and hosting contracts for KONITIF.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -107,7 +107,9 @@
107
107
  ],
108
108
  "symbolNames": [
109
109
  "createWorkbenchWidgetAdapter",
110
- "WorkbenchWidgetHosting"
110
+ "WorkbenchWidgetHosting",
111
+ "projectWorkbenchWidgetZone",
112
+ "WorkbenchWidgetZoneProjection"
111
113
  ]
112
114
  },
113
115
  {