@aglyn/besigner-ui 1.0.0-beta.231 → 1.0.0-beta.232

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.
Files changed (28) hide show
  1. package/package.json +19 -18
  2. package/src/lib/components/aside-panel.component.js +30 -3
  3. package/src/lib/components/aside-panel.component.js.map +1 -1
  4. package/src/lib/components/besigner-dnd-context.component.js +31 -2
  5. package/src/lib/components/besigner-dnd-context.component.js.map +1 -1
  6. package/src/lib/components/component-accordion-list.js +4 -2
  7. package/src/lib/components/component-accordion-list.js.map +1 -1
  8. package/src/lib/components/component-picker.js +42 -2
  9. package/src/lib/components/component-picker.js.map +1 -1
  10. package/src/lib/components/device-preview-controls.component.d.ts +2 -0
  11. package/src/lib/components/device-preview-controls.component.js +11 -5
  12. package/src/lib/components/device-preview-controls.component.js.map +1 -1
  13. package/src/lib/components/dnd/draggable-droppable.js +39 -0
  14. package/src/lib/components/dnd/draggable-droppable.js.map +1 -1
  15. package/src/lib/components/node-quick-actions.js +210 -174
  16. package/src/lib/components/node-quick-actions.js.map +1 -1
  17. package/src/lib/components/node-tree-view.js +11 -1
  18. package/src/lib/components/node-tree-view.js.map +1 -1
  19. package/src/lib/components/panel-controls.component.d.ts +6 -0
  20. package/src/lib/components/panel-controls.component.js +10 -6
  21. package/src/lib/components/panel-controls.component.js.map +1 -1
  22. package/src/lib/components/viewport-canvas.component.js +8 -0
  23. package/src/lib/components/viewport-canvas.component.js.map +1 -1
  24. package/src/lib/components/workspace-editor.component.js +131 -16
  25. package/src/lib/components/workspace-editor.component.js.map +1 -1
  26. package/src/lib/components/workspace-panel.component.d.ts +18 -0
  27. package/src/lib/components/workspace-panel.component.js +53 -3
  28. package/src/lib/components/workspace-panel.component.js.map +1 -1
