diff --git a/docs/feature-flags.md b/docs/feature-flags.md index 056dc34c..16eacf4e 100644 --- a/docs/feature-flags.md +++ b/docs/feature-flags.md @@ -20,6 +20,7 @@ import { ChaiBuilderEditor } from "@chaibuilder/sdk"; dragAndDrop: true, validateStructure: true, designTokens: true, + animation: true, }} // ... other props />; @@ -40,6 +41,7 @@ import { ChaiBuilderEditor } from "@chaibuilder/sdk"; | `designTokens` | `false` | Enable design tokens feature | | `librarySite` | `false` | Enable library site features | | `gotoSettings` | `false` | Enable settings navigation | +| `animation` | `false` | Enable animation feature | ## Custom Feature Flags diff --git a/docs/types-reference.md b/docs/types-reference.md index e1c35e1e..fb485b3a 100644 --- a/docs/types-reference.md +++ b/docs/types-reference.md @@ -115,6 +115,7 @@ interface ChaiBuilderEditorProps { dragAndDrop?: boolean; validateStructure?: boolean; designTokens?: boolean; + animation?: boolean; }; // Advanced diff --git a/src/Editor.tsx b/src/Editor.tsx index ee3cf3b1..d6e36f9d 100644 --- a/src/Editor.tsx +++ b/src/Editor.tsx @@ -32,6 +32,7 @@ function ChaiBuilderDefault() { importTheme: false, dragAndDrop: true, designTokens: true, + animation: true, }} gotoPage={(args) => { console.log("gotoPage", args); diff --git a/src/core/components/settings/new-panel/attributes-editor.tsx b/src/core/components/settings/new-panel/attributes-editor.tsx index 080aba58..b1bc33e7 100644 --- a/src/core/components/settings/new-panel/attributes-editor.tsx +++ b/src/core/components/settings/new-panel/attributes-editor.tsx @@ -6,8 +6,8 @@ import { Button } from "@/ui/shadcn/components/ui/button"; import { Input } from "@/ui/shadcn/components/ui/input"; import { Label } from "@/ui/shadcn/components/ui/label"; import { Textarea } from "@/ui/shadcn/components/ui/textarea"; +import { Cross1Icon, Pencil2Icon } from "@radix-ui/react-icons"; import { isEmpty } from "lodash-es"; -import { Pencil2Icon, Cross1Icon } from "@radix-ui/react-icons"; import React, { useCallback, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -42,7 +42,7 @@ export default React.memo(function AttrsEditor({ const addAttribute = () => { if (newKey.startsWith("@")) { - setError(t('Attribute keys cannot start with @')); + setError(t("Attribute keys cannot start with @")); return; } if (newKey) { @@ -69,7 +69,7 @@ export default React.memo(function AttrsEditor({ const saveEdit = () => { if (newKey.startsWith("@")) { - setError(t('Attribute keys cannot start with @')); + setError(t("Attribute keys cannot start with @")); return; } if (editIndex !== null && newKey) { @@ -171,10 +171,10 @@ export default React.memo(function AttrsEditor({ editIndex !== null ? saveEdit() : addAttribute(); }} className="space-y-3"> -
-
-