@floegence/floe-webapp-core 0.36.44 → 0.36.47

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.
@@ -1,6 +1,6 @@
1
1
  import { type WorkbenchSurfaceProps } from './WorkbenchSurface';
2
2
  import type { WorkbenchState } from './types';
3
- type WorkbenchOverlaySurfaceProps = Pick<WorkbenchSurfaceProps, 'enableKeyboard' | 'widgetDefinitions' | 'launcherWidgetTypes' | 'textAnnotationDefaults' | 'interactionAdapter' | 'resolveContextMenuItems' | 'onApiReady' | 'onRequestDelete' | 'onLayoutInteractionStart' | 'onLayoutInteractionEnd'>;
3
+ type WorkbenchOverlaySurfaceProps = Pick<WorkbenchSurfaceProps, 'enableKeyboard' | 'widgetDefinitions' | 'launcherWidgetTypes' | 'textAnnotationDefaults' | 'backgroundLayerDefaults' | 'interactionAdapter' | 'resolveContextMenuItems' | 'onApiReady' | 'onRequestDelete' | 'onLayoutInteractionStart' | 'onLayoutInteractionEnd'>;
4
4
  export interface WorkbenchOverlayProps extends WorkbenchOverlaySurfaceProps {
5
5
  open: boolean;
6
6
  onClose: () => void;
@@ -4,13 +4,13 @@ import { Motion as i } from "../../node_modules/.pnpm/solid-motionone@1.0.4_soli
4
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 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>");
7
+ import { WorkbenchSurface as g } 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>'), m = /* @__PURE__ */ s("<div class=workbench-overlay__body>");
9
9
  const u = '[data-floe-workbench-boundary="true"]';
10
10
  function _(e) {
11
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 x(e) {
13
+ function R(e) {
14
14
  let o;
15
15
  return b({
16
16
  open: () => e.open,
@@ -80,8 +80,8 @@ function x(e) {
80
80
  class: "w-4 h-4"
81
81
  })), t;
82
82
  })(), (() => {
83
- var t = g();
84
- return l(t, r(m, {
83
+ var t = m();
84
+ return l(t, r(g, {
85
85
  class: "workbench-surface--in-overlay",
86
86
  get state() {
87
87
  return e.state;
@@ -104,6 +104,9 @@ function x(e) {
104
104
  get textAnnotationDefaults() {
105
105
  return e.textAnnotationDefaults;
106
106
  },
107
+ get backgroundLayerDefaults() {
108
+ return e.backgroundLayerDefaults;
109
+ },
107
110
  get interactionAdapter() {
108
111
  return e.interactionAdapter;
109
112
  },
@@ -133,5 +136,5 @@ function x(e) {
133
136
  }
134
137
  y(["click"]);
135
138
  export {
136
- x as WorkbenchOverlay
139
+ R as WorkbenchOverlay
137
140
  };
@@ -1,5 +1,5 @@
1
1
  import { type WorkbenchContextMenuItem } from './WorkbenchContextMenu';
2
- import type { WorkbenchState, WorkbenchAnnotationItem, WorkbenchBackgroundLayer, WorkbenchBackgroundLayerPatch, WorkbenchContextMenuState, WorkbenchInteractionAdapter, WorkbenchStickyNoteItem, WorkbenchStickyNotePatch, WorkbenchTextAnnotationDefaults, WorkbenchTextAnnotationPatch, WorkbenchWidgetDefinition, WorkbenchWidgetItem, WorkbenchWidgetType } from './types';
2
+ import type { WorkbenchState, WorkbenchAnnotationItem, WorkbenchBackgroundLayer, WorkbenchBackgroundLayerDefaults, WorkbenchBackgroundLayerPatch, WorkbenchContextMenuState, WorkbenchInteractionAdapter, WorkbenchStickyNoteItem, WorkbenchStickyNotePatch, WorkbenchTextAnnotationDefaults, WorkbenchTextAnnotationPatch, WorkbenchWidgetDefinition, WorkbenchWidgetItem, WorkbenchWidgetType } from './types';
3
3
  export interface WorkbenchCreateAtOptions {
4
4
  worldX?: number;
5
5
  worldY?: number;
@@ -60,6 +60,7 @@ export interface WorkbenchSurfaceProps {
60
60
  widgetDefinitions?: readonly WorkbenchWidgetDefinition[];
61
61
  launcherWidgetTypes?: readonly WorkbenchWidgetType[];
62
62
  textAnnotationDefaults?: WorkbenchTextAnnotationDefaults;
63
+ backgroundLayerDefaults?: WorkbenchBackgroundLayerDefaults;
63
64
  interactionAdapter?: WorkbenchInteractionAdapter;
64
65
  resolveContextMenuItems?: WorkbenchContextMenuItemsResolver;
65
66
  onApiReady?: (api: WorkbenchSurfaceApi | null) => void;
@@ -1,5 +1,5 @@
1
1
  import { use as X, spread as q, mergeProps as Y, insert as w, createComponent as s, Portal as z, addEventListener as V, template as D, delegateEvents as P } from "solid-js/web";
2
- import { createSignal as B, createMemo as f, untrack as p, createEffect as v, onCleanup as y, Show as H } from "solid-js";
2
+ import { createSignal as L, createMemo as f, untrack as p, createEffect as v, onCleanup as y, Show as H } from "solid-js";
3
3
  import { clientToCanvasWorld as $ } from "../ui/canvasGeometry.js";
4
4
  import { WorkbenchCanvas as U } from "./WorkbenchCanvas.js";
5
5
  import { WorkbenchContextMenu as K } from "./WorkbenchContextMenu.js";
@@ -12,7 +12,7 @@ import { useWorkbenchModel as nt } from "./useWorkbenchModel.js";
12
12
  import { resolveWorkbenchInteractionAdapter as ot } from "./workbenchInteractionAdapter.js";
13
13
  var rt = /* @__PURE__ */ D("<div class=workbench-menu-backdrop data-floe-workbench-boundary=true>"), it = /* @__PURE__ */ D("<div><div class=workbench-surface__body data-floe-workbench-canvas-frame=true>");
14
14
  const at = "F1";
15
- function L(i) {
15
+ function B(i) {
16
16
  if (i)
17
17
  try {
18
18
  i.focus({
@@ -28,9 +28,10 @@ function At(i) {
28
28
  setState: (t) => i.setState(t),
29
29
  widgetDefinitions: () => i.widgetDefinitions,
30
30
  textAnnotationDefaults: () => i.textAnnotationDefaults,
31
+ backgroundLayerDefaults: () => i.backgroundLayerDefaults,
31
32
  onClose: () => {
32
33
  }
33
- }), [u, T] = B(null), d = f(() => ot(i.interactionAdapter)), [A, l] = B(p(() => d().createInitialInputOwner())), C = f(() => {
34
+ }), [u, T] = L(null), d = f(() => ot(i.interactionAdapter)), [A, l] = L(p(() => d().createInitialInputOwner())), C = f(() => {
34
35
  const t = i.launcherWidgetTypes;
35
36
  return !t || t.length <= 0 ? null : new Set(t);
36
37
  }), N = f(() => {
@@ -81,11 +82,11 @@ function At(i) {
81
82
  if (!o || typeof document > "u") return;
82
83
  const r = document.activeElement;
83
84
  if (!(r instanceof HTMLElement) || !o.contains(r)) {
84
- L(o);
85
+ B(o);
85
86
  return;
86
87
  }
87
88
  const a = n.findWidgetRoot(r);
88
- L(o), a && document.activeElement === r && r.isConnected && r.blur();
89
+ B(o), a && document.activeElement === r && r.isConnected && r.blur();
89
90
  });
90
91
  }, k = () => {
91
92
  const t = u()?.querySelector('[data-floe-workbench-canvas-frame="true"]'), n = e.viewport(), o = t?.getBoundingClientRect(), r = o?.width ?? 0, a = o?.height ?? 0;
@@ -260,6 +261,9 @@ function At(i) {
260
261
  get "data-workbench-theme"() {
261
262
  return e.theme();
262
263
  },
264
+ get "data-workbench-mode"() {
265
+ return e.mode();
266
+ },
263
267
  tabIndex: -1
264
268
  }), !1, !0), w(n, s(U, {
265
269
  get widgetDefinitions() {