@@ -21,7 +21,7 @@ import { ICON_VARIANT_MODIFY_ADD, ICON_VARIANT_MODIFY_DRAG, ICON_VARIANT_SHOW_MO
21
21
  import { SrOnly } from "@aglyn/shared-ui-jsx";
22
22
  import { MdiIcon } from "@aglyn/shared-ui-jsx";
23
23
  import { styled } from "@aglyn/shared-ui-theme";
24
- import { Button as MuiButton, Divider, Stack, Tooltip as MuiTooltip, Typography } from "@mui/material";
24
+ import { Button as MuiButton, ClickAwayListener, Divider, Stack, Tooltip as MuiTooltip, Typography, useMediaQuery, useTheme } from "@mui/material";
25
25
  import { observer } from "mobx-react-lite";
26
26
  import { forwardRef, useCallback, useState } from "react";
27
27
  import { Else, If, Then } from "react-if";
@@ -41,6 +41,13 @@ const ActionButton = styled(MuiButton)(({ theme })=>({
41
41
  minWidth: 20,
42
42
  '&.MuiButtonGroup-grouped': {
43
43
  minWidth: 25
44
+ },
45
+ // A fingertip needs a target several times the size a cursor does; the
46
+ // strip grows with its buttons, so nothing else has to know.
47
+ '@media (pointer: coarse)': {
48
+ minWidth: 32,
49
+ minHeight: 32,
50
+ fontSize: theme.typography.pxToRem(20)
44
51
  }
45
52
  }));
46
53
  const LabelAction = /*#__PURE__*/ forwardRef((props, ref)=>{
@@ -80,7 +87,6 @@ export const NodeQuickActions = observer(/*#__PURE__*/ forwardRef((props, ref)=>
80
87
  // Controlled so menu actions can dismiss the tooltip — an uncontrolled
81
88
  // tooltip stays open behind (or above) dialogs its actions launch.
82
89
  const [moreOpen, setMoreOpen] = useState(false);
83
- const openMore = useCallback(()=>setMoreOpen(true), []);
84
90
  /**
85
91
  * Right-click on the canvas opens this menu (AGL-1405). The leaf records
86
92
  * the request and selects the node, which is what mounts this overlay —
@@ -94,188 +100,218 @@ export const NodeQuickActions = observer(/*#__PURE__*/ forwardRef((props, ref)=>
94
100
  // itself.
95
101
  clearCanvasContextMenu();
96
102
  }, []);
97
- return /*#__PURE__*/ _jsxs(Stack, _extends({
98
- ref: ref,
99
- id: "aglyn:element-overlay-label",
100
- "data-aglyn-node": node == null ? void 0 : node.$id,
101
- "data-aglyn-kind": "overlay-label",
102
- direction: "row",
103
- spacing: 0.35,
104
- divider: /*#__PURE__*/ _jsx(Divider, {
105
- orientation: "vertical",
106
- variant: "fullWidth",
107
- flexItem: true,
108
- sx: {
109
- opacity: 0.5
110
- }
111
- })
112
- }, rest, {
113
- sx: [
114
- {
115
- justifyContent: "flex-start",
116
- alignItems: "center",
117
- fontSize: 12,
118
- lineHeight: 1,
119
- fontWeight: 600,
120
- letterSpacing: 0.25,
121
- // pointerEvents: 'none',
122
- marginLeft: '-2px',
123
- marginBottom: '1px',
124
- // One slate surface for the whole floating control (AGL-1194).
125
- // The strip was `primary.light` while the buttons on it were
126
- // `tertiary` — two chrome hues on one control, and an ink colour
127
- // paired with a background it no longer sat on. Ink is now the
128
- // contrastText OF THIS background, so it follows the scheme
129
- // instead of being picked once against the old one.
130
- backgroundColor: 'tertiary.main',
131
- color: 'tertiary.contrastText',
132
- px: 0.5,
133
- pl: 0.5,
134
- pr: 0.25,
135
- py: 0.35
136
- },
137
- ...Array.isArray(rest.sx) ? rest.sx : [
138
- rest.sx
139
- ]
140
- ],
141
- children: [
142
- /*#__PURE__*/ _jsx(Stack, {
143
- direction: "column",
103
+ const menuShown = moreOpen || requested;
104
+ // The dots are a menu button: a click or tap opens the menu and the next
105
+ // one closes it. A menu that also opened on hover could not be closed
106
+ // by clicking, since the hover had already opened it under the cursor.
107
+ const toggleMore = useCallback(()=>{
108
+ if (menuShown) closeMore();
109
+ else setMoreOpen(true);
110
+ }, [
111
+ menuShown,
112
+ closeMore
113
+ ]);
114
+ // Beside the strip there is no room on a phone: a 240px menu to the
115
+ // right of an element runs off the screen. Below it, the popper slides
116
+ // it sideways into the window instead.
117
+ const theme = useTheme();
118
+ const phone = useMediaQuery(theme.breakpoints.down('sm'), {
119
+ noSsr: true
120
+ });
121
+ return(// A click or tap anywhere else closes the menu as well.
122
+ /*#__PURE__*/ _jsx(ClickAwayListener, {
123
+ onClickAway: ()=>menuShown && closeMore(),
124
+ children: /*#__PURE__*/ _jsxs(Stack, _extends({
125
+ ref: ref,
126
+ id: "aglyn:element-overlay-label",
127
+ "data-aglyn-node": node == null ? void 0 : node.$id,
128
+ "data-aglyn-kind": "overlay-label",
129
+ direction: "row",
130
+ spacing: 0.35,
131
+ divider: /*#__PURE__*/ _jsx(Divider, {
132
+ orientation: "vertical",
133
+ variant: "fullWidth",
134
+ flexItem: true,
144
135
  sx: {
136
+ opacity: 0.5
137
+ }
138
+ })
139
+ }, rest, {
140
+ sx: [
141
+ {
142
+ justifyContent: "flex-start",
145
143
  alignItems: "center",
146
- justifyContent: "center",
147
- fontSize: 12
144
+ fontSize: 12,
145
+ lineHeight: 1,
146
+ fontWeight: 600,
147
+ letterSpacing: 0.25,
148
+ // pointerEvents: 'none',
149
+ marginLeft: '-2px',
150
+ marginBottom: '1px',
151
+ // One slate surface for the whole floating control (AGL-1194).
152
+ // The strip was `primary.light` while the buttons on it were
153
+ // `tertiary` — two chrome hues on one control, and an ink colour
154
+ // paired with a background it no longer sat on. Ink is now the
155
+ // contrastText OF THIS background, so it follows the scheme
156
+ // instead of being picked once against the old one.
157
+ backgroundColor: 'tertiary.main',
158
+ color: 'tertiary.contrastText',
159
+ px: 0.5,
160
+ pl: 0.5,
161
+ pr: 0.25,
162
+ py: 0.35
148
163
  },
149
- children: /*#__PURE__*/ _jsx(ComponentIconComponent, {
150
- component: node == null ? void 0 : node.componentSchema,
151
- node: node,
152
- fontSize: "inherit"
153
- })
154
- }),
155
- /*#__PURE__*/ _jsxs(If, {
156
- condition: variant !== 'actions',
157
- children: [
158
- /*#__PURE__*/ _jsx(Then, {
159
- children: /*#__PURE__*/ _jsx(Typography, {
160
- component: "div",
161
- title: node == null ? void 0 : node.labelShort,
162
- sx: {
163
- textOverflow: "ellipsis",
164
- overflow: "hidden",
165
- whiteSpace: "nowrap",
166
- fontSize: "inherit",
167
- color: "inherit",
168
- maxWidth: 100
169
- },
170
- children: node == null ? void 0 : node.labelShort
171
- })
172
- }),
173
- /*#__PURE__*/ _jsx(Else, {
174
- children: /*#__PURE__*/ _jsxs(Stack, {
175
- direction: "row",
176
- spacing: 0.25,
177
- sx: {
178
- justifyContent: "flex-start",
179
- alignItems: "center"
180
- },
181
- children: [
182
- /*#__PURE__*/ _jsx(LabelAction, {
183
- title: "move",
184
- disableInteractive: true,
185
- ButtonProps: _extends({}, handleProps, {
186
- onClick: ()=>handleAddElementClick(node)
164
+ ...Array.isArray(rest.sx) ? rest.sx : [
165
+ rest.sx
166
+ ]
167
+ ],
168
+ children: [
169
+ /*#__PURE__*/ _jsx(Stack, {
170
+ direction: "column",
171
+ sx: {
172
+ alignItems: "center",
173
+ justifyContent: "center",
174
+ fontSize: 12
175
+ },
176
+ children: /*#__PURE__*/ _jsx(ComponentIconComponent, {
177
+ component: node == null ? void 0 : node.componentSchema,
178
+ node: node,
179
+ fontSize: "inherit"
180
+ })
181
+ }),
182
+ /*#__PURE__*/ _jsxs(If, {
183
+ condition: variant !== 'actions',
184
+ children: [
185
+ /*#__PURE__*/ _jsx(Then, {
186
+ children: /*#__PURE__*/ _jsx(Typography, {
187
+ component: "div",
188
+ title: node == null ? void 0 : node.labelShort,
189
+ sx: {
190
+ textOverflow: "ellipsis",
191
+ overflow: "hidden",
192
+ whiteSpace: "nowrap",
193
+ fontSize: "inherit",
194
+ color: "inherit",
195
+ maxWidth: 100
196
+ },
197
+ children: node == null ? void 0 : node.labelShort
198
+ })
199
+ }),
200
+ /*#__PURE__*/ _jsx(Else, {
201
+ children: /*#__PURE__*/ _jsxs(Stack, {
202
+ direction: "row",
203
+ spacing: 0.25,
204
+ sx: {
205
+ justifyContent: "flex-start",
206
+ alignItems: "center"
207
+ },
208
+ children: [
209
+ /*#__PURE__*/ _jsx(LabelAction, {
210
+ title: "move",
211
+ disableInteractive: true,
212
+ disableTouchListener: true,
213
+ ButtonProps: handleProps,
214
+ icon: {
215
+ path: ICON_VARIANT_MODIFY_DRAG.path
216
+ },
217
+ children: 'move'
187
218
  }),
188
- icon: {
189
- path: ICON_VARIANT_MODIFY_DRAG.path
190
- },
191
- children: 'move'
192
- }),
193
- /*#__PURE__*/ _jsx(LabelAction, {
194
- title: "Add",
195
- disableInteractive: true,
196
- ButtonProps: {
197
- onClick: ()=>handleAddElementClick(node)
198
- },
199
- icon: {
200
- path: ICON_VARIANT_MODIFY_ADD.path
201
- },
202
- children: 'add'
203
- }),
204
- /*#__PURE__*/ _jsx(LabelAction, {
205
- placement: "right",
206
- children: 'more',
207
- icon: {
208
- path: ICON_VARIANT_SHOW_MORE_VERTICAL.path
209
- },
210
- enterDelay: 200,
211
- leaveDelay: 500,
212
- open: moreOpen || requested,
213
- onOpen: openMore,
214
- onClose: closeMore,
215
- slotProps: {
216
- popper: {
217
- disablePortal: false,
218
- // Below dialogs/drawers the menu actions open.
219
- sx: {
220
- zIndex: (theme)=>theme.zIndex.modal - 1
221
- },
222
- /**
223
- * Kept inside the WINDOW, not the document (AGL-1405).
224
- * `rootBoundary: 'document'` let the menu be placed
225
- * below the fold — the document is as tall as whatever
226
- * you put in it, so nothing ever "overflowed" it — and
227
- * the page grew a scrollbar around the menu, which moves
228
- * the editor's own chrome under the reader. The Paper
229
- * caps its height and scrolls, so a menu taller than the
230
- * window is still fully reachable.
231
- *
232
- * The 100px padding went with it: it was reserving a
233
- * margin against a boundary that was never binding, and
234
- * against the real one it would refuse placements that
235
- * fit perfectly well.
236
- */ modifiers: [
237
- {
238
- name: 'flip',
239
- enabled: true,
240
- options: {
241
- altBoundary: true,
242
- padding: 8
243
- }
219
+ /*#__PURE__*/ _jsx(LabelAction, {
220
+ title: "Add",
221
+ disableInteractive: true,
222
+ disableTouchListener: true,
223
+ ButtonProps: {
224
+ onClick: ()=>handleAddElementClick(node)
225
+ },
226
+ icon: {
227
+ path: ICON_VARIANT_MODIFY_ADD.path
228
+ },
229
+ children: 'add'
230
+ }),
231
+ /*#__PURE__*/ _jsx(LabelAction, {
232
+ placement: phone ? 'bottom' : 'right',
233
+ children: 'more',
234
+ icon: {
235
+ path: ICON_VARIANT_SHOW_MORE_VERTICAL.path
236
+ },
237
+ open: menuShown,
238
+ onClose: closeMore,
239
+ // Only the button decides when the menu opens. Hover and
240
+ // focus would open it on the way past, and MUI's touch
241
+ // path would close it 1.5 s after the finger lifts.
242
+ disableHoverListener: true,
243
+ disableFocusListener: true,
244
+ disableTouchListener: true,
245
+ ButtonProps: {
246
+ onClick: toggleMore,
247
+ 'aria-haspopup': 'menu',
248
+ 'aria-expanded': menuShown
249
+ },
250
+ slotProps: {
251
+ popper: {
252
+ disablePortal: false,
253
+ // Below dialogs/drawers the menu actions open.
254
+ sx: {
255
+ zIndex: (theme)=>theme.zIndex.modal - 1
244
256
  },
245
- {
246
- name: 'preventOverflow',
247
- enabled: true,
248
- options: {
249
- altAxis: true,
250
- altBoundary: true,
251
- tether: false,
252
- padding: 8
257
+ /**
258
+ * Kept inside the WINDOW, not the document (AGL-1405).
259
+ * `rootBoundary: 'document'` let the menu be placed
260
+ * below the fold — the document is as tall as whatever
261
+ * you put in it, so nothing ever "overflowed" it — and
262
+ * the page grew a scrollbar around the menu, which moves
263
+ * the editor's own chrome under the reader. The Paper
264
+ * caps its height and scrolls, so a menu taller than the
265
+ * window is still fully reachable.
266
+ *
267
+ * The 100px padding went with it: it was reserving a
268
+ * margin against a boundary that was never binding, and
269
+ * against the real one it would refuse placements that
270
+ * fit perfectly well.
271
+ */ modifiers: [
272
+ {
273
+ name: 'flip',
274
+ enabled: true,
275
+ options: {
276
+ altBoundary: true,
277
+ padding: 8
278
+ }
279
+ },
280
+ {
281
+ name: 'preventOverflow',
282
+ enabled: true,
283
+ options: {
284
+ altAxis: true,
285
+ altBoundary: true,
286
+ tether: false,
287
+ padding: 8
288
+ }
289
+ },
290
+ {
291
+ name: 'arrow',
292
+ enabled: true
253
293
  }
254
- },
255
- {
256
- name: 'arrow',
257
- enabled: true
294
+ ]
295
+ },
296
+ tooltip: {
297
+ sx: {
298
+ padding: 0,
299
+ m: -2
258
300
  }
259
- ]
260
- },
261
- tooltip: {
262
- sx: {
263
- padding: 0,
264
- m: -2
265
301
  }
266
- }
267
- },
268
- title: /*#__PURE__*/ _jsx(NodeContextMenu, {
269
- node: node,
270
- onAction: closeMore
302
+ },
303
+ title: /*#__PURE__*/ _jsx(NodeContextMenu, {
304
+ node: node,
305
+ onAction: closeMore
306
+ })
271
307
  })
272
- })
273
- ]
308
+ ]
309
+ })
274
310
  })
275
- })
276
- ]
277
- })
278
- ]
311
+ ]
312
+ })
313
+ ]
314
+ }))
279
315
  }));
280
316
  }));
281
317
  NodeQuickActions.displayName = 'NodeQuickActions';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/node-quick-actions.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type * as Aglyn from '@aglyn/aglyn'\nimport * as Besigner from '@aglyn/besigner'\nimport {\n ICON_VARIANT_MODIFY_ADD,\n ICON_VARIANT_MODIFY_DRAG,\n ICON_VARIANT_SHOW_MORE_VERTICAL,\n} from '@aglyn/shared-data-enums'\nimport { SrOnly, SrOnlyProps } from '@aglyn/shared-ui-jsx'\nimport { MdiIcon, MdiIconProps } from '@aglyn/shared-ui-jsx'\nimport { styled } from '@aglyn/shared-ui-theme'\nimport {\n Button as MuiButton,\n type ButtonProps,\n Divider,\n Stack,\n type StackProps,\n Tooltip as MuiTooltip,\n TooltipProps,\n Typography,\n} from '@mui/material'\nimport { observer } from 'mobx-react-lite'\nimport { forwardRef, useCallback, useState } from 'react'\nimport { Else, If, Then } from 'react-if'\nimport useAddElementDrawerCallback from '../hooks/use-add-element-drawer-callback'\nimport ComponentIconComponent from './component-icon.component'\nimport {\n clearCanvasContextMenu,\n isCanvasContextMenuRequested,\n} from '../utils/canvas-context-menu'\nimport NodeContextMenu from './node-context-menu'\n\ninterface LabelActionProps extends Omit<TooltipProps, 'children'> {\n children?: JSX.Children\n icon: MdiIconProps\n ButtonProps?: ButtonProps\n SrOnlyProps?: SrOnlyProps\n}\n\nconst ActionButton = styled(MuiButton)(({ theme }) => ({\n borderRadius: `0.2em`,\n marginLeft: theme.spacing(-0.2),\n pointerEvent: 'unset',\n paddingTop: theme.spacing(0.1),\n paddingBottom: theme.spacing(0.1),\n paddingRight: theme.spacing(0.15),\n paddingLeft: theme.spacing(0.15),\n fontSize: theme.typography.pxToRem(16),\n minWidth: 20,\n '&.MuiButtonGroup-grouped': { minWidth: 25 },\n}))\n\nconst LabelAction = forwardRef<any, LabelActionProps>((props, ref) => {\n const { children, ButtonProps, icon, SrOnlyProps, ...rest } = props\n\n return (\n <MuiTooltip ref={ref} {...rest}>\n {/* Chrome, not accent (AGL-1186), and now transparent on the slate\n strip rather than a contained pill on it (AGL-1194): a contained\n tertiary button on a tertiary bar would be invisible, and the\n pills were the reason the bar carried two hues at once. `inherit`\n takes the strip's ink, so contrast is a pairing rather than a\n guess in either scheme. */}\n <ActionButton variant={'text'} color={'inherit'} {...ButtonProps}>\n <MdiIcon fontSize=\"inherit\" {...icon} />\n <SrOnly {...SrOnlyProps}>{children}</SrOnly>\n </ActionButton>\n </MuiTooltip>\n )\n})\nLabelAction.displayName = 'AglynLabelAction'\n\nexport interface NodeQuickActionsProps extends StackProps {\n node: Aglyn.NodeSchema\n variant?: 'label' | 'actions'\n}\n\nexport const NodeQuickActions = observer(\n forwardRef<any, NodeQuickActionsProps>((props, ref) => {\n const { node, children, variant, ...rest } = props\n const handleAddElementClick = useAddElementDrawerCallback()\n const handleProps = Besigner.handles.get(node?.$id)\n // Controlled so menu actions can dismiss the tooltip — an uncontrolled\n // tooltip stays open behind (or above) dialogs its actions launch.\n const [moreOpen, setMoreOpen] = useState(false)\n const openMore = useCallback(() => setMoreOpen(true), [])\n /**\n * Right-click on the canvas opens this menu (AGL-1405). The leaf records\n * the request and selects the node, which is what mounts this overlay —\n * so the request is read on the first render rather than needing the\n * component to already exist when the click happened.\n */\n const requested = isCanvasContextMenuRequested(node?.$id)\n const closeMore = useCallback(() => {\n setMoreOpen(false)\n // Unconditionally: a request left standing re-opens the menu the next\n // time this node's overlay mounts, which reads as the menu opening by\n // itself.\n clearCanvasContextMenu()\n }, [])\n return (\n <Stack\n ref={ref}\n id=\"aglyn:element-overlay-label\"\n data-aglyn-node={node?.$id}\n data-aglyn-kind=\"overlay-label\"\n direction=\"row\"\n spacing={0.35}\n divider={\n <Divider orientation=\"vertical\" variant=\"fullWidth\" flexItem sx={{ opacity: 0.5 }} />\n }\n {...rest}\n sx={[{\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n fontSize: 12,\n lineHeight: 1,\n fontWeight: 600,\n letterSpacing: 0.25,\n\n // pointerEvents: 'none',\n marginLeft: '-2px',\n\n marginBottom: '1px',\n // One slate surface for the whole floating control (AGL-1194).\n // The strip was `primary.light` while the buttons on it were\n // `tertiary` — two chrome hues on one control, and an ink colour\n // paired with a background it no longer sat on. Ink is now the\n // contrastText OF THIS background, so it follows the scheme\n // instead of being picked once against the old one.\n backgroundColor: 'tertiary.main',\n color: 'tertiary.contrastText',\n px: 0.5,\n pl: 0.5,\n pr: 0.25,\n py: 0.35\n }, ...(Array.isArray(rest.sx) ? rest.sx : [rest.sx])]}>\n <Stack\n direction=\"column\"\n sx={{\n alignItems: \"center\",\n justifyContent: \"center\",\n fontSize: 12\n }}>\n <ComponentIconComponent\n component={node?.componentSchema}\n node={node}\n fontSize=\"inherit\"\n />\n </Stack>\n <If condition={variant !== 'actions'}>\n <Then>\n <Typography\n component=\"div\"\n title={node?.labelShort}\n sx={{\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n fontSize: \"inherit\",\n color: \"inherit\",\n maxWidth: 100\n }}>\n {node?.labelShort}\n </Typography>\n </Then>\n <Else>\n <Stack\n direction=\"row\"\n spacing={0.25}\n sx={{\n justifyContent: \"flex-start\",\n alignItems: \"center\"\n }}>\n <LabelAction\n title=\"move\"\n disableInteractive\n ButtonProps={{\n ...handleProps,\n onClick: () => handleAddElementClick(node),\n }}\n icon={{ path: ICON_VARIANT_MODIFY_DRAG.path }}\n >\n {'move'}\n </LabelAction>\n <LabelAction\n title=\"Add\"\n disableInteractive\n ButtonProps={{\n onClick: () => handleAddElementClick(node),\n }}\n icon={{ path: ICON_VARIANT_MODIFY_ADD.path }}\n >\n {'add'}\n </LabelAction>\n <LabelAction\n placement=\"right\"\n children={'more'}\n icon={{ path: ICON_VARIANT_SHOW_MORE_VERTICAL.path }}\n enterDelay={200}\n leaveDelay={500}\n open={moreOpen || requested}\n onOpen={openMore}\n onClose={closeMore}\n slotProps={{\n popper: {\n disablePortal: false,\n // Below dialogs/drawers the menu actions open.\n sx: { zIndex: (theme) => theme.zIndex.modal - 1 },\n /**\n * Kept inside the WINDOW, not the document (AGL-1405).\n * `rootBoundary: 'document'` let the menu be placed\n * below the fold — the document is as tall as whatever\n * you put in it, so nothing ever \"overflowed\" it — and\n * the page grew a scrollbar around the menu, which moves\n * the editor's own chrome under the reader. The Paper\n * caps its height and scrolls, so a menu taller than the\n * window is still fully reachable.\n *\n * The 100px padding went with it: it was reserving a\n * margin against a boundary that was never binding, and\n * against the real one it would refuse placements that\n * fit perfectly well.\n */\n modifiers: [\n {\n name: 'flip',\n enabled: true,\n options: { altBoundary: true, padding: 8 },\n },\n {\n name: 'preventOverflow',\n enabled: true,\n options: {\n altAxis: true,\n altBoundary: true,\n tether: false,\n padding: 8,\n },\n },\n {\n name: 'arrow',\n enabled: true,\n },\n ],\n },\n tooltip: {\n sx: {\n padding: 0,\n m: -2,\n },\n },\n }}\n title={<NodeContextMenu node={node} onAction={closeMore} />}\n />\n </Stack>\n </Else>\n </If>\n </Stack>\n );\n }),\n)\nNodeQuickActions.displayName = 'NodeQuickActions'\n\nexport default NodeQuickActions\n"],"names":["Besigner","ICON_VARIANT_MODIFY_ADD","ICON_VARIANT_MODIFY_DRAG","ICON_VARIANT_SHOW_MORE_VERTICAL","SrOnly","MdiIcon","styled","Button","MuiButton","Divider","Stack","Tooltip","MuiTooltip","Typography","observer","forwardRef","useCallback","useState","Else","If","Then","useAddElementDrawerCallback","ComponentIconComponent","clearCanvasContextMenu","isCanvasContextMenuRequested","NodeContextMenu","ActionButton","theme","borderRadius","marginLeft","spacing","pointerEvent","paddingTop","paddingBottom","paddingRight","paddingLeft","fontSize","typography","pxToRem","minWidth","LabelAction","props","ref","children","ButtonProps","icon","SrOnlyProps","rest","variant","color","displayName","NodeQuickActions","node","handleAddElementClick","handleProps","handles","get","$id","moreOpen","setMoreOpen","openMore","requested","closeMore","id","data-aglyn-node","data-aglyn-kind","direction","divider","orientation","flexItem","sx","opacity","justifyContent","alignItems","lineHeight","fontWeight","letterSpacing","marginBottom","backgroundColor","px","pl","pr","py","Array","isArray","component","componentSchema","condition","title","labelShort","textOverflow","overflow","whiteSpace","maxWidth","disableInteractive","onClick","path","placement","enterDelay","leaveDelay","open","onOpen","onClose","slotProps","popper","disablePortal","zIndex","modal","modifiers","name","enabled","options","altBoundary","padding","altAxis","tether","tooltip","m","onAction"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;;;AAGD,YAAYA,cAAc,kBAAiB;AAC3C,SACEC,uBAAuB,EACvBC,wBAAwB,EACxBC,+BAA+B,QAC1B,2BAA0B;AACjC,SAASC,MAAM,QAAqB,uBAAsB;AAC1D,SAASC,OAAO,QAAsB,uBAAsB;AAC5D,SAASC,MAAM,QAAQ,yBAAwB;AAC/C,SACEC,UAAUC,SAAS,EAEnBC,OAAO,EACPC,KAAK,EAELC,WAAWC,UAAU,EAErBC,UAAU,QACL,gBAAe;AACtB,SAASC,QAAQ,QAAQ,kBAAiB;AAC1C,SAASC,UAAU,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,QAAO;AACz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AAM;oDACNC,SAAS;gDACX;6CACD;wCACH;wCACAM,SAAS;4CACP9C,IAAI;gDACF2C,SAAS;gDACTI,GAAG,CAAC;4CACN;wCACF;oCACF;oCACA7B,qBAAO,KAAC/D;wCAAgB2B,MAAMA;wCAAMkE,UAAUxD;;;;;;;;;;AAO5D,IACD;AACDX,iBAAiBD,WAAW,GAAG;AAE/B,eAAeC,iBAAgB"}
1
+ {"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/node-quick-actions.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type * as Aglyn from '@aglyn/aglyn'\nimport * as Besigner from '@aglyn/besigner'\nimport {\n ICON_VARIANT_MODIFY_ADD,\n ICON_VARIANT_MODIFY_DRAG,\n ICON_VARIANT_SHOW_MORE_VERTICAL,\n} from '@aglyn/shared-data-enums'\nimport { SrOnly, SrOnlyProps } from '@aglyn/shared-ui-jsx'\nimport { MdiIcon, MdiIconProps } from '@aglyn/shared-ui-jsx'\nimport { styled } from '@aglyn/shared-ui-theme'\nimport {\n Button as MuiButton,\n type ButtonProps,\n ClickAwayListener,\n Divider,\n Stack,\n type StackProps,\n Tooltip as MuiTooltip,\n TooltipProps,\n Typography,\n useMediaQuery,\n useTheme,\n} from '@mui/material'\nimport { observer } from 'mobx-react-lite'\nimport { forwardRef, useCallback, useState } from 'react'\nimport { Else, If, Then } from 'react-if'\nimport useAddElementDrawerCallback from '../hooks/use-add-element-drawer-callback'\nimport ComponentIconComponent from './component-icon.component'\nimport {\n clearCanvasContextMenu,\n isCanvasContextMenuRequested,\n} from '../utils/canvas-context-menu'\nimport NodeContextMenu from './node-context-menu'\n\ninterface LabelActionProps extends Omit<TooltipProps, 'children'> {\n children?: JSX.Children\n icon: MdiIconProps\n ButtonProps?: ButtonProps\n SrOnlyProps?: SrOnlyProps\n}\n\nconst ActionButton = styled(MuiButton)(({ theme }) => ({\n borderRadius: `0.2em`,\n marginLeft: theme.spacing(-0.2),\n pointerEvent: 'unset',\n paddingTop: theme.spacing(0.1),\n paddingBottom: theme.spacing(0.1),\n paddingRight: theme.spacing(0.15),\n paddingLeft: theme.spacing(0.15),\n fontSize: theme.typography.pxToRem(16),\n minWidth: 20,\n '&.MuiButtonGroup-grouped': { minWidth: 25 },\n // A fingertip needs a target several times the size a cursor does; the\n // strip grows with its buttons, so nothing else has to know.\n '@media (pointer: coarse)': {\n minWidth: 32,\n minHeight: 32,\n fontSize: theme.typography.pxToRem(20),\n },\n}))\n\nconst LabelAction = forwardRef<any, LabelActionProps>((props, ref) => {\n const { children, ButtonProps, icon, SrOnlyProps, ...rest } = props\n\n return (\n <MuiTooltip ref={ref} {...rest}>\n {/* Chrome, not accent (AGL-1186), and now transparent on the slate\n strip rather than a contained pill on it (AGL-1194): a contained\n tertiary button on a tertiary bar would be invisible, and the\n pills were the reason the bar carried two hues at once. `inherit`\n takes the strip's ink, so contrast is a pairing rather than a\n guess in either scheme. */}\n <ActionButton variant={'text'} color={'inherit'} {...ButtonProps}>\n <MdiIcon fontSize=\"inherit\" {...icon} />\n <SrOnly {...SrOnlyProps}>{children}</SrOnly>\n </ActionButton>\n </MuiTooltip>\n )\n})\nLabelAction.displayName = 'AglynLabelAction'\n\nexport interface NodeQuickActionsProps extends StackProps {\n node: Aglyn.NodeSchema\n variant?: 'label' | 'actions'\n}\n\nexport const NodeQuickActions = observer(\n forwardRef<any, NodeQuickActionsProps>((props, ref) => {\n const { node, children, variant, ...rest } = props\n const handleAddElementClick = useAddElementDrawerCallback()\n const handleProps = Besigner.handles.get(node?.$id)\n // Controlled so menu actions can dismiss the tooltip — an uncontrolled\n // tooltip stays open behind (or above) dialogs its actions launch.\n const [moreOpen, setMoreOpen] = useState(false)\n /**\n * Right-click on the canvas opens this menu (AGL-1405). The leaf records\n * the request and selects the node, which is what mounts this overlay —\n * so the request is read on the first render rather than needing the\n * component to already exist when the click happened.\n */\n const requested = isCanvasContextMenuRequested(node?.$id)\n const closeMore = useCallback(() => {\n setMoreOpen(false)\n // Unconditionally: a request left standing re-opens the menu the next\n // time this node's overlay mounts, which reads as the menu opening by\n // itself.\n clearCanvasContextMenu()\n }, [])\n const menuShown = moreOpen || requested\n // The dots are a menu button: a click or tap opens the menu and the next\n // one closes it. A menu that also opened on hover could not be closed\n // by clicking, since the hover had already opened it under the cursor.\n const toggleMore = useCallback(() => {\n if (menuShown) closeMore()\n else setMoreOpen(true)\n }, [menuShown, closeMore])\n // Beside the strip there is no room on a phone: a 240px menu to the\n // right of an element runs off the screen. Below it, the popper slides\n // it sideways into the window instead.\n const theme = useTheme()\n const phone = useMediaQuery(theme.breakpoints.down('sm'), { noSsr: true })\n return (\n // A click or tap anywhere else closes the menu as well.\n <ClickAwayListener onClickAway={() => menuShown && closeMore()}>\n <Stack\n ref={ref}\n id=\"aglyn:element-overlay-label\"\n data-aglyn-node={node?.$id}\n data-aglyn-kind=\"overlay-label\"\n direction=\"row\"\n spacing={0.35}\n divider={\n <Divider orientation=\"vertical\" variant=\"fullWidth\" flexItem sx={{ opacity: 0.5 }} />\n }\n {...rest}\n sx={[{\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n fontSize: 12,\n lineHeight: 1,\n fontWeight: 600,\n letterSpacing: 0.25,\n\n // pointerEvents: 'none',\n marginLeft: '-2px',\n\n marginBottom: '1px',\n // One slate surface for the whole floating control (AGL-1194).\n // The strip was `primary.light` while the buttons on it were\n // `tertiary` — two chrome hues on one control, and an ink colour\n // paired with a background it no longer sat on. Ink is now the\n // contrastText OF THIS background, so it follows the scheme\n // instead of being picked once against the old one.\n backgroundColor: 'tertiary.main',\n color: 'tertiary.contrastText',\n px: 0.5,\n pl: 0.5,\n pr: 0.25,\n py: 0.35\n }, ...(Array.isArray(rest.sx) ? rest.sx : [rest.sx])]}>\n <Stack\n direction=\"column\"\n sx={{\n alignItems: \"center\",\n justifyContent: \"center\",\n fontSize: 12\n }}>\n <ComponentIconComponent\n component={node?.componentSchema}\n node={node}\n fontSize=\"inherit\"\n />\n </Stack>\n <If condition={variant !== 'actions'}>\n <Then>\n <Typography\n component=\"div\"\n title={node?.labelShort}\n sx={{\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n fontSize: \"inherit\",\n color: \"inherit\",\n maxWidth: 100\n }}>\n {node?.labelShort}\n </Typography>\n </Then>\n <Else>\n <Stack\n direction=\"row\"\n spacing={0.25}\n sx={{\n justifyContent: \"flex-start\",\n alignItems: \"center\"\n }}>\n {/* The grip only drags. Touch never opens its tooltip: holding\n the grip is how a drag starts there, and a label popping\n up under the finger would cover the drop. */}\n <LabelAction\n title=\"move\"\n disableInteractive\n disableTouchListener\n ButtonProps={handleProps}\n icon={{ path: ICON_VARIANT_MODIFY_DRAG.path }}\n >\n {'move'}\n </LabelAction>\n <LabelAction\n title=\"Add\"\n disableInteractive\n disableTouchListener\n ButtonProps={{\n onClick: () => handleAddElementClick(node),\n }}\n icon={{ path: ICON_VARIANT_MODIFY_ADD.path }}\n >\n {'add'}\n </LabelAction>\n <LabelAction\n placement={phone ? 'bottom' : 'right'}\n children={'more'}\n icon={{ path: ICON_VARIANT_SHOW_MORE_VERTICAL.path }}\n open={menuShown}\n onClose={closeMore}\n // Only the button decides when the menu opens. Hover and\n // focus would open it on the way past, and MUI's touch\n // path would close it 1.5 s after the finger lifts.\n disableHoverListener\n disableFocusListener\n disableTouchListener\n ButtonProps={{\n onClick: toggleMore,\n 'aria-haspopup': 'menu',\n 'aria-expanded': menuShown,\n }}\n slotProps={{\n popper: {\n disablePortal: false,\n // Below dialogs/drawers the menu actions open.\n sx: { zIndex: (theme) => theme.zIndex.modal - 1 },\n /**\n * Kept inside the WINDOW, not the document (AGL-1405).\n * `rootBoundary: 'document'` let the menu be placed\n * below the fold — the document is as tall as whatever\n * you put in it, so nothing ever \"overflowed\" it — and\n * the page grew a scrollbar around the menu, which moves\n * the editor's own chrome under the reader. The Paper\n * caps its height and scrolls, so a menu taller than the\n * window is still fully reachable.\n *\n * The 100px padding went with it: it was reserving a\n * margin against a boundary that was never binding, and\n * against the real one it would refuse placements that\n * fit perfectly well.\n */\n modifiers: [\n {\n name: 'flip',\n enabled: true,\n options: { altBoundary: true, padding: 8 },\n },\n {\n name: 'preventOverflow',\n enabled: true,\n options: {\n altAxis: true,\n altBoundary: true,\n tether: false,\n padding: 8,\n },\n },\n {\n name: 'arrow',\n enabled: true,\n },\n ],\n },\n tooltip: {\n sx: {\n padding: 0,\n m: -2,\n },\n },\n }}\n title={<NodeContextMenu node={node} onAction={closeMore} />}\n />\n </Stack>\n </Else>\n </If>\n </Stack>\n </ClickAwayListener>\n );\n }),\n)\nNodeQuickActions.displayName = 'NodeQuickActions'\n\nexport default NodeQuickActions\n"],"names":["Besigner","ICON_VARIANT_MODIFY_ADD","ICON_VARIANT_MODIFY_DRAG","ICON_VARIANT_SHOW_MORE_VERTICAL","SrOnly","MdiIcon","styled","Button","MuiButton","ClickAwayListener","Divider","Stack","Tooltip","MuiTooltip","Typography","useMediaQuery","useTheme","observer","forwardRef","useCallback","useState","Else","If","Then","useAddElementDrawerCallback","ComponentIconComponent","clearCanvasContextMenu","isCanvasContextMenuRequested","NodeContextMenu","ActionButton","theme","borderRadius","marginLeft","spacing","pointerEvent","paddingTop","paddingBottom","paddingRight","paddingLeft","fontSize","typography","pxToRem","minWidth","minHeight","LabelAction","props","ref","children","ButtonProps","icon","SrOnlyProps","rest","variant","color","displayName","NodeQuickActions","node","handleAddElementClick","handleProps","handles","get","$id","moreOpen","setMoreOpen","requested","closeMore","menuShown","toggleMore","phone","breakpoints","down","noSsr","onClickAway","id","data-aglyn-node","data-aglyn-kind","direction","divider","orientation","flexItem","sx","opacity","justifyContent","alignItems","lineHeight","fontWeight","letterSpacing","marginBottom","backgroundColor","px","pl","pr","py","Array","isArray","component","componentSchema","condition","title","labelShort","textOverflow","overflow","whiteSpace","maxWidth","disableInteractive","disableTouchListener","path","onClick","placement","open","onClose","disableHoverListener","disableFocusListener","slotProps","popper","disablePortal","zIndex","modal","modifiers","name","enabled","options","altBoundary","padding","altAxis","tether","tooltip","m","onAction"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;;;AAGD,YAAYA,cAAc,kBAAiB;AAC3C,SACEC,uBAAuB,EACvBC,wBAAwB,EACxBC,+BAA+B,QAC1B,2BAA0B;AACjC,SAASC,MAAM,QAAqB,uBAAsB;AAC1D,SAASC,OAAO,QAAsB,uBAAsB;AAC5D,SAASC,MAAM,QAAQ,yBAAwB;AAC/C,SACEC,UAAUC,SAAS,EAEnBC,iBAAiB,EACjBC,OAAO,EACPC,KAAK,EAELC,WAAWC,UAAU,EAErBC,UAAU,EACVC,aAAa,EACbC,QAAQ,QACH,gBAAe;AACtB,SAASC,QAAQ,QAAQ,kBAAiB;AAC1C,SAASC,UAAU,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,QAAO;AACzD,SAASC,IAAI,EAAEC,EAAE,EAAEC,IAAI,QAAQ,WAAU;AACzC,OAAOC,iCAAiC,8CAA0C;AAClF,OAAOC,4BAA4B,gCAA4B;AAC/D,SACEC,sBAAsB,EACtBC,4BAA4B,QACvB,kCAA8B;AACrC,OAAOC,qBAAqB,yBAAqB;AASjD,MAAMC,eAAevB,OAAOE,WAAW,CAAC,EAAEsB,KAAK,EAAE,GAAM,CAAA;QACrDC,cAAc,CAAC,KAAK,CAAC;QACrBC,YAAYF,MAAMG,OAAO,CAAC,CAAC;QAC3BC,cAAc;QACdC,YAAYL,MAAMG,OAAO,CAAC;QAC1BG,eAAeN,MAAMG,OAAO,CAAC;QAC7BI,cAAcP,MAAMG,O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AAMC,SAAS;wDAAE;oDAC3C;oDACA;wDACEJ,MAAM;wDACNC,SAAS;wDACTC,SAAS;4DACPG,SAAS;4DACTF,aAAa;4DACbG,QAAQ;4DACRF,SAAS;wDACX;oDACF;oDACA;wDACEJ,MAAM;wDACNC,SAAS;oDACX;iDACD;4CACH;4CACAM,SAAS;gDACP9C,IAAI;oDACF2C,SAAS;oDACTI,GAAG,CAAC;gDACN;4CACF;wCACF;wCACA7B,qBAAO,KAACtE;4CAAgB4B,MAAMA;4CAAMwE,UAAU/D;;;;;;;;;;;AAQ9D,IACD;AACDV,iBAAiBD,WAAW,GAAG;AAE/B,eAAeC,iBAAgB"}
@@ -75,7 +75,12 @@ const TreeView = styled(MuiList)(({ theme })=>({
75
75
  borderTopLeftRadius: 4,
76
76
  borderBottomLeftRadius: 4,
77
77
  [`& .${classKey.dragHandle}, & .${classKey.moreButton}`]: {
78
- visibility: 'hidden'
78
+ visibility: 'hidden',
79
+ // No hover on a touch screen to reveal them, and a hidden grip
80
+ // cannot be touched: there every row carries both.
81
+ '@media (hover: none)': {
82
+ visibility: 'visible'
83
+ }
79
84
  },
80
85
  // An open menu keeps its own button on screen — the pointer has left
81
86
  // the row to reach the menu, so the hover rule no longer holds it.
@@ -582,6 +587,11 @@ const NodeTreeItem = observer(/*#__PURE__*/ forwardRef((props, ref)=>{
582
587
  },
583
588
  [`.${classKey.treeListItem}:hover &`]: {
584
589
  opacity: 1
590
+ },
591
+ // No hover on a touch screen, so nothing would ever reveal
592
+ // it: there the eye shows on every row, quietly.
593
+ '@media (hover: none)': {
594
+ opacity: authorHidden ? 1 : 0.6
585
595
  }
586
596
  },
587
597
  children: /*#__PURE__*/ _jsx(MdiIcon, {