@trycourier/react-designer 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +5 -3
  2. package/dist/cjs/index.js +58 -57
  3. package/dist/cjs/index.js.map +4 -4
  4. package/dist/cjs/styles.css +496 -235
  5. package/dist/components/BrandEditor/Editor/BrandFooter/BrandFooter.d.ts +3 -1
  6. package/dist/components/TemplateEditor/Channels/Inbox/Inbox.d.ts +3 -0
  7. package/dist/components/TemplateEditor/Layout/Layout.d.ts +1 -0
  8. package/dist/components/TemplateEditor/TemplateEditor.d.ts +2 -0
  9. package/dist/components/TemplateEditor/VariableViewModeSync.d.ts +3 -0
  10. package/dist/components/TemplateEditor/index.d.ts +1 -0
  11. package/dist/components/TemplateEditor/store.d.ts +3 -0
  12. package/dist/components/extensions/Blockquote/Blockquote.d.ts +4 -0
  13. package/dist/components/extensions/Button/Button.types.d.ts +8 -4
  14. package/dist/components/extensions/ImageBlock/components/ImageBlockView.d.ts +1 -3
  15. package/dist/components/extensions/MessagingChannelPaste/MessagingChannelPaste.d.ts +11 -0
  16. package/dist/components/extensions/MessagingChannelPaste/index.d.ts +2 -0
  17. package/dist/components/extensions/Variable/Variable.d.ts +5 -0
  18. package/dist/components/ui/TextMenu/components/ContentTypePicker.d.ts +1 -1
  19. package/dist/components/ui/TextMenu/hooks/useTextmenuStates.d.ts +1 -0
  20. package/dist/components/ui/VariableEditor/VariableChipBase.d.ts +8 -0
  21. package/dist/components/ui/VariableEditor/VariableInput.d.ts +18 -0
  22. package/dist/esm/index.js +58 -57
  23. package/dist/esm/index.js.map +4 -4
  24. package/dist/esm/styles.css +496 -235
  25. package/dist/index.d.ts +2 -0
  26. package/dist/lib/constants/block-defaults.d.ts +43 -0
  27. package/dist/lib/constants/email-editor-tiptap-styles.d.ts +62 -0
  28. package/dist/lib/index.d.ts +1 -0
  29. package/dist/styles.css +496 -235
  30. package/dist/types/elemental.types.d.ts +3 -2
  31. package/package.json +1 -1
package/README.md CHANGED
@@ -291,7 +291,9 @@ Type `{{variableName}}` directly in the editor. The variable will be automatical
291
291
 
292
292
  ### Variable Autocomplete
293
293
 
294
- When you provide a `variables` prop, the editor shows an autocomplete dropdown when users type `{{`. This guides users to select from available variables and helps prevent typos.
294
+ When you provide a `variables` prop, the editor enables variable functionality: typing `{{` creates variable chips, the variable toolbar button is shown, and an autocomplete dropdown guides users to select from available variables.
295
+
296
+ > **Note:** If the `variables` prop is not provided (or is `undefined`), all variable functionality is disabled — the variable toolbar button is hidden and typing `{{` will not create variable chips. To enable variables without autocomplete suggestions, pass an empty object: `variables={{}}`.
295
297
 
296
298
  ```tsx
297
299
  import "@trycourier/react-designer/styles.css";
@@ -789,7 +791,7 @@ The Editor component is the core element that provides the template editing inte
789
791
  | theme | ThemeObj \| cssClass | | Controls the visual appearance of the editor. Can be a Theme object with styling properties or a CSS class name. |
790
792
  | value | ElementalContent | | Initial content for the editor in ElementalContent format. Used as the starting template when the editor loads. |
791
793
  | variableValidation | VariableValidationConfig | | Configuration for custom variable validation. Allows restricting which variable names are allowed and defining behavior on validation failure. See [Variable Validation](#variable-validation) section for details. |
792
- | variables | Record<string, any> | | Variables available for autocomplete suggestions. When provided, typing `{{` shows a dropdown with matching variables. See [Variable Autocomplete](#variable-autocomplete) section for details. |
794
+ | variables | Record<string, any> | | Variables available for autocomplete suggestions. When provided, typing `{{` shows a dropdown with matching variables. When not provided (`undefined`), all variable functionality is disabled (toolbar button hidden, `{{` typing does not create chips). Pass `{}` to enable variables without suggestions. See [Variable Autocomplete](#variable-autocomplete) section for details. |
793
795
  | disableVariablesAutocomplete | boolean | false | When `true`, disables variable autocomplete and allows users to type any variable name directly. When `false` (default), shows autocomplete dropdown with variables from the `variables` prop. |
794
796
 
795
797
  ### Multi-Channel Routing
@@ -847,7 +849,7 @@ The Brand Editor component accepts properties that allow you to customize its be
847
849
  | theme | ThemeObj \| cssClass | | Controls the visual appearance of the editor. Can be a Theme object with styling properties or a CSS class name. |
848
850
  | value | BrandSettings | | Initial brand settings values to populate the editor with, including colors, logo, social links, and header style preferences. |
849
851
  | variableValidation | VariableValidationConfig | | Configuration for custom variable validation. See [Variable Validation](#variable-validation) section for details. |
850
- | variables | Record<string, any> | | Variables available for autocomplete suggestions. When provided, typing `{{` shows a dropdown with matching variables. |
852
+ | variables | Record<string, any> | | Variables available for autocomplete suggestions. When not provided, all variable functionality is disabled. Pass `{}` to enable without suggestions. |
851
853
  | disableVariablesAutocomplete | boolean | false | When `true`, disables variable autocomplete and allows users to type any variable name directly. |
852
854
 
853
855
  ### Brand Provider