@floegence/floe-webapp-core 0.36.42 → 0.36.44
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/components/icons/index.d.ts +2 -0
- package/dist/components/icons/index.js +419 -397
- package/dist/components/workbench/WorkbenchCanvas.d.ts +45 -2
- package/dist/components/workbench/WorkbenchCanvas.js +265 -66
- package/dist/components/workbench/WorkbenchCanvasField.d.ts +47 -2
- package/dist/components/workbench/WorkbenchCanvasField.js +258 -78
- package/dist/components/workbench/WorkbenchFilterBar.d.ts +9 -7
- package/dist/components/workbench/WorkbenchFilterBar.js +233 -145
- package/dist/components/workbench/WorkbenchLayerObjects.d.ts +136 -0
- package/dist/components/workbench/WorkbenchLayerObjects.js +999 -0
- package/dist/components/workbench/WorkbenchOverlay.d.ts +4 -1
- package/dist/components/workbench/WorkbenchOverlay.js +59 -29
- package/dist/components/workbench/WorkbenchSurface.d.ts +23 -11
- package/dist/components/workbench/WorkbenchSurface.js +315 -195
- package/dist/components/workbench/WorkbenchWidget.js +37 -37
- package/dist/components/workbench/index.d.ts +2 -1
- package/dist/components/workbench/types.d.ts +96 -1
- package/dist/components/workbench/types.js +12 -4
- package/dist/components/workbench/useWorkbenchModel.d.ts +62 -4
- package/dist/components/workbench/useWorkbenchModel.js +790 -253
- package/dist/components/workbench/widgets/widgetRegistry.d.ts +1 -1
- package/dist/components/workbench/workbenchHelpers.d.ts +5 -5
- package/dist/components/workbench/workbenchHelpers.js +345 -154
- package/dist/components/workbench/workbenchOptions.d.ts +43 -0
- package/dist/components/workbench/workbenchOptions.js +112 -0
- package/dist/full.js +620 -618
- package/dist/icons.js +71 -69
- package/dist/styles.css +1 -1
- package/dist/workbench.css +1122 -26
- package/dist/workbench.js +52 -36
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { type WorkbenchSurfaceProps } from './WorkbenchSurface';
|
|
1
2
|
import type { WorkbenchState } from './types';
|
|
2
|
-
|
|
3
|
+
type WorkbenchOverlaySurfaceProps = Pick<WorkbenchSurfaceProps, 'enableKeyboard' | 'widgetDefinitions' | 'launcherWidgetTypes' | 'textAnnotationDefaults' | 'interactionAdapter' | 'resolveContextMenuItems' | 'onApiReady' | 'onRequestDelete' | 'onLayoutInteractionStart' | 'onLayoutInteractionEnd'>;
|
|
4
|
+
export interface WorkbenchOverlayProps extends WorkbenchOverlaySurfaceProps {
|
|
3
5
|
open: boolean;
|
|
4
6
|
onClose: () => void;
|
|
5
7
|
state: () => WorkbenchState;
|
|
@@ -16,3 +18,4 @@ export interface WorkbenchOverlayProps {
|
|
|
16
18
|
* usage, mount WorkbenchSurface directly inside your layout.
|
|
17
19
|
*/
|
|
18
20
|
export declare function WorkbenchOverlay(props: WorkbenchOverlayProps): import("solid-js").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { createComponent as
|
|
1
|
+
import { createComponent as r, insert as l, template as s, delegateEvents as y } from "solid-js/web";
|
|
2
2
|
import { Show as f } from "solid-js";
|
|
3
|
-
import { Motion as
|
|
4
|
-
import { easing as
|
|
3
|
+
import { Motion as i } from "../../node_modules/.pnpm/solid-motionone@1.0.4_solid-js@1.9.11/node_modules/solid-motionone/dist/index.js";
|
|
4
|
+
import { easing as h, duration as c } from "../../utils/animations.js";
|
|
5
5
|
import { useOverlayMask as b } from "../../hooks/useOverlayMask.js";
|
|
6
6
|
import { X as v } from "../icons/index.js";
|
|
7
|
-
import { WorkbenchSurface as
|
|
8
|
-
var
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
return typeof Element < "u" && e instanceof Element ? !!e.closest(
|
|
7
|
+
import { WorkbenchSurface as m } from "./WorkbenchSurface.js";
|
|
8
|
+
var k = /* @__PURE__ */ s('<header class=workbench-overlay__header data-floe-canvas-interactive=true><div class=workbench-overlay__header-brand><div class=workbench-overlay__header-title>Workbench</div></div><div class=workbench-overlay__header-actions><button type=button class=workbench-overlay__close aria-label="Close workbench overlay"data-floe-overlay-close=true>'), g = /* @__PURE__ */ s("<div class=workbench-overlay__body>");
|
|
9
|
+
const u = '[data-floe-workbench-boundary="true"]';
|
|
10
|
+
function _(e) {
|
|
11
|
+
return typeof Element < "u" && e instanceof Element ? !!e.closest(u) : typeof Node < "u" && e instanceof Node ? !!e.parentElement?.closest(u) : !1;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
let
|
|
13
|
+
function x(e) {
|
|
14
|
+
let o;
|
|
15
15
|
return b({
|
|
16
16
|
open: () => e.open,
|
|
17
|
-
root: () =>
|
|
17
|
+
root: () => o,
|
|
18
18
|
onClose: () => e.onClose(),
|
|
19
|
-
containsTarget:
|
|
19
|
+
containsTarget: _,
|
|
20
20
|
lockBodyScroll: !0,
|
|
21
21
|
trapFocus: !0,
|
|
22
22
|
closeOnEscape: !0,
|
|
@@ -27,15 +27,15 @@ function O(e) {
|
|
|
27
27
|
selector: '[data-floe-overlay-close="true"]'
|
|
28
28
|
},
|
|
29
29
|
restoreFocus: !0
|
|
30
|
-
}),
|
|
30
|
+
}), r(f, {
|
|
31
31
|
get when() {
|
|
32
32
|
return e.open;
|
|
33
33
|
},
|
|
34
34
|
get children() {
|
|
35
|
-
return
|
|
36
|
-
ref(
|
|
37
|
-
var
|
|
38
|
-
typeof
|
|
35
|
+
return r(i.section, {
|
|
36
|
+
ref(t) {
|
|
37
|
+
var n = o;
|
|
38
|
+
typeof n == "function" ? n(t) : o = t;
|
|
39
39
|
},
|
|
40
40
|
class: "workbench-overlay",
|
|
41
41
|
role: "dialog",
|
|
@@ -50,11 +50,11 @@ function O(e) {
|
|
|
50
50
|
},
|
|
51
51
|
get transition() {
|
|
52
52
|
return {
|
|
53
|
-
duration:
|
|
53
|
+
duration: c.fast
|
|
54
54
|
};
|
|
55
55
|
},
|
|
56
56
|
get children() {
|
|
57
|
-
return
|
|
57
|
+
return r(i.div, {
|
|
58
58
|
class: "workbench-overlay__frame",
|
|
59
59
|
"data-floe-workbench-boundary": "true",
|
|
60
60
|
initial: {
|
|
@@ -69,19 +69,19 @@ function O(e) {
|
|
|
69
69
|
},
|
|
70
70
|
get transition() {
|
|
71
71
|
return {
|
|
72
|
-
duration:
|
|
73
|
-
easing:
|
|
72
|
+
duration: c.normal,
|
|
73
|
+
easing: h.easeOut
|
|
74
74
|
};
|
|
75
75
|
},
|
|
76
76
|
get children() {
|
|
77
77
|
return [(() => {
|
|
78
|
-
var
|
|
79
|
-
return
|
|
78
|
+
var t = k(), n = t.firstChild, d = n.nextSibling, a = d.firstChild;
|
|
79
|
+
return a.$$click = () => e.onClose(), l(a, r(v, {
|
|
80
80
|
class: "w-4 h-4"
|
|
81
|
-
})),
|
|
81
|
+
})), t;
|
|
82
82
|
})(), (() => {
|
|
83
|
-
var
|
|
84
|
-
return l(
|
|
83
|
+
var t = g();
|
|
84
|
+
return l(t, r(m, {
|
|
85
85
|
class: "workbench-surface--in-overlay",
|
|
86
86
|
get state() {
|
|
87
87
|
return e.state;
|
|
@@ -91,8 +91,38 @@ function O(e) {
|
|
|
91
91
|
},
|
|
92
92
|
get lockShortcut() {
|
|
93
93
|
return e.lockShortcut;
|
|
94
|
+
},
|
|
95
|
+
get enableKeyboard() {
|
|
96
|
+
return e.enableKeyboard;
|
|
97
|
+
},
|
|
98
|
+
get widgetDefinitions() {
|
|
99
|
+
return e.widgetDefinitions;
|
|
100
|
+
},
|
|
101
|
+
get launcherWidgetTypes() {
|
|
102
|
+
return e.launcherWidgetTypes;
|
|
103
|
+
},
|
|
104
|
+
get textAnnotationDefaults() {
|
|
105
|
+
return e.textAnnotationDefaults;
|
|
106
|
+
},
|
|
107
|
+
get interactionAdapter() {
|
|
108
|
+
return e.interactionAdapter;
|
|
109
|
+
},
|
|
110
|
+
get resolveContextMenuItems() {
|
|
111
|
+
return e.resolveContextMenuItems;
|
|
112
|
+
},
|
|
113
|
+
get onApiReady() {
|
|
114
|
+
return e.onApiReady;
|
|
115
|
+
},
|
|
116
|
+
get onRequestDelete() {
|
|
117
|
+
return e.onRequestDelete;
|
|
118
|
+
},
|
|
119
|
+
get onLayoutInteractionStart() {
|
|
120
|
+
return e.onLayoutInteractionStart;
|
|
121
|
+
},
|
|
122
|
+
get onLayoutInteractionEnd() {
|
|
123
|
+
return e.onLayoutInteractionEnd;
|
|
94
124
|
}
|
|
95
|
-
})),
|
|
125
|
+
})), t;
|
|
96
126
|
})()];
|
|
97
127
|
}
|
|
98
128
|
});
|
|
@@ -101,7 +131,7 @@ function O(e) {
|
|
|
101
131
|
}
|
|
102
132
|
});
|
|
103
133
|
}
|
|
104
|
-
|
|
134
|
+
y(["click"]);
|
|
105
135
|
export {
|
|
106
|
-
|
|
136
|
+
x as WorkbenchOverlay
|
|
107
137
|
};
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { type WorkbenchContextMenuItem } from './WorkbenchContextMenu';
|
|
2
|
-
import type { WorkbenchState, WorkbenchContextMenuState, WorkbenchInteractionAdapter, WorkbenchWidgetDefinition, WorkbenchWidgetItem, WorkbenchWidgetType } from './types';
|
|
2
|
+
import type { WorkbenchState, WorkbenchAnnotationItem, WorkbenchBackgroundLayer, WorkbenchBackgroundLayerPatch, WorkbenchContextMenuState, WorkbenchInteractionAdapter, WorkbenchStickyNoteItem, WorkbenchStickyNotePatch, WorkbenchTextAnnotationDefaults, WorkbenchTextAnnotationPatch, WorkbenchWidgetDefinition, WorkbenchWidgetItem, WorkbenchWidgetType } from './types';
|
|
3
|
+
export interface WorkbenchCreateAtOptions {
|
|
4
|
+
worldX?: number;
|
|
5
|
+
worldY?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface WorkbenchCreateWidgetOptions extends WorkbenchCreateAtOptions {
|
|
8
|
+
centerViewport?: boolean;
|
|
9
|
+
}
|
|
3
10
|
export type WorkbenchContextMenuItemsResolver = (context: Readonly<{
|
|
4
11
|
menu: WorkbenchContextMenuState;
|
|
5
12
|
items: readonly WorkbenchContextMenuItem[];
|
|
@@ -8,16 +15,8 @@ export type WorkbenchContextMenuItemsResolver = (context: Readonly<{
|
|
|
8
15
|
closeMenu: () => void;
|
|
9
16
|
}>) => readonly WorkbenchContextMenuItem[];
|
|
10
17
|
export interface WorkbenchSurfaceApi {
|
|
11
|
-
ensureWidget: (type: WorkbenchWidgetType, options?:
|
|
12
|
-
|
|
13
|
-
worldX?: number;
|
|
14
|
-
worldY?: number;
|
|
15
|
-
}) => WorkbenchWidgetItem | null;
|
|
16
|
-
createWidget: (type: WorkbenchWidgetType, options?: {
|
|
17
|
-
centerViewport?: boolean;
|
|
18
|
-
worldX?: number;
|
|
19
|
-
worldY?: number;
|
|
20
|
-
}) => WorkbenchWidgetItem | null;
|
|
18
|
+
ensureWidget: (type: WorkbenchWidgetType, options?: WorkbenchCreateWidgetOptions) => WorkbenchWidgetItem | null;
|
|
19
|
+
createWidget: (type: WorkbenchWidgetType, options?: WorkbenchCreateWidgetOptions) => WorkbenchWidgetItem | null;
|
|
21
20
|
clearSelection: () => void;
|
|
22
21
|
focusWidget: (widget: WorkbenchWidgetItem, options?: {
|
|
23
22
|
centerViewport?: boolean;
|
|
@@ -27,6 +26,18 @@ export interface WorkbenchSurfaceApi {
|
|
|
27
26
|
findWidgetByType: (type: WorkbenchWidgetType) => WorkbenchWidgetItem | null;
|
|
28
27
|
findWidgetById: (widgetId: string) => WorkbenchWidgetItem | null;
|
|
29
28
|
updateWidgetTitle: (widgetId: string, title: string) => void;
|
|
29
|
+
createStickyNote: (options?: WorkbenchCreateAtOptions) => WorkbenchStickyNoteItem | null;
|
|
30
|
+
findStickyNoteById: (noteId: string) => WorkbenchStickyNoteItem | null;
|
|
31
|
+
updateStickyNote: (noteId: string, patch: WorkbenchStickyNotePatch) => void;
|
|
32
|
+
deleteStickyNote: (noteId: string) => void;
|
|
33
|
+
createTextAnnotation: (options?: WorkbenchCreateAtOptions) => WorkbenchAnnotationItem | null;
|
|
34
|
+
findAnnotationById: (annotationId: string) => WorkbenchAnnotationItem | null;
|
|
35
|
+
updateTextAnnotation: (annotationId: string, patch: WorkbenchTextAnnotationPatch) => void;
|
|
36
|
+
deleteAnnotation: (annotationId: string) => void;
|
|
37
|
+
createBackgroundLayer: (options?: WorkbenchCreateAtOptions) => WorkbenchBackgroundLayer | null;
|
|
38
|
+
findBackgroundLayerById: (layerId: string) => WorkbenchBackgroundLayer | null;
|
|
39
|
+
updateBackgroundLayer: (layerId: string, patch: WorkbenchBackgroundLayerPatch) => void;
|
|
40
|
+
deleteBackgroundLayer: (layerId: string) => void;
|
|
30
41
|
}
|
|
31
42
|
export interface WorkbenchSurfaceProps {
|
|
32
43
|
state: () => WorkbenchState;
|
|
@@ -48,6 +59,7 @@ export interface WorkbenchSurfaceProps {
|
|
|
48
59
|
class?: string;
|
|
49
60
|
widgetDefinitions?: readonly WorkbenchWidgetDefinition[];
|
|
50
61
|
launcherWidgetTypes?: readonly WorkbenchWidgetType[];
|
|
62
|
+
textAnnotationDefaults?: WorkbenchTextAnnotationDefaults;
|
|
51
63
|
interactionAdapter?: WorkbenchInteractionAdapter;
|
|
52
64
|
resolveContextMenuItems?: WorkbenchContextMenuItemsResolver;
|
|
53
65
|
onApiReady?: (api: WorkbenchSurfaceApi | null) => void;
|