Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
refactor: make new tree sortable (#4145)
Bogdan Chadkin8bd3897daecc
diff --git a/apps/builder/package.json b/apps/builder/package.jsonindex 0cf2fa73ee..4e819026c5 100644--- a/apps/builder/package.json+++ b/apps/builder/package.json@@ -17,7 +17,7 @@"ci:migrate": "migrations migrate"},"dependencies": {- "@atlaskit/pragmatic-drag-and-drop": "^1.1.11",+ "@atlaskit/pragmatic-drag-and-drop": "^1.3.1","@codemirror/autocomplete": "^6.18.0","@codemirror/commands": "^6.6.0","@codemirror/lang-html": "^6.4.9",diff --git a/packages/design-system/package.json b/packages/design-system/package.jsonindex 7feb82d95d..9cc4e79b5a 100644--- a/packages/design-system/package.json+++ b/packages/design-system/package.json@@ -28,6 +28,9 @@"react-dom": "18.3.0-canary-14898b6a9-20240318"},"dependencies": {+ "@atlaskit/pragmatic-drag-and-drop": "^1.3.1",+ "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.4.0",+ "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3","@floating-ui/dom": "^1.6.5","@radix-ui/colors": "^3.0.0","@radix-ui/react-accessible-icon": "^1.1.0",diff --git a/packages/design-system/src/components/__DEPRECATED__/tree/tree.tsx b/packages/design-system/src/components/__DEPRECATED__/tree/tree.tsxindex d08f8f74ad..a659302f4a 100644--- a/packages/design-system/src/components/__DEPRECATED__/tree/tree.tsx+++ b/packages/design-system/src/components/__DEPRECATED__/tree/tree.tsx@@ -2,7 +2,7 @@ import type { ReactNode } from "react";import { useState, useMemo, useRef, useCallback, useEffect } from "react";import { createPortal } from "react-dom";import { FocusScope, useFocusManager } from "@react-aria/focus";-import { ListPositionIndicator } from "../../list-position-indicator";+import { TreePositionIndicator } from "../../list-position-indicator";import {TreeNode,INDENT,@@ -373,11 +373,10 @@ export const Tree = <Data extends { id: string }>({<Box css={{ height: theme.spacing[7] }}></Box>{shiftedDropTarget?.placement &&createPortal(- <ListPositionIndicator+ <TreePositionIndicatorx={shiftedDropTarget.placement.x}y={shiftedDropTarget.placement.y}length={shiftedDropTarget.placement.length}- withNub/>,document.body)}diff --git a/packages/design-system/src/components/list-position-indicator.stories.tsx b/packages/design-system/src/components/list-position-indicator.stories.tsxindex 2013c63abe..5c6f56dd33 100644--- a/packages/design-system/src/components/list-position-indicator.stories.tsx+++ b/packages/design-system/src/components/list-position-indicator.stories.tsx@@ -1,4 +1,7 @@-import { ListPositionIndicator } from "./list-position-indicator";+import {+ ListPositionIndicator,+ TreePositionIndicator,+} from "./list-position-indicator";import { StorySection, StoryGrid } from "./storybook";export default {@@ -31,7 +34,7 @@ export const Demo = () => (height: 30,}}>- <ListPositionIndicator x={0} y={0} length={200} withNub />+ <TreePositionIndicator x={0} y={0} length={200} /></div></StoryGrid></StorySection>@@ -56,7 +59,7 @@ export const Demo = () => (height: 30,}}>- <ListPositionIndicator x={0} y={0} length={200} withNub />+ <TreePositionIndicator x={0} y={0} length={200} /></div></StoryGrid></StorySection>diff --git a/packages/design-system/src/components/list-position-indicator.tsx b/packages/design-system/src/components/list-position-indicator.tsxindex a361d36452..503cad98a0 100644--- a/packages/design-system/src/components/list-position-indicator.tsx+++ b/packages/design-system/src/components/list-position-indicator.tsx@@ -12,12 +12,18 @@ const OUTLINE_WIDTH = 1;// overlap the line with the circle by this much// to make sure they are connected-const OVERLAP = 1;+const OVERLAP = 2;++const Container = styled(Box, {+ position: "absolute",+});const CircleOutline = styled(Box, {width: CIRCLE_SIZE + OUTLINE_WIDTH * 2,height: CIRCLE_SIZE + OUTLINE_WIDTH * 2,position: "absolute",+ top: -CIRCLE_SIZE / 2 - OUTLINE_WIDTH,+ left: -CIRCLE_SIZE / 2 - OUTLINE_WIDTH,borderRadius: "50%",pointerEvents: "none",bc: theme.colors.borderContrast,@@ -27,8 +33,9 @@ const Circle = styled(Box, {width: CIRCLE_SIZE,height: CIRCLE_SIZE,position: "absolute",- border: `solid ${theme.colors.backgroundPrimary}`,- borderWidth: 2,+ top: -CIRCLE_SIZE / 2,+ left: -CIRCLE_SIZE / 2,+ border: `2px solid ${theme.colors.backgroundPrimary}`,borderRadius: "50%",pointerEvents: "none",});@@ -36,53 +43,51 @@ const Circle = styled(Box, {const Line = styled(Box, {boxSizing: "content-box",position: "absolute",- background: theme.colors.backgroundPrimary,+ top: -LINE_THICKNESS / 2,+ left: 0,+ width: "100%",+ height: LINE_THICKNESS,+ backgroundColor: theme.colors.backgroundPrimary,pointerEvents: "none",outline: `solid ${theme.colors.borderContrast}`,outlineWidth: OUTLINE_WIDTH,});+const LineWithNub = styled(Line, {+ left: CIRCLE_SIZE / 2 - OVERLAP,+ width: `calc(100% - ${CIRCLE_SIZE / 2 - OVERLAP}px)`,+});+export const ListPositionIndicator = ({x,y,length,- withNub = false,}: {- x: number;- y: number;- length: number;- withNub?: boolean;-}) =>- withNub ? (- <>- <CircleOutline- style={{- top: y - CIRCLE_SIZE / 2 - OUTLINE_WIDTH,- left: x - CIRCLE_SIZE / 2 - OUTLINE_WIDTH,- }}- />- <Line- style={{- top: y - LINE_THICKNESS / 2,- left: x + (CIRCLE_SIZE / 2 - OVERLAP),- width: length - (CIRCLE_SIZE / 2 - OVERLAP),- height: LINE_THICKNESS,- }}- />- <Circle- style={{- top: y - CIRCLE_SIZE / 2,- left: x - CIRCLE_SIZE / 2,- }}- />- </>- ) : (- <Line- style={{- top: y - LINE_THICKNESS / 2,- left: x,- width: length,- height: LINE_THICKNESS,- }}- />+ x: number | string;+ y: number | string;+ length: number | string;+}) => {+ return (+ <Container style={{ top: y, left: x, width: length }}>+ <Line />+ </Container>+ );+};++export const TreePositionIndicator = ({+ x,+ y,+ length,+}: {+ x: number | string;+ y: number | string;+ length: number | string;+}) => {+ return (+ <Container style={{ top: y, left: x, width: length }}>+ <CircleOutline />+ <LineWithNub />+ <Circle />+ </Container>);+};diff --git a/packages/design-system/src/components/tree.stories.tsx b/packages/design-system/src/components/tree.stories.tsxindex 42deab07ad..1d3a397dfa 100644--- a/packages/design-system/src/components/tree.stories.tsx+++ b/packages/design-system/src/components/tree.stories.tsx@@ -2,7 +2,13 @@ import { useMemo, useState } from "react";import { EllipsesIcon } from "@webstudio-is/icons";import { SmallIconButton } from "./small-icon-button";import { Box } from "./box";-import { TreeRoot, TreeNode, TreeNodeLabel } from "./tree";+import {+ TreeRoot,+ TreeNode,+ TreeNodeLabel,+ TreeSortableItem,+ type TreeDropTarget,+} from "./tree";export default {title: "Library/Tree",@@ -15,46 +21,134 @@ type Node = {type FlatNode = {name: string;+ selector: string[];level: number;isExpanded?: boolean;+ isLastChild: boolean;};-const data: Node = {+const findNode = (data: Node, name?: string) => {+ let matched: undefined | Node;+ const traverse = (node: Node) => {+ if (node.name === name) {+ matched = node;+ return;+ }+ for (const child of node.children) {+ traverse(child);+ }+ };+ traverse(data);+ return matched;+};++const move = ({+ data,+ sourceParentName,+ sourceName,+ dropTarget,+}: {+ data: Node;+ sourceParentName: string;+ sourceName: string;+ dropTarget: DropTarget;+}) => {+ const newData = structuredClone(data);+ const sourceParentNode = findNode(newData, sourceParentName);+ const sourceNode = findNode(newData, sourceName);+ const targetParentNode = findNode(newData, dropTarget.parentName);+ const targetBeforeNode = findNode(newData, dropTarget.beforeName);+ const targetAfterNode = findNode(newData, dropTarget.afterName);+ if (sourceParentNode && sourceNode) {+ const index = sourceParentNode.children.indexOf(sourceNode);+ sourceParentNode.children.splice(index, 1);+ }+ if (targetParentNode && sourceNode) {+ if (targetBeforeNode) {+ const index = targetParentNode.children.indexOf(targetBeforeNode);+ targetParentNode.children.splice(index, 0, sourceNode);+ } else if (targetAfterNode) {+ const index = targetParentNode.children.indexOf(targetAfterNode) + 1;+ targetParentNode.children.splice(index, 0, sourceNode);+ } else {+ targetParentNode.children.push(sourceNode);+ }+ }+ return newData;+};++const initialData: Node = {name: "Root",- children: [- {- name: "Box 1",- children: [- { name: "Box 2", children: [] },- { name: "Container 1", children: [] },- { name: "Wrapper 1", children: [] },- ],- },- {- name: "Container 2",- children: [- { name: "Box 3", children: [] },- { name: "Container 3", children: [] },- { name: "Wrapper 2", children: [] },- ],- },- {- name: "Wrapper 3",- children: [- { name: "Box 4", children: [] },- { name: "Container 4", children: [] },- { name: "Wrapper 4", children: [] },- ],- },- ],+ children: Array.from(Array(10)).map((_, index) => ({+ name: `Parent ${index + 1}`,+ children: [+ {+ name: `Box ${index + 1}.1`,+ children: [+ { name: `Box ${index + 1}.2`, children: [] },+ { name: `Container ${index + 1}.1`, children: [] },+ { name: `Wrapper ${index + 1}.1`, children: [] },+ ],+ },+ {+ name: `Container ${index + 1}.2`,+ children: [+ { name: `Box ${index + 1}.3`, children: [] },+ { name: `Container ${index + 1}.3`, children: [] },+ { name: `Wrapper ${index + 1}.2`, children: [] },+ ],+ },+ {+ name: `Wrapper ${index + 1}.3`,+ children: [+ { name: `Box ${index + 1}.4`, children: [] },+ { name: `Container ${index + 1}.4`, children: [] },+ { name: `Wrapper ${index + 1}.4`, children: [] },+ ],+ },+ ],+ })),+};++type DropTarget = {+ parentName: string;+ beforeName?: string;+ afterName?: string;+};++const getDropTarget = (+ node: FlatNode,+ dropTarget: undefined | TreeDropTarget+): undefined | DropTarget => {+ if (dropTarget === undefined) {+ return;+ }+ const parentName = node.selector.at(-dropTarget.parentLevel - 1);+ const beforeName =+ dropTarget.beforeLevel === undefined+ ? undefined+ : node.selector.at(-dropTarget.beforeLevel - 1);+ const afterName =+ dropTarget.afterLevel === undefined+ ? undefined+ : node.selector.at(-dropTarget.afterLevel - 1);+ if (parentName) {+ return { parentName, beforeName, afterName };+ }};export const Tree = () => {const [selectedItemId, setSelectedItemId] = useState("");const [expandedItems, setExpandedItems] = useState(new Set<string>());+ const [data, setData] = useState(initialData);const flatTree = useMemo(() => {const flatTree: FlatNode[] = [];- const traverse = (node: Node, level = 0) => {+ const traverse = (+ node: Node,+ selector: string[],+ isLastChild = false,+ level = 0+ ) => {let isExpanded;if (level > 0 && node.children.length > 0) {isExpanded = expandedItems.has(node.name);@@ -62,48 +156,90 @@ export const Tree = () => {// hide root folderflatTree.push({name: node.name,+ selector,level,isExpanded,+ isLastChild,});if (level === 0 || isExpanded) {for (const child of node.children) {- traverse(child, level + 1);+ const isLastChild = node.children.at(-1) === child;+ traverse(child, [child.name, ...selector], isLastChild, level + 1);}}};- traverse(data);+ traverse(data, [data.name], false);return flatTree;- }, [expandedItems]);+ }, [data, expandedItems]);+ const [dropTarget, setDropTarget] = useState<undefined | DropTarget>();+return (<Box css={{ maxWidth: 300 }}><TreeRoot>- {flatTree.map((node) => (- <TreeNode- key={node.name}- level={node.level}- isSelected={node.name === selectedItemId}- isExpanded={node.isExpanded}- onExpand={(isExpanded) => {- setExpandedItems((prevExpandedItems) => {- const newExpandedItems = new Set(prevExpandedItems);- if (isExpanded) {- newExpandedItems.add(node.name);- } else {- newExpandedItems.delete(node.name);+ {flatTree.map((node) => {+ const handleExpand = (isExpanded: boolean) => {+ setExpandedItems((prevExpandedItems) => {+ const newExpandedItems = new Set(prevExpandedItems);+ if (isExpanded) {+ newExpandedItems.add(node.name);+ } else {+ newExpandedItems.delete(node.name);+ }+ return newExpandedItems;+ });+ };++ return (+ <TreeSortableItem+ key={node.name}+ level={node.level}+ isExpanded={node.isExpanded}+ isLastChild={node.isLastChild}+ data={node}+ // prevent dragging root+ canDrag={() => node.level > 0}+ // prevent dropping into toplevel+ canDrop={(dropTarget) => dropTarget.parentLevel > 0}+ onExpand={handleExpand}+ onDropTargetChange={(dropTarget) =>+ setDropTarget(getDropTarget(node, dropTarget))+ }+ onDrop={(sourceNode) => {+ if (dropTarget) {+ setData((data) =>+ move({+ data,+ sourceParentName: sourceNode.selector[1],+ sourceName: sourceNode.selector[0],+ dropTarget,+ })+ );+ }+ }}+ >+ <TreeNode+ level={node.level}+ isSelected={node.name === selectedItemId}+ isHighlighted={dropTarget?.parentName === node.name}+ isExpanded={node.isExpanded}+ onExpand={handleExpand}+ buttonProps={{+ onFocus: () => {+ setSelectedItemId(node.name);+ },+ onClick: () => {+ setSelectedItemId(node.name);+ },+ }}+ action={+ <SmallIconButton tabIndex={-1} icon={<EllipsesIcon />} />}- return newExpandedItems;- });- }}- buttonProps={{- onClick: () => {- setSelectedItemId(node.name);- },- }}- action={<SmallIconButton tabIndex={-1} icon={<EllipsesIcon />} />}- >- <TreeNodeLabel>{node.name}</TreeNodeLabel>- </TreeNode>- ))}+ >+ <TreeNodeLabel>{node.name}</TreeNodeLabel>+ </TreeNode>+ </TreeSortableItem>+ );+ })}</TreeRoot></Box>);diff --git a/packages/design-system/src/components/tree.tsx b/packages/design-system/src/components/tree.tsxindex a42e980832..2596921648 100644--- a/packages/design-system/src/components/tree.tsx+++ b/packages/design-system/src/components/tree.tsx@@ -1,11 +1,26 @@import {useEffect,+ useInsertionEffect,useRef,+ useState,type ComponentPropsWithoutRef,type KeyboardEvent,type ReactNode,} from "react";import { FocusScope, useFocusManager } from "@react-aria/focus";+import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";+import {+ draggable,+ dropTargetForElements,+} from "@atlaskit/pragmatic-drag-and-drop/element/adapter";+import { disableNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview";+import {+ attachInstruction,+ extractInstruction,+ type Instruction,+ type ItemMode,+} from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";+import { autoScrollWindowForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element";import {ChevronFilledDownIcon,ChevronFilledRightIcon,@@ -13,8 +28,10 @@ import {import { styled, theme } from "../stitches.config";import { Box } from "./box";import { Text } from "./text";+import { TreePositionIndicator } from "./list-position-indicator";const treeNodeLevel = "--tree-node-level";+const treeNodeOutline = "--tree-node-outline";const treeActionOpacity = "--tree-action-opacity";const treeDepthBarsVisibility = "--tree-depth-bars-visibility";const treeDepthBarsColor = "--tree-depth-bars-color";@@ -83,7 +100,7 @@ const NodeContainer = styled("div", {position: "relative",height: ITEM_HEIGHT,"&:hover, &:has(:focus-visible), &:has([aria-current=true])": {- outline: `2px solid ${theme.colors.borderFocus}`,+ outline: `var(${treeNodeOutline}, 2px solid ${theme.colors.borderFocus})`,outlineOffset: -3,borderRadius: theme.borderRadius[6],[treeActionOpacity]: 1,@@ -155,6 +172,227 @@ const ActionContainer = styled("div", {alignItems: "center",});+const DropIndicator = ({+ instruction,+}: {+ instruction: null | Instruction;+}) => {+ if (instruction?.type === "reorder-above") {+ const indent = instruction.currentLevel * instruction.indentPerLevel;+ return (+ <TreePositionIndicator+ x={indent}+ y="0"+ length={`calc(100% - ${indent}px)`}+ />+ );+ }+ if (instruction?.type === "reorder-below") {+ const indent = instruction.currentLevel * instruction.indentPerLevel;+ return (+ <TreePositionIndicator+ x={indent}+ y="100%"+ length={`calc(100% - ${indent}px)`}+ />+ );+ }+ if (instruction?.type === "reparent") {+ const indent = instruction.desiredLevel * instruction.indentPerLevel;+ return (+ <TreePositionIndicator+ x={indent}+ y="100%"+ length={`calc(100% - ${indent}px)`}+ />+ );+ }+};++export type TreeDropTarget = {+ parentLevel: number;+ beforeLevel?: number;+ afterLevel?: number;+};++const getTreeDropTarget = (instruction: null | Instruction) => {+ let treeDropTarget: undefined | TreeDropTarget;+ if (instruction?.type === "make-child") {+ treeDropTarget = { parentLevel: instruction.currentLevel };+ }+ if (instruction?.type === "reorder-below") {+ const afterLevel = instruction.currentLevel;+ treeDropTarget = { parentLevel: afterLevel - 1, afterLevel };+ }+ if (instruction?.type === "reorder-above") {+ const beforeLevel = instruction.currentLevel;+ treeDropTarget = { parentLevel: beforeLevel - 1, beforeLevel };+ }+ if (instruction?.type === "reparent") {+ const afterLevel = instruction.desiredLevel;+ treeDropTarget = { parentLevel: afterLevel - 1, afterLevel };+ }+ return treeDropTarget;+};++// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type+const useCallbackRef = <Fn extends Function>(fn: Fn) => {+ const ref = useRef(fn);+ useInsertionEffect(() => {+ ref.current = fn;+ });+ return ref;+};++export const TreeSortableItem = <Data,>({+ level,+ isExpanded,+ isLastChild,+ data,+ canDrag,+ canDrop,+ onDropTargetChange,+ onDrop,+ onExpand,+ children,+}: {+ level: number;+ isExpanded: undefined | boolean;+ isLastChild: boolean;+ data: Data;+ canDrag: () => boolean;+ canDrop: (dropTarge: TreeDropTarget) => boolean;+ onDropTargetChange: (dropTarget: undefined | TreeDropTarget) => void;+ onDrop: (data: Data) => void;+ onExpand: (isExpanded: boolean) => void;+ children: ReactNode;+}) => {+ const elementRef = useRef<HTMLDivElement>(null);+ const [instruction, setInstruction] = useState<null | Instruction>(null);+ const [isDragging, setIsDragging] = useState(false);+ const [isDropOver, setIsDropOver] = useState(false);+ const handleDropTargetChange = useCallbackRef(onDropTargetChange);+ const handleDrop = useCallbackRef(onDrop);+ const handleExpand = useCallbackRef(onExpand);+ const handleCanDrag = useCallbackRef(canDrag);+ const handleCanDrop = useCallbackRef(canDrop);+ const expandTimeout = useRef<number>();++ useEffect(() => {+ if (elementRef.current === null) {+ return;+ }+ return combine(+ draggable({+ element: elementRef.current,+ onGenerateDragPreview: ({ nativeSetDragImage }) => {+ disableNativeDragPreview({ nativeSetDragImage });+ },+ getInitialData: () => ({+ itemData: data,+ }),+ canDrag: () => handleCanDrag.current(),+ onDrag: () => {+ setIsDragging(true);+ },+ onDrop: () => {+ setIsDragging(false);+ },+ }),+ dropTargetForElements({+ element: elementRef.current,+ getData: ({ input, element }) => {+ // this will 'attach' the instruction to your `data` object+ let mode: ItemMode = "standard";+ if (isLastChild) {+ mode = "last-in-group";+ }+ if (isExpanded) {+ mode = "expanded";+ }+ return attachInstruction(+ {},+ {+ input,+ element,+ currentLevel: level,+ indentPerLevel: BARS_GAP,+ mode,+ }+ );+ },+ onDrag: (args) => {+ let instruction = extractInstruction(args.self.data);+ const dropTarget = getTreeDropTarget(instruction);+ if (dropTarget) {+ if (handleCanDrop.current(dropTarget)) {+ handleDropTargetChange.current(dropTarget);+ } else {+ handleDropTargetChange.current(undefined);+ instruction = null;+ }+ }+ setInstruction(instruction);+ },+ onDragEnter: () => {+ // timeout in browser use only number as timeout id+ window.clearTimeout(expandTimeout.current);+ expandTimeout.current = window.setTimeout(() => {+ handleExpand.current(true);+ }, 600);+ setIsDropOver(true);+ },+ onDragLeave: () => {+ window.clearTimeout(expandTimeout.current);+ setIsDropOver(false);+ setInstruction(null);+ handleDropTargetChange.current(undefined);+ },+ onDrop: (args) => {+ window.clearTimeout(expandTimeout.current);+ handleDropTargetChange.current(undefined);+ handleDrop.current(args.source.data.itemData as Data);+ setIsDropOver(false);+ setInstruction(null);+ },+ }),+ autoScrollWindowForElements()+ );+ }, [+ level,+ isExpanded,+ isLastChild,+ data,+ handleCanDrag,+ handleCanDrop,+ handleDrop,+ handleDropTargetChange,+ handleExpand,+ ]);++ return (+ <Box+ ref={elementRef}+ data-tree-sortable-item+ data-level={level}+ data-is-dragging={isDragging}+ data-is-drop-over={isDropOver}+ css={{+ position: "relative",+ "&[data-is-drop-over=true]": {+ zIndex: 1,+ },+ "&[data-is-dragging=true]": {+ [treeNodeOutline]: "none",+ },+ }}+ >+ {children}+ <DropIndicator instruction={instruction} />+ </Box>+ );+};+export const TreeNode = ({level,tabbable,diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex cf0caf0700..e0ac4eafe9 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -63,7 +63,7 @@ importers:version: 8.2.8([email protected]([email protected]))([email protected])([email protected](@babel/[email protected](@babel/[email protected])))([email protected])'@storybook/react-vite':specifier: ^8.2.8- version: 8.2.8([email protected]([email protected]))([email protected])([email protected])([email protected](@babel/[email protected](@babel/[email protected])))([email protected])([email protected](@types/[email protected]))+ version: 8.2.8([email protected]([email protected]))([email protected])([email protected](@babel/[email protected](@babel/[email protected])))([email protected])([email protected](@types/[email protected]))'@types/css-tree':specifier: ^2.3.1version: 2.3.1(patch_hash=ac22lciodhaj6xmoeignv36gyq)@@ -125,8 +125,8 @@ importers:apps/builder:dependencies:'@atlaskit/pragmatic-drag-and-drop':- specifier: ^1.1.11- version: 1.1.11+ specifier: ^1.3.1+ version: 1.3.1'@codemirror/autocomplete':specifier: ^6.18.0version: 6.18.0(@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected])@@ -935,7 +935,7 @@ importers:version: link:../sdkai:specifier: ^2.2.12escape-string-regexp:specifier: ^5.0.0version: 5.0.0@@ -1300,6 +1300,15 @@ importers:packages/design-system:dependencies:+ '@atlaskit/pragmatic-drag-and-drop':+ specifier: ^1.3.1+ version: 1.3.1+ '@atlaskit/pragmatic-drag-and-drop-auto-scroll':+ specifier: ^1.4.0+ version: 1.4.0+ '@atlaskit/pragmatic-drag-and-drop-hitbox':+ specifier: ^1.0.3+ version: 1.0.3'@floating-ui/dom':specifier: ^1.6.5version: 1.6.5@@ -2167,8 +2176,14 @@ packages:resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==}engines: {node: '>=6.0.0'}- '@atlaskit/[email protected]':- resolution: {integrity: sha512-oAwMGM68d7PrAHvcgwzJbOtZJKW6BJsc2eDWfVWb7W+lGo8tWDIFdMSmR2K+EczV03lXgdnQbRWDMcOrZ/98mQ==}+ '@atlaskit/[email protected]':+ resolution: {integrity: sha512-5GoikoTSW13UX76F9TDeWB8x3jbbGlp/Y+3aRkHe1MOBMkrWkwNpJ42MIVhhX/6NSeaZiPumP0KbGJVs2tOWSQ==}++ '@atlaskit/[email protected]':+ resolution: {integrity: sha512-/Sbu/HqN2VGLYBhnsG7SbRNg98XKkbF6L7XDdBi+izRybfaK1FeMfodPpm/xnBHPJzwYMdkE0qtLyv6afhgMUA==}++ '@atlaskit/[email protected]':+ resolution: {integrity: sha512-MptcLppK78B2eplL5fHk93kfCbZ6uCpt33YauBPrOwI5zcHYJhZGeaGEaAXoVAHnSJOdQUhy6kGVVC9qggz2Fg==}'@aws-crypto/[email protected]':resolution: {integrity: sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==}@@ -6144,7 +6159,7 @@ packages:resolution: {integrity: sha512-j4dx+Fb0URmzbwwMUrhqWM2BEWHdFGx+qZ9qqASHRPqvTYdqvWnHg0H1hIbcyLnvgnoNAVMlwkepyqM3DaIFUg==}- resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}+ resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==}@@ -6913,13 +6928,16 @@ packages:resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==}+ deprecated: Glob versions prior to v9 are no longer supportedresolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}+ deprecated: Glob versions prior to v9 are no longer supportedresolution: {integrity: sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==}engines: {node: '>=12'}+ deprecated: Glob versions prior to v9 are no longer supportedresolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}@@ -7102,6 +7120,7 @@ packages:resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}+ deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}@@ -8811,10 +8830,6 @@ packages:peerDependencies:react: 18.3.0-canary-14898b6a9-20240318- resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==}- engines: {node: '>=0.10.0'}-resolution: {integrity: sha512-v7DaMx1oNRNNHjqS3htQ5ZHo3klcaX8qyN391ymlAJLVs6FR97q4YdvL7juB0Z1BO718JuYAxzDehozvwKZwUw==}engines: {node: '>=0.10.0'}@@ -9017,6 +9032,7 @@ packages:resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==}+ deprecated: Rimraf versions prior to v4 are no longer supportedhasBin: true@@ -10057,9 +10073,19 @@ snapshots:'@jridgewell/gen-mapping': 0.3.2'@jridgewell/trace-mapping': 0.3.18- '@atlaskit/[email protected]':+ '@atlaskit/[email protected]':dependencies:- '@babel/runtime': 7.22.3+ '@atlaskit/pragmatic-drag-and-drop': 1.3.1+ '@babel/runtime': 7.25.0++ '@atlaskit/[email protected]':+ dependencies:+ '@atlaskit/pragmatic-drag-and-drop': 1.3.1+ '@babel/runtime': 7.25.0++ '@atlaskit/[email protected]':+ dependencies:+ '@babel/runtime': 7.25.0bind-event-listener: 3.0.0raf-schd: 4.0.3@@ -12664,7 +12690,7 @@ snapshots:dependencies:- '@babel/runtime': 7.22.3+ '@babel/runtime': 7.25.0'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])react: 18.3.0-canary-14898b6a9-20240318optionalDependencies:@@ -13110,13 +13136,11 @@ snapshots:dependencies:web-streams-polyfill: 3.2.1- '@rollup/[email protected]([email protected])':+ '@rollup/[email protected]':dependencies:'@types/estree': 1.0.5estree-walker: 2.0.2picomatch: 2.3.1- optionalDependencies:- rollup: 4.14.0'@rollup/[email protected]':optional: true@@ -13349,10 +13373,10 @@ snapshots:react-dom: 18.3.0-canary-14898b6a9-20240318([email protected])storybook: 8.2.8(@babel/[email protected](@babel/[email protected]))- '@storybook/[email protected]([email protected]([email protected]))([email protected])([email protected])([email protected](@babel/[email protected](@babel/[email protected])))([email protected])([email protected](@types/[email protected]))':+ '@storybook/[email protected]([email protected]([email protected]))([email protected])([email protected](@babel/[email protected](@babel/[email protected])))([email protected])([email protected](@types/[email protected]))':dependencies:'@joshwooding/vite-plugin-react-docgen-typescript': 0.3.1([email protected])([email protected](@types/[email protected]))- '@rollup/pluginutils': 5.0.2([email protected])+ '@rollup/pluginutils': 5.0.2'@storybook/builder-vite': 8.2.8([email protected](@babel/[email protected](@babel/[email protected])))([email protected])([email protected](@types/[email protected]))'@storybook/react': 8.2.8([email protected]([email protected]))([email protected])([email protected](@babel/[email protected](@babel/[email protected])))([email protected])find-up: 5.0.0@@ -14018,18 +14042,18 @@ snapshots:clean-stack: 2.2.0indent-string: 4.0.0dependencies:eventsource-parser: 1.0.0nanoid: 3.3.6openai: 4.2.0solid-swr-store: 0.10.7([email protected])([email protected])sswr: 2.0.0([email protected])- swr: 2.2.0([email protected])+ swr: 2.2.0([email protected])swr-store: 0.10.6swrv: 1.0.4([email protected])optionalDependencies:- react: 18.2.0+ react: 18.3.0-canary-14898b6a9-20240318solid-js: 1.7.11svelte: 4.2.0vue: 3.3.4@@ -16673,7 +16697,7 @@ snapshots:dependencies:- '@babel/runtime': 7.22.3+ '@babel/runtime': 7.25.0@@ -17904,10 +17928,6 @@ snapshots:react-shallow-renderer: 16.15.0([email protected])scheduler: 0.24.0-canary-14898b6a9-20240318- dependencies:- loose-envify: 1.4.0-dependencies:loose-envify: 1.4.0@@ -18530,10 +18550,10 @@ snapshots:dependencies:dequal: 2.0.3dependencies:- react: 18.2.0- use-sync-external-store: 1.2.0([email protected])+ react: 18.3.0-canary-14898b6a9-20240318+ use-sync-external-store: 1.2.0([email protected])@@ -18924,9 +18944,9 @@ snapshots:optionalDependencies:'@types/react': 18.2.79dependencies:- react: 18.2.0+ react: 18.3.0-canary-14898b6a9-20240318