@code0-tech/pictor 0.0.0-mvp.10
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 +29 -0
- package/README.md +0 -0
- package/dist/_virtual/compiler-runtime.js +5 -0
- package/dist/_virtual/compiler-runtime2.js +4 -0
- package/dist/_virtual/react-compiler-runtime.development.js +4 -0
- package/dist/_virtual/react-compiler-runtime.production.js +4 -0
- package/dist/assets/components/avatar/Avatar.style.css +1 -0
- package/dist/assets/components/badge/Badge.style.css +1 -0
- package/dist/assets/components/breadcrumb/Breadcrumb.style.css +1 -0
- package/dist/assets/components/button/Button.style.css +1 -0
- package/dist/assets/components/button-group/ButtonGroup.style.css +1 -0
- package/dist/assets/components/card/Card.style.css +1 -0
- package/dist/assets/components/col/Col.style.css +1 -0
- package/dist/assets/components/command/Command.style.css +1 -0
- package/dist/assets/components/container/Container.style.css +1 -0
- package/dist/assets/components/d-flow/DFlow.style.css +1 -0
- package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -0
- package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -0
- package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -0
- package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +1 -0
- package/dist/assets/components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css +1 -0
- package/dist/assets/components/d-flow/validation/DFlowValidation.style.css +1 -0
- package/dist/assets/components/d-fullscreen/DFullScreen.style.css +1 -0
- package/dist/assets/components/d-layout/DLayout.style.css +1 -0
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -0
- package/dist/assets/components/dialog/Dialog.style.css +1 -0
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -0
- package/dist/assets/components/flex/Flex.style.css +1 -0
- package/dist/assets/components/form/Input.style.css +1 -0
- package/dist/assets/components/menu/Menu.style.css +1 -0
- package/dist/assets/components/quote/Quote.style.css +1 -0
- package/dist/assets/components/row/Row.style.css +1 -0
- package/dist/assets/components/scroll-area/ScrollArea.style.css +1 -0
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -0
- package/dist/assets/components/spacing/Spacing.style.css +1 -0
- package/dist/assets/components/tab/Tab.style.css +1 -0
- package/dist/assets/components/text/Text.style.css +1 -0
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -0
- package/dist/assets/node_modules/@xyflow/react/dist/style.css +1 -0
- package/dist/components/avatar/Avatar.d.ts +8 -0
- package/dist/components/avatar/Avatar.js +55 -0
- package/dist/components/badge/Badge.d.ts +7 -0
- package/dist/components/badge/Badge.js +22 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +7 -0
- package/dist/components/breadcrumb/Breadcrumb.js +32 -0
- package/dist/components/button/Button.d.ts +10 -0
- package/dist/components/button/Button.js +29 -0
- package/dist/components/button-group/ButtonGroup.d.ts +7 -0
- package/dist/components/button-group/ButtonGroup.js +27 -0
- package/dist/components/card/Card.d.ts +14 -0
- package/dist/components/card/Card.js +39 -0
- package/dist/components/card/CardSection.d.ts +9 -0
- package/dist/components/card/CardSection.js +22 -0
- package/dist/components/col/Col.d.ts +13 -0
- package/dist/components/col/Col.js +27 -0
- package/dist/components/command/Command.d.ts +30 -0
- package/dist/components/command/Command.js +103 -0
- package/dist/components/container/Container.d.ts +6 -0
- package/dist/components/container/Container.js +21 -0
- package/dist/components/d-flow/DFlow.d.ts +5 -0
- package/dist/components/d-flow/DFlow.edges.hook.d.ts +4 -0
- package/dist/components/d-flow/DFlow.edges.hook.js +144 -0
- package/dist/components/d-flow/DFlow.js +375 -0
- package/dist/components/d-flow/DFlow.nodes.hook.d.ts +3 -0
- package/dist/components/d-flow/DFlow.nodes.hook.js +139 -0
- package/dist/components/d-flow/DFlow.service.d.ts +10 -0
- package/dist/components/d-flow/DFlow.service.js +11 -0
- package/dist/components/d-flow/DFlow.view.d.ts +109 -0
- package/dist/components/d-flow/DFlow.view.js +213 -0
- package/dist/components/d-flow/control/DFlowControl.d.ts +2 -0
- package/dist/components/d-flow/control/DFlowControl.js +77 -0
- package/dist/components/d-flow/control/index.d.ts +1 -0
- package/dist/components/d-flow/control/index.js +4 -0
- package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +10 -0
- package/dist/components/d-flow/data-type/DFlowDataType.service.js +91 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +2 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +18 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +4 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +20 -0
- package/dist/components/d-flow/data-type/DFlowDataType.view.d.ts +32 -0
- package/dist/components/d-flow/data-type/DFlowDataType.view.js +65 -0
- package/dist/components/d-flow/data-type/index.d.ts +2 -0
- package/dist/components/d-flow/data-type/index.js +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +222 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +229 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.d.ts +7 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.d.ts +4 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.d.ts +9 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +217 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.d.ts +4 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +243 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.d.ts +8 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.js +10 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.d.ts +3 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +10 -0
- package/dist/components/d-flow/edge/DFlowEdge.d.ts +10 -0
- package/dist/components/d-flow/edge/DFlowEdge.js +48 -0
- package/dist/components/d-flow/folder/DFlowFolder.d.ts +19 -0
- package/dist/components/d-flow/folder/DFlowFolder.js +119 -0
- package/dist/components/d-flow/folder/index.d.ts +1 -0
- package/dist/components/d-flow/folder/index.js +6 -0
- package/dist/components/d-flow/function/DFlowFunction.input.hook.d.ts +4 -0
- package/dist/components/d-flow/function/DFlowFunction.input.hook.js +9 -0
- package/dist/components/d-flow/function/DFlowFunction.return.hook.d.ts +4 -0
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +11 -0
- package/dist/components/d-flow/function/DFlowFunction.service.d.ts +6 -0
- package/dist/components/d-flow/function/DFlowFunction.service.js +9 -0
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +10 -0
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +74 -0
- package/dist/components/d-flow/function/DFlowFunction.view.d.ts +66 -0
- package/dist/components/d-flow/function/DFlowFunction.view.js +117 -0
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.d.ts +15 -0
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +158 -0
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +5 -0
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +55 -0
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.d.ts +11 -0
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +26 -0
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.d.ts +9 -0
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +97 -0
- package/dist/components/d-flow/function/index.d.ts +2 -0
- package/dist/components/d-flow/function/index.js +7 -0
- package/dist/components/d-flow/index.d.ts +13 -0
- package/dist/components/d-flow/index.js +46 -0
- package/dist/components/d-flow/input/DFlowInputDataType.d.ts +8 -0
- package/dist/components/d-flow/input/DFlowInputDataType.js +422 -0
- package/dist/components/d-flow/minimap/DFlowMiniMap.d.ts +2 -0
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +22 -0
- package/dist/components/d-flow/minimap/index.d.ts +1 -0
- package/dist/components/d-flow/minimap/index.js +4 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.d.ts +33 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +150 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +5 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +18 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +21 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +25 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.d.ts +8 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +67 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.d.ts +3 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +42 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.d.ts +2 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +69 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.d.ts +6 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +21 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +7 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +22 -0
- package/dist/components/d-flow/suggestion/index.d.ts +2 -0
- package/dist/components/d-flow/suggestion/index.js +7 -0
- package/dist/components/d-flow/tab/DFlowTabDefault.d.ts +11 -0
- package/dist/components/d-flow/tab/DFlowTabDefault.js +97 -0
- package/dist/components/d-flow/tab/DFlowTabTrigger.d.ts +6 -0
- package/dist/components/d-flow/tab/DFlowTabTrigger.js +51 -0
- package/dist/components/d-flow/tab/DFlowTabs.d.ts +2 -0
- package/dist/components/d-flow/tab/DFlowTabs.js +105 -0
- package/dist/components/d-flow/type/DFlowType.service.d.ts +6 -0
- package/dist/components/d-flow/type/DFlowType.service.js +9 -0
- package/dist/components/d-flow/type/DFlowType.view.d.ts +35 -0
- package/dist/components/d-flow/type/DFlowType.view.js +69 -0
- package/dist/components/d-flow/type/index.d.ts +2 -0
- package/dist/components/d-flow/type/index.js +6 -0
- package/dist/components/d-flow/validation/DFlowValidation.d.ts +6 -0
- package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +3 -0
- package/dist/components/d-flow/validation/DFlowValidation.hook.js +10 -0
- package/dist/components/d-flow/validation/DFlowValidation.js +60 -0
- package/dist/components/d-flow/validation/index.d.ts +2 -0
- package/dist/components/d-flow/validation/index.js +6 -0
- package/dist/components/d-fullscreen/DFullScreen.d.ts +6 -0
- package/dist/components/d-fullscreen/DFullScreen.js +26 -0
- package/dist/components/d-layout/DLayout.d.ts +10 -0
- package/dist/components/d-layout/DLayout.js +52 -0
- package/dist/components/d-namespace/DNamespace.service.d.ts +6 -0
- package/dist/components/d-namespace/DNamespace.service.js +11 -0
- package/dist/components/d-namespace/DNamespace.view.d.ts +32 -0
- package/dist/components/d-namespace/DNamespace.view.js +65 -0
- package/dist/components/d-namespace/index.d.ts +12 -0
- package/dist/components/d-namespace/index.js +35 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +8 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.service.js +11 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.view.d.ts +26 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.view.js +57 -0
- package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +9 -0
- package/dist/components/d-namespace/member/DNamespaceMember.service.js +11 -0
- package/dist/components/d-namespace/member/DNamespaceMember.view.d.ts +26 -0
- package/dist/components/d-namespace/member/DNamespaceMember.view.js +57 -0
- package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProject.service.js +11 -0
- package/dist/components/d-namespace/project/DNamespaceProject.view.d.ts +35 -0
- package/dist/components/d-namespace/project/DNamespaceProject.view.js +69 -0
- package/dist/components/d-namespace/project/DNamespaceProjectCard.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProjectCard.js +57 -0
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.js +18 -0
- package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +10 -0
- package/dist/components/d-namespace/role/DNamespaceRole.service.js +11 -0
- package/dist/components/d-namespace/role/DNamespaceRole.view.d.ts +26 -0
- package/dist/components/d-namespace/role/DNamespaceRole.view.js +57 -0
- package/dist/components/d-organization/DOrganization.service.d.ts +8 -0
- package/dist/components/d-organization/DOrganization.service.js +11 -0
- package/dist/components/d-organization/DOrganization.view.d.ts +20 -0
- package/dist/components/d-organization/DOrganization.view.js +52 -0
- package/dist/components/d-organization/DOrganizationCard.d.ts +10 -0
- package/dist/components/d-organization/DOrganizationCard.js +63 -0
- package/dist/components/d-organization/DOrganizationMenu.d.ts +9 -0
- package/dist/components/d-organization/DOrganizationMenu.js +18 -0
- package/dist/components/d-organization/index.d.ts +4 -0
- package/dist/components/d-organization/index.js +19 -0
- package/dist/components/d-resizable/DResizable.d.ts +10 -0
- package/dist/components/d-resizable/DResizable.js +32 -0
- package/dist/components/d-runtime/DRuntime.service.d.ts +9 -0
- package/dist/components/d-runtime/DRuntime.service.js +11 -0
- package/dist/components/d-runtime/DRuntime.view.d.ts +38 -0
- package/dist/components/d-runtime/DRuntime.view.js +73 -0
- package/dist/components/d-runtime/index.d.ts +2 -0
- package/dist/components/d-runtime/index.js +6 -0
- package/dist/components/d-user/DUser.service.d.ts +21 -0
- package/dist/components/d-user/DUser.service.js +17 -0
- package/dist/components/d-user/DUser.view.d.ts +52 -0
- package/dist/components/d-user/DUser.view.js +100 -0
- package/dist/components/d-user/DUserMenu.d.ts +8 -0
- package/dist/components/d-user/DUserMenu.js +28 -0
- package/dist/components/d-user/index.d.ts +3 -0
- package/dist/components/d-user/index.js +17 -0
- package/dist/components/dialog/Dialog.d.ts +28 -0
- package/dist/components/dialog/Dialog.js +99 -0
- package/dist/components/file-tabs/FileTabs.d.ts +17 -0
- package/dist/components/file-tabs/FileTabs.js +71 -0
- package/dist/components/file-tabs/FileTabs.service.d.ts +13 -0
- package/dist/components/file-tabs/FileTabs.service.js +47 -0
- package/dist/components/file-tabs/FileTabs.view.d.ts +9 -0
- package/dist/components/file-tabs/FileTabs.view.js +1 -0
- package/dist/components/flex/Flex.d.ts +7 -0
- package/dist/components/flex/Flex.js +21 -0
- package/dist/components/form/CheckboxInput.d.ts +5 -0
- package/dist/components/form/CheckboxInput.js +67 -0
- package/dist/components/form/EmailInput.d.ts +8 -0
- package/dist/components/form/EmailInput.js +20 -0
- package/dist/components/form/Input.d.ts +22 -0
- package/dist/components/form/Input.js +153 -0
- package/dist/components/form/InputDescription.d.ts +5 -0
- package/dist/components/form/InputDescription.js +12 -0
- package/dist/components/form/InputLabel.d.ts +5 -0
- package/dist/components/form/InputLabel.js +12 -0
- package/dist/components/form/InputMessage.d.ts +5 -0
- package/dist/components/form/InputMessage.js +18 -0
- package/dist/components/form/InputSuggestion.d.ts +19 -0
- package/dist/components/form/InputSuggestion.js +102 -0
- package/dist/components/form/NumberInput.d.ts +6 -0
- package/dist/components/form/NumberInput.js +20 -0
- package/dist/components/form/PasswordInput.d.ts +8 -0
- package/dist/components/form/PasswordInput.js +18 -0
- package/dist/components/form/PinInput.d.ts +11 -0
- package/dist/components/form/PinInput.js +66 -0
- package/dist/components/form/RadioGroup.d.ts +5 -0
- package/dist/components/form/RadioGroup.js +48 -0
- package/dist/components/form/RadioInput.d.ts +7 -0
- package/dist/components/form/RadioInput.js +27 -0
- package/dist/components/form/SwitchInput.d.ts +6 -0
- package/dist/components/form/SwitchInput.js +19 -0
- package/dist/components/form/TextInput.d.ts +7 -0
- package/dist/components/form/TextInput.js +19 -0
- package/dist/components/form/index.d.ts +15 -0
- package/dist/components/form/index.js +37 -0
- package/dist/components/form/useForm.d.ts +25 -0
- package/dist/components/form/useForm.js +57 -0
- package/dist/components/menu/Menu.d.ts +27 -0
- package/dist/components/menu/Menu.js +104 -0
- package/dist/components/quote/Quote.d.ts +10 -0
- package/dist/components/quote/Quote.js +49 -0
- package/dist/components/row/Row.d.ts +6 -0
- package/dist/components/row/Row.js +21 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +13 -0
- package/dist/components/scroll-area/ScrollArea.js +43 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts +8 -0
- package/dist/components/segmented-control/SegmentedControl.js +24 -0
- package/dist/components/spacing/Spacing.d.ts +6 -0
- package/dist/components/spacing/Spacing.js +23 -0
- package/dist/components/tab/Tab.d.ts +11 -0
- package/dist/components/tab/Tab.js +40 -0
- package/dist/components/text/Text.d.ts +8 -0
- package/dist/components/text/Text.js +23 -0
- package/dist/components/tooltip/Tooltip.d.ts +13 -0
- package/dist/components/tooltip/Tooltip.js +48 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +226 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
- package/dist/node_modules/react/compiler-runtime.js +10 -0
- package/dist/utils/arrayService.d.ts +10 -0
- package/dist/utils/arrayService.js +1 -0
- package/dist/utils/contextStore.d.ts +62 -0
- package/dist/utils/contextStore.js +60 -0
- package/dist/utils/generics.d.ts +17 -0
- package/dist/utils/generics.js +310 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +28 -0
- package/dist/utils/inspection.d.ts +13 -0
- package/dist/utils/inspection.js +4 -0
- package/dist/utils/nonReactiveArrayService.d.ts +19 -0
- package/dist/utils/nonReactiveArrayService.js +54 -0
- package/dist/utils/objectStore.d.ts +12 -0
- package/dist/utils/objectStore.js +34 -0
- package/dist/utils/reactiveArrayService.d.ts +22 -0
- package/dist/utils/reactiveArrayService.js +91 -0
- package/dist/utils/types.d.ts +57 -0
- package/dist/utils/types.js +4 -0
- package/dist/utils/utils.d.ts +68 -0
- package/dist/utils/utils.js +216 -0
- package/package.json +119 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
export declare const parseUnit: (str: string) => (number | string)[];
|
|
3
|
+
export declare const getChild: (children: ReactNode | ReactNode[], child: React.FC<any>, required?: boolean, matchingProps?: Object) => React.ReactElement | undefined;
|
|
4
|
+
export declare const getContent: (children: ReactNode | ReactNode[], ...child: React.FC<any>[]) => ReactNode[] | null;
|
|
5
|
+
export interface Positioning {
|
|
6
|
+
height: number;
|
|
7
|
+
width: number;
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const mergeCode0Props: (cn: string, rest: object) => {
|
|
12
|
+
m?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
13
|
+
my?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
14
|
+
mx?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
15
|
+
mt?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
16
|
+
mb?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
17
|
+
ml?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
18
|
+
mr?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
19
|
+
p?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
20
|
+
py?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
21
|
+
px?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
22
|
+
pt?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
23
|
+
pb?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
24
|
+
pl?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
25
|
+
pr?: import('./types').StyleProp<number | `${number}`> | undefined;
|
|
26
|
+
bg?: import("csstype").Property.BackgroundColor | undefined;
|
|
27
|
+
c?: import("csstype").Property.Color | undefined;
|
|
28
|
+
opacity?: import("csstype").Property.Opacity | undefined;
|
|
29
|
+
ff?: import('./types').StyleProp<"mono" | "text" | "heading" | (string & {})> | undefined;
|
|
30
|
+
fz?: import('./types').StyleProp<import('./types').Code0FontSizes | number | `${number}`> | undefined;
|
|
31
|
+
fw?: import("csstype").Property.FontWeight | undefined;
|
|
32
|
+
lts?: import("csstype").Property.LetterSpacing<string | number> | undefined;
|
|
33
|
+
ta?: import("csstype").Property.TextAlign | undefined;
|
|
34
|
+
lh?: import('./types').StyleProp<number | (string & {})> | undefined;
|
|
35
|
+
fs?: import("csstype").Property.FontStyle | undefined;
|
|
36
|
+
tt?: import("csstype").Property.TextTransform | undefined;
|
|
37
|
+
td?: import("csstype").Property.TextDecoration<string | number> | undefined;
|
|
38
|
+
w?: import("csstype").Property.Width<string | number> | undefined;
|
|
39
|
+
miw?: import("csstype").Property.MinWidth<string | number> | undefined;
|
|
40
|
+
maw?: import("csstype").Property.MaxWidth<string | number> | undefined;
|
|
41
|
+
h?: import("csstype").Property.Height<string | number> | undefined;
|
|
42
|
+
mih?: import("csstype").Property.MinHeight<string | number> | undefined;
|
|
43
|
+
mah?: import("csstype").Property.MaxHeight<string | number> | undefined;
|
|
44
|
+
bgsz?: import("csstype").Property.BackgroundSize<string | number> | undefined;
|
|
45
|
+
bgp?: import("csstype").Property.BackgroundPosition<string | number> | undefined;
|
|
46
|
+
bgr?: import("csstype").Property.BackgroundRepeat | undefined;
|
|
47
|
+
bga?: import("csstype").Property.BackgroundAttachment | undefined;
|
|
48
|
+
pos?: import("csstype").Property.Position | undefined;
|
|
49
|
+
top?: import("csstype").Property.Top<string | number> | undefined;
|
|
50
|
+
left?: import("csstype").Property.Left<string | number> | undefined;
|
|
51
|
+
bottom?: import("csstype").Property.Bottom<string | number> | undefined;
|
|
52
|
+
right?: import("csstype").Property.Right<string | number> | undefined;
|
|
53
|
+
inset?: import("csstype").Property.Inset<string | number> | undefined;
|
|
54
|
+
display?: import("csstype").Property.Display | undefined;
|
|
55
|
+
flex?: import("csstype").Property.Flex<string | number> | undefined;
|
|
56
|
+
align?: import("csstype").Property.AlignItems | undefined;
|
|
57
|
+
justify?: import("csstype").Property.JustifyContent | undefined;
|
|
58
|
+
tf?: import("csstype").Property.Transform | undefined;
|
|
59
|
+
style?: React.CSSProperties | undefined;
|
|
60
|
+
className: string;
|
|
61
|
+
};
|
|
62
|
+
export declare const getWindowPositioning: () => Omit<Omit<Positioning, "x">, "y">;
|
|
63
|
+
export declare const getPositioning: (node: HTMLElement) => Positioning;
|
|
64
|
+
export declare const getPositionAroundTarget: (target: HTMLElement, element: HTMLElement, position?: "top" | "bottom" | "left" | "right") => {
|
|
65
|
+
position: string;
|
|
66
|
+
y: number;
|
|
67
|
+
x: number;
|
|
68
|
+
};
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import h from "react";
|
|
2
|
+
import u from "merge-props";
|
|
3
|
+
const l = (i) => {
|
|
4
|
+
const r = /-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/, o = parseFloat(i), n = i.match(r) || [], t = n.length > 0 ? i.substr(n[0]?.length ?? 0).trim() : "";
|
|
5
|
+
return [o, t];
|
|
6
|
+
}, C = (i, r, o, n) => {
|
|
7
|
+
let t, a = !1;
|
|
8
|
+
return h.Children.forEach(i, (m, c) => {
|
|
9
|
+
let e = !0;
|
|
10
|
+
if (h.isValidElement(m) && n)
|
|
11
|
+
for (const g in n) {
|
|
12
|
+
const p = n[g];
|
|
13
|
+
if (!m.props[g] || m.props[g] != p) {
|
|
14
|
+
e = !1;
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (h.isValidElement(m) && m.type == r && e)
|
|
19
|
+
t = m, a = !0;
|
|
20
|
+
else if (h.Children.count(i) - 1 == c && !a && !t && o) throw new Error(`${r.name} is required`);
|
|
21
|
+
}), t;
|
|
22
|
+
}, E = (i, ...r) => {
|
|
23
|
+
const o = h.Children.toArray(i).filter((n) => h.isValidElement(n) ? !r.find((t) => t == n.type) : !0);
|
|
24
|
+
return o.length == 0 ? null : o;
|
|
25
|
+
}, b = (i) => ({
|
|
26
|
+
...i.m ? {
|
|
27
|
+
margin: `${i.m}rem`
|
|
28
|
+
} : {},
|
|
29
|
+
...i.my ? {
|
|
30
|
+
marginTop: `${i.my}rem`,
|
|
31
|
+
marginBottom: `${i.my}rem`
|
|
32
|
+
} : {},
|
|
33
|
+
...i.mx ? {
|
|
34
|
+
marginLeft: `${i.mx}rem`,
|
|
35
|
+
marginRight: `${i.mx}rem`
|
|
36
|
+
} : {},
|
|
37
|
+
...i.mt ? {
|
|
38
|
+
marginTop: `${i.mt}rem`
|
|
39
|
+
} : {},
|
|
40
|
+
...i.mb ? {
|
|
41
|
+
marginBottom: `${i.mb}rem`
|
|
42
|
+
} : {},
|
|
43
|
+
...i.ml ? {
|
|
44
|
+
marginLeft: `${i.ml}rem`
|
|
45
|
+
} : {},
|
|
46
|
+
...i.mr ? {
|
|
47
|
+
marginRight: `${i.mr}rem`
|
|
48
|
+
} : {},
|
|
49
|
+
...i.p ? {
|
|
50
|
+
padding: `${i.p}rem`
|
|
51
|
+
} : {},
|
|
52
|
+
...i.py ? {
|
|
53
|
+
paddingTop: `${i.py}rem`,
|
|
54
|
+
paddingBottom: `${i.py}rem`
|
|
55
|
+
} : {},
|
|
56
|
+
...i.px ? {
|
|
57
|
+
paddingLeft: `${i.px}rem`,
|
|
58
|
+
paddingRight: `${i.px}rem`
|
|
59
|
+
} : {},
|
|
60
|
+
...i.pt ? {
|
|
61
|
+
paddingTop: `${i.pt}rem`
|
|
62
|
+
} : {},
|
|
63
|
+
...i.pb ? {
|
|
64
|
+
paddingBottom: `${i.pb}rem`
|
|
65
|
+
} : {},
|
|
66
|
+
...i.pl ? {
|
|
67
|
+
paddingLeft: `${i.pl}rem`
|
|
68
|
+
} : {},
|
|
69
|
+
...i.pr ? {
|
|
70
|
+
paddingRight: `${i.pr}rem`
|
|
71
|
+
} : {},
|
|
72
|
+
...i.bg ? {
|
|
73
|
+
backgroundColor: i.bg
|
|
74
|
+
} : {},
|
|
75
|
+
...i.c ? {
|
|
76
|
+
color: i.c
|
|
77
|
+
} : {},
|
|
78
|
+
...i.opacity ? {
|
|
79
|
+
opacity: i.opacity
|
|
80
|
+
} : {},
|
|
81
|
+
...i.ff ? {
|
|
82
|
+
fontFamily: i.ff
|
|
83
|
+
} : {},
|
|
84
|
+
...i.fz ? {
|
|
85
|
+
fontSize: `${i.fz}rem`
|
|
86
|
+
} : {},
|
|
87
|
+
...i.ta ? {
|
|
88
|
+
textAlign: i.ta
|
|
89
|
+
} : {},
|
|
90
|
+
...i.w ? {
|
|
91
|
+
width: i.w
|
|
92
|
+
} : {},
|
|
93
|
+
...i.miw ? {
|
|
94
|
+
minWidth: i.miw
|
|
95
|
+
} : {},
|
|
96
|
+
...i.maw ? {
|
|
97
|
+
maxWidth: i.maw
|
|
98
|
+
} : {},
|
|
99
|
+
...i.h ? {
|
|
100
|
+
height: i.h
|
|
101
|
+
} : {},
|
|
102
|
+
...i.mih ? {
|
|
103
|
+
minHeight: i.mih
|
|
104
|
+
} : {},
|
|
105
|
+
...i.mah ? {
|
|
106
|
+
maxHeight: i.mah
|
|
107
|
+
} : {},
|
|
108
|
+
...i.pos ? {
|
|
109
|
+
position: i.pos
|
|
110
|
+
} : {},
|
|
111
|
+
...i.top ? {
|
|
112
|
+
top: i.top
|
|
113
|
+
} : {},
|
|
114
|
+
...i.left ? {
|
|
115
|
+
left: i.left
|
|
116
|
+
} : {},
|
|
117
|
+
...i.bottom ? {
|
|
118
|
+
bottom: i.bottom
|
|
119
|
+
} : {},
|
|
120
|
+
...i.right ? {
|
|
121
|
+
right: i.right
|
|
122
|
+
} : {},
|
|
123
|
+
...i.display ? {
|
|
124
|
+
display: i.display
|
|
125
|
+
} : {},
|
|
126
|
+
...i.flex ? {
|
|
127
|
+
flex: i.flex
|
|
128
|
+
} : {},
|
|
129
|
+
...i.align ? {
|
|
130
|
+
alignItems: i.align
|
|
131
|
+
} : {},
|
|
132
|
+
...i.justify ? {
|
|
133
|
+
justifyContent: i.justify
|
|
134
|
+
} : {},
|
|
135
|
+
...i.tf ? {
|
|
136
|
+
transform: i.tf
|
|
137
|
+
} : {}
|
|
138
|
+
}), R = (i, r) => {
|
|
139
|
+
const o = b(r), n = {
|
|
140
|
+
...r
|
|
141
|
+
};
|
|
142
|
+
return ["m", "my", "mx", "mt", "mb", "ml", "mr", "p", "py", "px", "pt", "pb", "pl", "pr", "bg", "c", "opacity", "ff", "fz", "fw", "lts", "ta", "lh", "fs", "tt", "td", "w", "miw", "maw", "h", "mih", "mah", "bgsz", "bgp", "bgr", "bga", "pos", "top", "left", "bottom", "right", "inset", "display", "flex", "align", "justify", "tf"].forEach((a) => {
|
|
143
|
+
delete n[a];
|
|
144
|
+
}), u(n, {
|
|
145
|
+
className: i,
|
|
146
|
+
...Object.keys(o).length !== 0 ? {
|
|
147
|
+
style: o
|
|
148
|
+
} : {}
|
|
149
|
+
});
|
|
150
|
+
}, w = () => ({
|
|
151
|
+
height: window.innerHeight,
|
|
152
|
+
width: window.innerWidth
|
|
153
|
+
}), f = (i) => ({
|
|
154
|
+
width: i.offsetWidth,
|
|
155
|
+
height: i.offsetHeight,
|
|
156
|
+
x: i.getBoundingClientRect().left,
|
|
157
|
+
y: i.getBoundingClientRect().top
|
|
158
|
+
}), X = (i, r, o = "bottom") => {
|
|
159
|
+
const t = f(i), a = f(r), m = w(), c = [{
|
|
160
|
+
name: "bottom",
|
|
161
|
+
hierarchy: ["top", "left", "right"],
|
|
162
|
+
calculationY: t.y + t.height + 8,
|
|
163
|
+
calculationX: t.x,
|
|
164
|
+
conditionFit: t.y + t.height + 8 + a.height <= m.height
|
|
165
|
+
}, {
|
|
166
|
+
name: "top",
|
|
167
|
+
hierarchy: ["bottom", "left", "right"],
|
|
168
|
+
calculationY: t.y - 8 - a.height,
|
|
169
|
+
calculationX: t.x,
|
|
170
|
+
conditionFit: t.y - 8 - a.height >= 0
|
|
171
|
+
}, {
|
|
172
|
+
name: "left",
|
|
173
|
+
hierarchy: ["right", "bottom", "top"],
|
|
174
|
+
calculationY: t.y,
|
|
175
|
+
calculationX: t.x - 8 - a.width,
|
|
176
|
+
conditionFit: t.x - 8 - a.width >= 0
|
|
177
|
+
}, {
|
|
178
|
+
name: "right",
|
|
179
|
+
hierarchy: ["left", "bottom", "top"],
|
|
180
|
+
calculationY: t.y,
|
|
181
|
+
calculationX: t.x + 8 + t.width,
|
|
182
|
+
conditionFit: t.x + t.width + 8 + a.width <= m.width
|
|
183
|
+
}], e = c.find((g) => g.name == o);
|
|
184
|
+
if (!e) return {
|
|
185
|
+
position: "bottom",
|
|
186
|
+
y: c[0].calculationY,
|
|
187
|
+
x: c[0].calculationX
|
|
188
|
+
};
|
|
189
|
+
if (e.conditionFit) return {
|
|
190
|
+
position: o,
|
|
191
|
+
y: e.calculationY,
|
|
192
|
+
x: e.calculationX
|
|
193
|
+
};
|
|
194
|
+
for (let g = 0; g < e.hierarchy.length; g++) {
|
|
195
|
+
const p = c.find((d) => d.name == e.hierarchy[g]);
|
|
196
|
+
if (p?.conditionFit) return {
|
|
197
|
+
position: p.name,
|
|
198
|
+
y: p.calculationY,
|
|
199
|
+
x: p.calculationX
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
position: "bottom",
|
|
204
|
+
y: c[0].calculationY,
|
|
205
|
+
x: c[0].calculationX
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
export {
|
|
209
|
+
C as getChild,
|
|
210
|
+
E as getContent,
|
|
211
|
+
X as getPositionAroundTarget,
|
|
212
|
+
f as getPositioning,
|
|
213
|
+
w as getWindowPositioning,
|
|
214
|
+
R as mergeCode0Props,
|
|
215
|
+
l as parseUnit
|
|
216
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@code0-tech/pictor",
|
|
3
|
+
"version": "0.0.0-mvp.10",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "A simple template for a custom React component library",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "npm run storybook:dev",
|
|
8
|
+
"test": "jest --passWithNoTests",
|
|
9
|
+
"build": "npm run clear && vite build",
|
|
10
|
+
"clear": "concurrently \"rimraf ./dist\" \"rimraf ./storybook-static\"",
|
|
11
|
+
"rollup": "rollup -c",
|
|
12
|
+
"storybook:dev": "storybook dev -p 6006",
|
|
13
|
+
"storybook:build": "storybook build",
|
|
14
|
+
"storybook:test": "test-storybook",
|
|
15
|
+
"storybook:test:all": "test-storybook --browsers chromium firefox webkit",
|
|
16
|
+
"storybook:test:update": "npm run storybook:test:all -- -u",
|
|
17
|
+
"docs:preview": "npm run --prefix ../telescopium project:preview pictor"
|
|
18
|
+
},
|
|
19
|
+
"author": "CodeZero",
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@ariakit/react": "^0.4.17",
|
|
22
|
+
"@babel/plugin-proposal-decorators": "^7.28.0",
|
|
23
|
+
"@babel/plugin-transform-class-properties": "^7.27.1",
|
|
24
|
+
"@code0-tech/sagittarius-graphql-types": "^0.0.0-65144a9920c6a8de3bcf24acdcb8eec4158cef73",
|
|
25
|
+
"@dagrejs/dagre": "^1.1.8",
|
|
26
|
+
"@mdx-js/react": "^3.1.1",
|
|
27
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
28
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
29
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
30
|
+
"@radix-ui/react-one-time-password-field": "^0.1.8",
|
|
31
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
32
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
33
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
34
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
35
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
36
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
37
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
38
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
39
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
40
|
+
"@storybook/addon-a11y": "^10.0.6",
|
|
41
|
+
"@storybook/addon-links": "^10.0.6",
|
|
42
|
+
"@storybook/addon-onboarding": "^10.0.6",
|
|
43
|
+
"@storybook/builder-vite": "^10.0.6",
|
|
44
|
+
"@storybook/cli": "^10.0.6",
|
|
45
|
+
"@storybook/react": "^10.0.6",
|
|
46
|
+
"@storybook/react-vite": "^10.0.6",
|
|
47
|
+
"@storybook/test-runner": "^0.24.1",
|
|
48
|
+
"@storybook/testing-library": "^0.2.2",
|
|
49
|
+
"@tabler/icons-react": "3.35.0",
|
|
50
|
+
"@types/jest-image-snapshot": "^6.4.0",
|
|
51
|
+
"@types/react": "^19.2.2",
|
|
52
|
+
"@vitejs/plugin-react": "^5.1.0",
|
|
53
|
+
"@xyflow/react": "^12.9.2",
|
|
54
|
+
"axe-playwright": "^2.2.2",
|
|
55
|
+
"babel-loader": "^10.0.0",
|
|
56
|
+
"babel-plugin-react-compiler": "^19.1.0-rc.3",
|
|
57
|
+
"cmdk": "^1.1.1",
|
|
58
|
+
"concurrently": "^9.2.1",
|
|
59
|
+
"css-loader": "^7.1.2",
|
|
60
|
+
"html-webpack-plugin": "^5.6.4",
|
|
61
|
+
"identity-obj-proxy": "^3.0.0",
|
|
62
|
+
"jest-image-snapshot": "^6.5.1",
|
|
63
|
+
"js-md5": "^0.8.3",
|
|
64
|
+
"merge-props": "^6.0.0",
|
|
65
|
+
"overlap-area": "^1.1.0",
|
|
66
|
+
"playwright": "1.55.1",
|
|
67
|
+
"react": "^19.2.0",
|
|
68
|
+
"react-dom": "^19.2.0",
|
|
69
|
+
"react-resizable-panels": "^3.0.6",
|
|
70
|
+
"react-zoom-pan-pinch": "^3.7.0",
|
|
71
|
+
"rimraf": "^6.1.0",
|
|
72
|
+
"sass": "^1.93.3",
|
|
73
|
+
"sass-loader": "^16.0.6",
|
|
74
|
+
"storybook": "^10.0.6",
|
|
75
|
+
"style-loader": "^4.0.0",
|
|
76
|
+
"ts-jest": "^29.4.5",
|
|
77
|
+
"ts-node": "^10.9.2",
|
|
78
|
+
"typescript": "^5.9.3",
|
|
79
|
+
"vite": "^7.2.2",
|
|
80
|
+
"vite-plugin-dts": "^4.5.4",
|
|
81
|
+
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
82
|
+
"@code0-tech/definition-reader": "^0.0.16"
|
|
83
|
+
},
|
|
84
|
+
"main": "dist/index.js",
|
|
85
|
+
"repository": {
|
|
86
|
+
"type": "git",
|
|
87
|
+
"url": "https://github.com/code0-tech/pictor"
|
|
88
|
+
},
|
|
89
|
+
"files": [
|
|
90
|
+
"dist"
|
|
91
|
+
],
|
|
92
|
+
"types": "dist/index.d.ts",
|
|
93
|
+
"peerDependencies": {
|
|
94
|
+
"@ariakit/react": "^0.4.5",
|
|
95
|
+
"@code0-tech/sagittarius-graphql-types": "^0.0.0-65144a9920c6a8de3bcf24acdcb8eec4158cef73",
|
|
96
|
+
"@radix-ui/react-checkbox": "^1.3.2",
|
|
97
|
+
"@radix-ui/react-dialog": "^1.1.14",
|
|
98
|
+
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
99
|
+
"@radix-ui/react-one-time-password-field": "^0.1.7",
|
|
100
|
+
"@radix-ui/react-radio-group": "^1.3.7",
|
|
101
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
102
|
+
"@radix-ui/react-tabs": "^1.1.12",
|
|
103
|
+
"@radix-ui/react-toggle-group": "^1.1.10",
|
|
104
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
105
|
+
"@tabler/icons-react": "^3.5.0",
|
|
106
|
+
"@xyflow/react": "^12.8.2",
|
|
107
|
+
"cmdk": "^1.1.1",
|
|
108
|
+
"js-md5": "^0.8.3",
|
|
109
|
+
"merge-props": "^6.0.0",
|
|
110
|
+
"overlap-area": "^1.1.0",
|
|
111
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
112
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
113
|
+
"react-resizable-panels": "^3.0.3",
|
|
114
|
+
"react-zoom-pan-pinch": "^3.6.1"
|
|
115
|
+
},
|
|
116
|
+
"publishConfig": {
|
|
117
|
+
"access": "public"
|
|
118
|
+
}
|
|
119
|
+
}
|