@reallygoodwork/design-ui-react 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +14 -2
- package/dist/assets/icons/AlignItemsBaseline.d.ts +4 -0
- package/dist/assets/icons/AlignItemsCenter.d.ts +4 -0
- package/dist/assets/icons/AlignItemsFlexEnd.d.ts +4 -0
- package/dist/assets/icons/AlignItemsFlexStart.d.ts +4 -0
- package/dist/assets/icons/AlignItemsStretch.d.ts +4 -0
- package/dist/assets/icons/FlexDirectionColumn.d.ts +4 -0
- package/dist/assets/icons/FlexDirectionColumnReverse.d.ts +4 -0
- package/dist/assets/icons/FlexDirectionRow.d.ts +4 -0
- package/dist/assets/icons/FlexDirectionRowReverse.d.ts +4 -0
- package/dist/assets/icons/FlexWrapNoWrap.d.ts +4 -0
- package/dist/assets/icons/FlexWrapWrap.d.ts +4 -0
- package/dist/assets/icons/JustifyContentCenter.d.ts +4 -0
- package/dist/assets/icons/JustifyContentFlexEnd.d.ts +4 -0
- package/dist/assets/icons/JustifyContentFlexStart.d.ts +4 -0
- package/dist/assets/icons/JustifyContentSpaceAround.d.ts +4 -0
- package/dist/assets/icons/JustifyContentSpaceBetween.d.ts +4 -0
- package/dist/assets/icons/JustifyContentSpaceEvenly.d.ts +4 -0
- package/dist/assets/icons/index.d.ts +17 -0
- package/dist/components/AddLayerDialog.d.ts +2 -0
- package/dist/components/BreakpointFrame.d.ts +12 -0
- package/dist/components/BreakpointHeader.d.ts +10 -0
- package/dist/components/BreakpointPropertiesPanel.d.ts +5 -0
- package/dist/components/BreakpointSwitcher.d.ts +8 -0
- package/dist/components/CSSPanel.d.ts +2 -0
- package/dist/components/DesignAction.d.ts +16 -0
- package/dist/components/DesignActionPanel.d.ts +1 -0
- package/dist/components/DesignToolbarContainer.d.ts +1 -0
- package/dist/components/DesignView.d.ts +14 -0
- package/dist/components/Designer.d.ts +81 -0
- package/dist/components/DesignerCanvas.d.ts +4 -0
- package/dist/components/DesignerContent.d.ts +4 -0
- package/dist/components/DesignerFrame.d.ts +5 -0
- package/dist/components/DesignerHeader.d.ts +3 -0
- package/dist/components/DesignerPane.d.ts +14 -0
- package/dist/components/DesignerPanel.d.ts +3 -0
- package/dist/components/DesignerToolbar.d.ts +4 -0
- package/dist/components/DesignerToolbarButton.d.ts +9 -0
- package/dist/components/DesignerToolbarGroup.d.ts +4 -0
- package/dist/components/DesignerToolbarSeparator.d.ts +1 -0
- package/dist/components/EditorPreviewToggle.d.ts +5 -0
- package/dist/components/ExportMenu.d.ts +2 -0
- package/dist/components/FontLoader.d.ts +4 -0
- package/dist/components/FrameStylesPanel.d.ts +5 -0
- package/dist/components/PaneLayerTree.d.ts +9 -0
- package/dist/components/RuleNotice.d.ts +5 -0
- package/dist/components/RulesPanel.d.ts +6 -0
- package/dist/components/ZoomControl.d.ts +1 -0
- package/dist/components/ables/DimensionAble.d.ts +13 -0
- package/dist/components/ables/StructureAble.d.ts +18 -0
- package/dist/components/actions/ActionAlignItems.d.ts +1 -0
- package/dist/components/actions/ActionBackgroundColor.d.ts +1 -0
- package/dist/components/actions/ActionBorder.d.ts +1 -0
- package/dist/components/actions/ActionBorderRadius.d.ts +1 -0
- package/dist/components/actions/ActionColor.d.ts +1 -0
- package/dist/components/actions/ActionDisplay.d.ts +1 -0
- package/dist/components/actions/ActionElementType.d.ts +1 -0
- package/dist/components/actions/ActionFill.d.ts +1 -0
- package/dist/components/actions/ActionFlexDirection.d.ts +1 -0
- package/dist/components/actions/ActionFlexWrap.d.ts +1 -0
- package/dist/components/actions/ActionFontFamily.d.ts +1 -0
- package/dist/components/actions/ActionFontSize.d.ts +1 -0
- package/dist/components/actions/ActionFontWeight.d.ts +1 -0
- package/dist/components/actions/ActionFontWidth.d.ts +1 -0
- package/dist/components/actions/ActionGap.d.ts +1 -0
- package/dist/components/actions/ActionGridLayout.d.ts +1 -0
- package/dist/components/actions/ActionImage.d.ts +2 -0
- package/dist/components/actions/ActionJustifyContent.d.ts +1 -0
- package/dist/components/actions/ActionLayout/GridCanvas.d.ts +7 -0
- package/dist/components/actions/ActionLayout.d.ts +1 -0
- package/dist/components/actions/ActionLetterSpacing.d.ts +1 -0
- package/dist/components/actions/ActionLineHeight.d.ts +1 -0
- package/dist/components/actions/ActionMargin.d.ts +1 -0
- package/dist/components/actions/ActionOpacity.d.ts +1 -0
- package/dist/components/actions/ActionPadding.d.ts +1 -0
- package/dist/components/actions/ActionPopover.d.ts +21 -0
- package/dist/components/actions/ActionPosition.d.ts +1 -0
- package/dist/components/actions/ActionSize.d.ts +5 -0
- package/dist/components/actions/ActionTextAlign.d.ts +1 -0
- package/dist/components/actions/ActionTextContent.d.ts +1 -0
- package/dist/components/actions/ActionTextDecoration.d.ts +1 -0
- package/dist/components/actions/ActionTextShadow.d.ts +1 -0
- package/dist/components/actions/ActionTextStyle.d.ts +1 -0
- package/dist/components/actions/ActionTextTransform.d.ts +1 -0
- package/dist/components/actions/ActionTransition.d.ts +5 -0
- package/dist/components/actions/BoxModel.d.ts +1 -0
- package/dist/components/actions/ColorActionPopover.d.ts +10 -0
- package/dist/components/actions/LinkedValuesControl.d.ts +33 -0
- package/dist/components/actions/NumberFieldActionControl.d.ts +17 -0
- package/dist/components/actions/NumericActionControl.d.ts +20 -0
- package/dist/components/actions/RadiusPreview.d.ts +9 -0
- package/dist/components/actions/SelectActionControl.d.ts +16 -0
- package/dist/components/actions/SliderActionControl.d.ts +13 -0
- package/dist/components/actions/ToggleGroupControl.d.ts +15 -0
- package/dist/components/actions/TransitionCharts.d.ts +10 -0
- package/dist/components/activity/ActivityPane.d.ts +6 -0
- package/dist/components/activity/AnnotationLayer.d.ts +6 -0
- package/dist/components/activity/AnnotationThread.d.ts +30 -0
- package/dist/components/common/CategoryChip.d.ts +8 -0
- package/dist/components/common/ClearButton.d.ts +7 -0
- package/dist/components/common/ColorPicker.d.ts +8 -0
- package/dist/components/common/InputGroup.d.ts +23 -0
- package/dist/components/common/RowLabel.d.ts +6 -0
- package/dist/components/common/ScrubField.d.ts +31 -0
- package/dist/components/common/Select.d.ts +15 -0
- package/dist/components/common/Tabs.d.ts +13 -0
- package/dist/components/common/Tooltip.d.ts +11 -0
- package/dist/components/common/UnitField.d.ts +71 -0
- package/dist/components/design-pane.d.ts +9 -0
- package/dist/components/help/ConnectAgentDialog.d.ts +5 -0
- package/dist/components/help/HelpMenu.d.ts +4 -0
- package/dist/components/help/HelpProvider.d.ts +11 -0
- package/dist/components/help/WelcomeDialog.d.ts +6 -0
- package/dist/components/theme-provider.d.ts +13 -0
- package/dist/components/tokens/ImportCssDialog.d.ts +8 -0
- package/dist/components/tokens/NewTokenForm.d.ts +9 -0
- package/dist/components/tokens/TokenComposer.d.ts +26 -0
- package/dist/components/tokens/TokenEditor.d.ts +22 -0
- package/dist/components/tokens/TokenGraph.d.ts +3 -0
- package/dist/components/tokens/TokenIcon.d.ts +7 -0
- package/dist/components/tokens/TokenList.d.ts +27 -0
- package/dist/components/tokens/TokenPicker.d.ts +32 -0
- package/dist/components/tokens/TokenSlot.d.ts +22 -0
- package/dist/components/tokens/TokenStyles.d.ts +11 -0
- package/dist/components/tokens/TokenTable.d.ts +6 -0
- package/dist/components/tokens/TokenValueField.d.ts +24 -0
- package/dist/components/tokens/TokensPane.d.ts +10 -0
- package/dist/components/tokens/suggest.d.ts +6 -0
- package/dist/components/tokens/useDrawerSize.d.ts +23 -0
- package/dist/context/DesignerContext.d.ts +22 -0
- package/dist/hooks/useActiveBreakpoint.d.ts +12 -0
- package/dist/hooks/useAgentLink.d.ts +21 -0
- package/dist/hooks/useAllowed.d.ts +28 -0
- package/dist/hooks/useAnnotations.d.ts +51 -0
- package/dist/hooks/useBreakpointCss.d.ts +72 -0
- package/dist/hooks/useBreakpointStyles.d.ts +15 -0
- package/dist/hooks/useChangeLog.d.ts +29 -0
- package/dist/hooks/useDesigner.d.ts +41 -0
- package/dist/hooks/useDesignerAction.d.ts +6 -0
- package/dist/hooks/useDesignerApi.d.ts +14 -0
- package/dist/hooks/useDesignerContext.d.ts +9 -0
- package/dist/hooks/useDesignerSelector.d.ts +8 -0
- package/dist/hooks/useFrameRegistry.d.ts +33 -0
- package/dist/hooks/useFrameStyles.d.ts +31 -0
- package/dist/hooks/useGoogleFonts.d.ts +20 -0
- package/dist/hooks/useHistory.d.ts +6 -0
- package/dist/hooks/useKeybindings.d.ts +1 -0
- package/dist/hooks/useLayer.d.ts +7 -0
- package/dist/hooks/useLayerDimensions.d.ts +15 -0
- package/dist/hooks/useLayerTypes.d.ts +7 -0
- package/dist/hooks/useLayers.d.ts +5 -0
- package/dist/hooks/useSelectedLayers.d.ts +6 -0
- package/dist/hooks/useTokenEditing.d.ts +24 -0
- package/dist/hooks/useTokens.d.ts +60 -0
- package/dist/hooks/useZoom.d.ts +4 -0
- package/dist/index.d.ts +147 -0
- package/dist/index.js +13791 -0
- package/dist/lib/Types.d.ts +12 -0
- package/dist/lib/canvasCentering.d.ts +29 -0
- package/dist/lib/cn.d.ts +1 -0
- package/dist/lib/cssPropertyMapping.d.ts +5 -0
- package/dist/lib/cssValueHelpers.d.ts +36 -0
- package/dist/lib/cursors.d.ts +17 -0
- package/dist/lib/fontFamily.d.ts +6 -0
- package/dist/lib/keyboardTargets.d.ts +9 -0
- package/dist/lib/layers/frame.d.ts +47 -0
- package/dist/lib/layers/image.d.ts +38 -0
- package/dist/lib/layers/input.d.ts +21 -0
- package/dist/lib/layers/text.d.ts +84 -0
- package/package.json +58 -5
- package/styles.css +4055 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Really Good Work Inc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @reallygoodwork/design-ui-react
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
React components for an editor that works on the design format: canvas, layer tree, style controls, tokens, rules and activity.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @reallygoodwork/design-ui-react react react-dom
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Import the styles once in your app:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import "@reallygoodwork/design-ui-react/styles.css";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Works with React 18 or 19. See the [design-ui repository](https://github.com/reallygoodwork/design-ui) for docs.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from "./AlignItemsBaseline";
|
|
2
|
+
export * from "./AlignItemsCenter";
|
|
3
|
+
export * from "./AlignItemsFlexEnd";
|
|
4
|
+
export * from "./AlignItemsFlexStart";
|
|
5
|
+
export * from "./AlignItemsStretch";
|
|
6
|
+
export * from "./FlexDirectionColumn";
|
|
7
|
+
export * from "./FlexDirectionColumnReverse";
|
|
8
|
+
export * from "./FlexDirectionRow";
|
|
9
|
+
export * from "./FlexDirectionRowReverse";
|
|
10
|
+
export * from "./FlexWrapNoWrap";
|
|
11
|
+
export * from "./FlexWrapWrap";
|
|
12
|
+
export * from "./JustifyContentCenter";
|
|
13
|
+
export * from "./JustifyContentFlexEnd";
|
|
14
|
+
export * from "./JustifyContentFlexStart";
|
|
15
|
+
export * from "./JustifyContentSpaceAround";
|
|
16
|
+
export * from "./JustifyContentSpaceBetween";
|
|
17
|
+
export * from "./JustifyContentSpaceEvenly";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { Breakpoint } from "../lib/Types";
|
|
3
|
+
export type BreakpointFrameProps = {
|
|
4
|
+
breakpoint: Breakpoint;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
isSelected: boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Renders a single breakpoint frame on the canvas.
|
|
10
|
+
* Contains the header and the white content area with layers.
|
|
11
|
+
*/
|
|
12
|
+
export declare const BreakpointFrame: ({ breakpoint, isActive, isSelected, }: BreakpointFrameProps) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Breakpoint } from "../lib/Types";
|
|
2
|
+
export type BreakpointHeaderProps = {
|
|
3
|
+
breakpoint: Breakpoint;
|
|
4
|
+
isActive: boolean;
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Header bar for a breakpoint frame showing name, dimensions, and controls.
|
|
9
|
+
*/
|
|
10
|
+
export declare const BreakpointHeader: ({ breakpoint, isActive, isSelected, }: BreakpointHeaderProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shows and changes which breakpoint the styles below apply to. Pointing at a
|
|
3
|
+
* control shows its value at every breakpoint: solid where it is set, muted
|
|
4
|
+
* with an arrow where it is inherited from a smaller one.
|
|
5
|
+
*/
|
|
6
|
+
export declare const BreakpointSwitcher: ({ property, }: {
|
|
7
|
+
property?: string | null;
|
|
8
|
+
}) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* One row in a panel. The label sits inside the field, with the clear button
|
|
4
|
+
* right after it, so every row keeps its full width in every state.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DesignAction: ({ children, label, orientation, property, clear, }: {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
label?: string;
|
|
9
|
+
orientation?: "horizontal" | "vertical";
|
|
10
|
+
/** The CSS property this row edits, for showing it across breakpoints. */
|
|
11
|
+
property?: string;
|
|
12
|
+
clear?: {
|
|
13
|
+
hasValue: boolean;
|
|
14
|
+
onClear: () => void;
|
|
15
|
+
};
|
|
16
|
+
}) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DesignActionPanel: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DesignToolbarContainer: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type LayerDefinition, type RenderableDocument, type TokenMode } from "@reallygoodwork/design-ui-core";
|
|
2
|
+
/**
|
|
3
|
+
* Renders a saved design outside the editor, responsive at every breakpoint,
|
|
4
|
+
* from the same HTML and CSS as the export. Each instance scopes its styles
|
|
5
|
+
* to its own root, so several designs can share a page.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DesignView: ({ document, mode, layerTypes, className, }: {
|
|
8
|
+
document: RenderableDocument;
|
|
9
|
+
/** The token mode to show, like `{ theme: "dark" }`. Defaults to each dimension's first value. */
|
|
10
|
+
mode?: TokenMode;
|
|
11
|
+
/** Layer types beyond the built-in ones. */
|
|
12
|
+
layerTypes?: LayerDefinition[];
|
|
13
|
+
className?: string;
|
|
14
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { Annotation, ChangeEntry, Role, Rule, Token, TokenDimensions } from "@reallygoodwork/design-ui-core";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { Breakpoint, CSSVars, Layer, LayerType } from "../lib/Types";
|
|
4
|
+
/**
|
|
5
|
+
* Props for the `Designer` component.
|
|
6
|
+
*/
|
|
7
|
+
export type DesignerProps = {
|
|
8
|
+
/**
|
|
9
|
+
* The content of the designer.
|
|
10
|
+
*/
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* The initial layers for uncontrolled mode.
|
|
14
|
+
*/
|
|
15
|
+
defaultLayers?: Layer[];
|
|
16
|
+
/**
|
|
17
|
+
* The current layers for controlled mode.
|
|
18
|
+
*/
|
|
19
|
+
layers?: Layer[];
|
|
20
|
+
/**
|
|
21
|
+
* The layer types for the designer.
|
|
22
|
+
*/
|
|
23
|
+
layerTypes?: LayerType[];
|
|
24
|
+
/**
|
|
25
|
+
* Callback for when the layers change in controlled mode.
|
|
26
|
+
*/
|
|
27
|
+
onLayersChange?: (layers: Layer[]) => void;
|
|
28
|
+
/**
|
|
29
|
+
* The breakpoints (responsive frames) for the designer.
|
|
30
|
+
*/
|
|
31
|
+
breakpoints?: Breakpoint[];
|
|
32
|
+
/**
|
|
33
|
+
* Shared document-level styles (like body styles).
|
|
34
|
+
*/
|
|
35
|
+
frameStyles?: CSSVars;
|
|
36
|
+
/**
|
|
37
|
+
* Editing rules: what the editor role and every agent may change. With
|
|
38
|
+
* none, everything is allowed.
|
|
39
|
+
*/
|
|
40
|
+
rules?: Rule[];
|
|
41
|
+
/** Who is editing here. Builders aren't limited by rules. Defaults to builder. */
|
|
42
|
+
role?: Role;
|
|
43
|
+
/**
|
|
44
|
+
* Design tokens layers can use as `var(--token-name)`.
|
|
45
|
+
*/
|
|
46
|
+
tokens?: readonly Token[];
|
|
47
|
+
/**
|
|
48
|
+
* Called with the whole token set after it's edited in the Tokens pane.
|
|
49
|
+
*/
|
|
50
|
+
onTokensChange?: (tokens: readonly Token[]) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Called with all dimensions after themes or modes are added, renamed or removed.
|
|
53
|
+
*/
|
|
54
|
+
onTokenDimensionsChange?: (dimensions: TokenDimensions) => void;
|
|
55
|
+
/**
|
|
56
|
+
* Comments, notes, decisions and tasks to start with.
|
|
57
|
+
*/
|
|
58
|
+
annotations?: Annotation[];
|
|
59
|
+
/**
|
|
60
|
+
* Called with all annotations after one is added, answered or resolved.
|
|
61
|
+
*/
|
|
62
|
+
onAnnotationsChange?: (annotations: Annotation[]) => void;
|
|
63
|
+
/**
|
|
64
|
+
* Called with the whole change log after each change, to save or sync it.
|
|
65
|
+
*/
|
|
66
|
+
onChangeLogChange?: (entries: ChangeEntry[]) => void;
|
|
67
|
+
/**
|
|
68
|
+
* An agent's WebSocket, e.g. the MCP server's `ws://localhost:8790`. The
|
|
69
|
+
* agent can then read the design and its tasks and make changes.
|
|
70
|
+
*/
|
|
71
|
+
agentUrl?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The modes tokens vary by besides breakpoint, such as
|
|
74
|
+
* `{ theme: ["light", "dark"] }`. The first value of each is the default.
|
|
75
|
+
*/
|
|
76
|
+
tokenDimensions?: TokenDimensions;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* The main container for the designer.
|
|
80
|
+
*/
|
|
81
|
+
export declare const Designer: ({ children, defaultLayers, layers, onLayersChange, layerTypes, breakpoints, frameStyles, rules, role, tokens, tokenDimensions, onTokensChange, onTokenDimensionsChange, annotations, onAnnotationsChange, onChangeLogChange, agentUrl, }: DesignerProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type Category } from "./common/CategoryChip";
|
|
3
|
+
/**
|
|
4
|
+
* A group of controls. With a title it becomes a card on the panel, headed by
|
|
5
|
+
* its name and, when given, a category icon. Without one it stays flat.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DesignerPane: ({ title, icon, category, children, showForLayerTypes, }: {
|
|
8
|
+
title?: string;
|
|
9
|
+
/** Shown in a chip tinted with the pane's category color. */
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
category?: Category;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
showForLayerTypes?: string[];
|
|
14
|
+
}) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare const DesignerToolbarButton: ({ children, hint, onClick, isDisabled, isActive, }: {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
hint: string;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
/** A mode that's on, like commenting. */
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DesignerToolbarSeparator: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface RowState {
|
|
2
|
+
isSelected: boolean;
|
|
3
|
+
isHovered: boolean;
|
|
4
|
+
isInSelection: boolean;
|
|
5
|
+
isFocusVisible: boolean;
|
|
6
|
+
isDropTarget?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const rowStateClass: (s: RowState) => string;
|
|
9
|
+
export declare const PaneLayerTree: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For builders: what editors and agents may change on the selected layer.
|
|
3
|
+
* Each change is an ordinary edit, so it can be undone and shows in Activity.
|
|
4
|
+
* Rules that cover more than this layer are listed, to be changed in the file.
|
|
5
|
+
*/
|
|
6
|
+
export declare const RulesPanel: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ZoomControl: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MoveableManagerInterface, Renderer } from "react-moveable";
|
|
2
|
+
interface DimensionAbleProps {
|
|
3
|
+
dimensionViewable: boolean;
|
|
4
|
+
viewerZoom?: number;
|
|
5
|
+
isLocked?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const DimensionAble: {
|
|
8
|
+
readonly name: "dimensionViewable";
|
|
9
|
+
readonly props: readonly ["dimensionViewable", "viewerZoom", "isLocked"];
|
|
10
|
+
readonly events: readonly [];
|
|
11
|
+
readonly render: (moveable: MoveableManagerInterface<DimensionAbleProps, unknown>, _React: Renderer) => import("react").JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { MoveableManagerInterface, Renderer } from "react-moveable";
|
|
3
|
+
interface StructureAbleProps {
|
|
4
|
+
supportsChildren?: boolean;
|
|
5
|
+
/** False when the rules lock the layer's parent: no adding beside it. */
|
|
6
|
+
canAddAround?: boolean;
|
|
7
|
+
onOpenAddLayerDialog?: (data: {
|
|
8
|
+
layerId: string;
|
|
9
|
+
position: "before" | "inside" | "after";
|
|
10
|
+
}) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const StructureAble: {
|
|
13
|
+
readonly name: "structureViewable";
|
|
14
|
+
readonly props: readonly ["supportsChildren", "canAddAround", "onOpenAddLayerDialog"];
|
|
15
|
+
readonly events: readonly [];
|
|
16
|
+
readonly render: (moveable: MoveableManagerInterface<StructureAbleProps, unknown>, _React: Renderer) => React.JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionAlignItems: () => import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionBackgroundColor: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionBorder: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionBorderRadius: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionColor: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionDisplay: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionElementType: () => import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionFill: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionFlexDirection: () => import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionFlexWrap: () => import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionFontFamily: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionFontSize: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionFontWeight: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionFontWidth: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionGap: () => import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionGridLayout: () => import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionJustifyContent: () => import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionLayout: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionLetterSpacing: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionLineHeight: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionMargin: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionOpacity: () => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionPadding: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type TokenBinding } from "../tokens/TokenPicker";
|
|
3
|
+
interface ActionPopoverProps {
|
|
4
|
+
label: string;
|
|
5
|
+
popoverTitle: string;
|
|
6
|
+
triggerDisplayValue: string;
|
|
7
|
+
hasValue?: boolean;
|
|
8
|
+
/** The value shown comes from a smaller breakpoint. */
|
|
9
|
+
inherited?: boolean;
|
|
10
|
+
onClear?: () => void;
|
|
11
|
+
showSwatch?: boolean;
|
|
12
|
+
swatchColor?: string;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
/** The CSS property this row edits, for showing it across breakpoints. */
|
|
16
|
+
property?: string;
|
|
17
|
+
/** Lets the value be a design token, picked from a Tokens tab. */
|
|
18
|
+
token?: TokenBinding;
|
|
19
|
+
}
|
|
20
|
+
export declare const ActionPopover: ({ label, popoverTitle, triggerDisplayValue, hasValue, inherited, onClear, showSwatch, swatchColor, children, onOpenChange, property, token, }: ActionPopoverProps) => import("react").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionPosition: () => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Width and height. Each is a number, or Fill, Hug or Auto. */
|
|
2
|
+
export declare const ActionSize: () => import("react").JSX.Element | null;
|
|
3
|
+
export declare const SIZE_LIMITS: string[];
|
|
4
|
+
/** Bounds for a layer that grows and shrinks. */
|
|
5
|
+
export declare const ActionSizeLimits: () => import("react").JSX.Element | null;
|