@trycourier/react-designer 0.0.0-canary-20250424162557
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/README.md +402 -0
- package/dist/cjs/index.css +2 -0
- package/dist/cjs/index.css.map +7 -0
- package/dist/cjs/index.js +187 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/styles.css +3151 -0
- package/dist/components/BrandEditor/BrandEditor.d.ts +6 -0
- package/dist/components/BrandEditor/BrandEditor.types.d.ts +46 -0
- package/dist/components/BrandEditor/Editor/BrandFooter/BrandFooter.d.ts +13 -0
- package/dist/components/BrandEditor/Editor/BrandFooter/index.d.ts +1 -0
- package/dist/components/BrandEditor/Editor/Editor.d.ts +48 -0
- package/dist/components/BrandEditor/Editor/LogoUploader/LogoUploader.d.ts +4 -0
- package/dist/components/BrandEditor/Editor/LogoUploader/index.d.ts +1 -0
- package/dist/components/BrandEditor/Editor/SideBar/SideBar.d.ts +7 -0
- package/dist/components/BrandEditor/Editor/SideBar/index.d.ts +1 -0
- package/dist/components/BrandEditor/Editor/index.d.ts +1 -0
- package/dist/components/BrandEditor/Editor/useBlockEditor.d.ts +23 -0
- package/dist/components/BrandEditor/index.d.ts +1 -0
- package/dist/components/BrandEditor/store.d.ts +34 -0
- package/dist/components/ElementalValue/ElementalValue.d.ts +8 -0
- package/dist/components/ElementalValue/index.d.ts +1 -0
- package/dist/components/Providers/BrandProvider.d.ts +14 -0
- package/dist/components/Providers/Providers.types.d.ts +8 -0
- package/dist/components/Providers/TemplateProvider.d.ts +18 -0
- package/dist/components/Providers/api/brand.d.ts +6 -0
- package/dist/components/Providers/api/common.d.ts +5 -0
- package/dist/components/Providers/api/index.d.ts +3 -0
- package/dist/components/Providers/api/template.d.ts +6 -0
- package/dist/components/Providers/index.d.ts +3 -0
- package/dist/components/Providers/store.d.ts +116 -0
- package/dist/components/TemplateEditor/Editor/Editor.d.ts +11 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBar.d.ts +7 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarItem/SideBarItem.d.ts +12 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarItem/index.d.ts +1 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarItemDetails/SideBarItemDetails.d.ts +8 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarItemDetails/index.d.ts +1 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarSortableItemWrapper/SideBarSortableItemWrapper.d.ts +30 -0
- package/dist/components/TemplateEditor/Editor/SideBar/SideBarSortableItemWrapper/index.d.ts +1 -0
- package/dist/components/TemplateEditor/Editor/SideBar/index.d.ts +1 -0
- package/dist/components/TemplateEditor/Editor/index.d.ts +1 -0
- package/dist/components/TemplateEditor/Editor/useBlockEditor.d.ts +23 -0
- package/dist/components/TemplateEditor/TemplateEditor.d.ts +15 -0
- package/dist/components/TemplateEditor/index.d.ts +1 -0
- package/dist/components/TemplateEditor/store.d.ts +7 -0
- package/dist/components/extensions/Blockquote/Blockquote.d.ts +4 -0
- package/dist/components/extensions/Blockquote/Blockquote.types.d.ts +24 -0
- package/dist/components/extensions/Blockquote/BlockquoteComponent.d.ts +5 -0
- package/dist/components/extensions/Blockquote/BlockquoteForm.d.ts +8 -0
- package/dist/components/extensions/Blockquote/index.d.ts +3 -0
- package/dist/components/extensions/Button/Button.d.ts +14 -0
- package/dist/components/extensions/Button/Button.types.d.ts +63 -0
- package/dist/components/extensions/Button/ButtonComponent.d.ts +11 -0
- package/dist/components/extensions/Button/ButtonForm.d.ts +8 -0
- package/dist/components/extensions/Button/ButtonIcon.d.ts +6 -0
- package/dist/components/extensions/Button/index.d.ts +3 -0
- package/dist/components/extensions/Divider/Divider.d.ts +12 -0
- package/dist/components/extensions/Divider/Divider.types.d.ts +27 -0
- package/dist/components/extensions/Divider/DividerComponent.d.ts +9 -0
- package/dist/components/extensions/Divider/DividerForm.d.ts +8 -0
- package/dist/components/extensions/Divider/index.d.ts +4 -0
- package/dist/components/extensions/Document/Document.d.ts +2 -0
- package/dist/components/extensions/Document/index.d.ts +1 -0
- package/dist/components/extensions/DragPlaceholder/DragPlaceholder.d.ts +17 -0
- package/dist/components/extensions/DragPlaceholder/DragPlaceholderComponent.d.ts +3 -0
- package/dist/components/extensions/DragPlaceholder/index.d.ts +2 -0
- package/dist/components/extensions/FileHandler/FileHandler.d.ts +11 -0
- package/dist/components/extensions/FileHandler/index.d.ts +1 -0
- package/dist/components/extensions/Heading/Heading.d.ts +19 -0
- package/dist/components/extensions/Heading/index.d.ts +1 -0
- package/dist/components/extensions/Image/Image.d.ts +2 -0
- package/dist/components/extensions/Image/index.d.ts +1 -0
- package/dist/components/extensions/ImageBlock/ImageBlock.d.ts +17 -0
- package/dist/components/extensions/ImageBlock/ImageBlock.types.d.ts +47 -0
- package/dist/components/extensions/ImageBlock/components/ImageBlockForm.d.ts +7 -0
- package/dist/components/extensions/ImageBlock/components/ImageBlockMenu.d.ts +8 -0
- package/dist/components/extensions/ImageBlock/components/ImageBlockView.d.ts +13 -0
- package/dist/components/extensions/ImageBlock/components/ImageBlockWidth.d.ts +5 -0
- package/dist/components/extensions/ImageBlock/index.d.ts +4 -0
- package/dist/components/extensions/Link/Link.d.ts +2 -0
- package/dist/components/extensions/Link/LinkForm.d.ts +12 -0
- package/dist/components/extensions/Link/index.d.ts +2 -0
- package/dist/components/extensions/Paragraph/Paragraph.d.ts +13 -0
- package/dist/components/extensions/Paragraph/index.d.ts +1 -0
- package/dist/components/extensions/Selection/Selection.d.ts +16 -0
- package/dist/components/extensions/Selection/index.d.ts +1 -0
- package/dist/components/extensions/SlashMenu/MenuList.d.ts +2 -0
- package/dist/components/extensions/SlashMenu/SlashMenu.d.ts +2 -0
- package/dist/components/extensions/SlashMenu/SlashMenu.types.d.ts +19 -0
- package/dist/components/extensions/SlashMenu/commands.d.ts +2 -0
- package/dist/components/extensions/SlashMenu/index.d.ts +2 -0
- package/dist/components/extensions/TextBlock/TextBlock.types.d.ts +48 -0
- package/dist/components/extensions/TextBlock/TextBlockComponent.d.ts +10 -0
- package/dist/components/extensions/TextBlock/TextBlockForm.d.ts +8 -0
- package/dist/components/extensions/TextBlock/index.d.ts +3 -0
- package/dist/components/extensions/UniqueId/UniqueId.d.ts +14 -0
- package/dist/components/extensions/UniqueId/index.d.ts +1 -0
- package/dist/components/extensions/Variable/Variable.d.ts +4 -0
- package/dist/components/extensions/Variable/Variable.types.d.ts +40 -0
- package/dist/components/extensions/Variable/VariableSuggestions.d.ts +7 -0
- package/dist/components/extensions/Variable/VariableView.d.ts +3 -0
- package/dist/components/extensions/Variable/index.d.ts +2 -0
- package/dist/components/extensions/Variable/suggestion.d.ts +2 -0
- package/dist/components/extensions/extension-kit.d.ts +9 -0
- package/dist/components/extensions/index.d.ts +23 -0
- package/dist/components/hooks/index.d.ts +1 -0
- package/dist/components/hooks/useNodeAttributes.d.ts +13 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/ui/Blocks/Block.d.ts +7 -0
- package/dist/components/ui/Blocks/BlockquoteBlock/BlockquoteBlock.d.ts +2 -0
- package/dist/components/ui/Blocks/BlockquoteBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/ButtonBlock/ButtonBlock.d.ts +3 -0
- package/dist/components/ui/Blocks/ButtonBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/DividerBlock/DividerBlock.d.ts +3 -0
- package/dist/components/ui/Blocks/DividerBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/HeadingBlock/Heading.d.ts +3 -0
- package/dist/components/ui/Blocks/HeadingBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/ImageBlock/ImageBlock.d.ts +3 -0
- package/dist/components/ui/Blocks/ImageBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/SpacerBlock/SpacerBlock.d.ts +2 -0
- package/dist/components/ui/Blocks/SpacerBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/TextBlock/TextBlock.d.ts +3 -0
- package/dist/components/ui/Blocks/TextBlock/index.d.ts +1 -0
- package/dist/components/ui/Blocks/index.d.ts +8 -0
- package/dist/components/ui/ContentIcon/ContentIcon.d.ts +7 -0
- package/dist/components/ui/ContentIcon/index.d.ts +1 -0
- package/dist/components/ui/ContentItemMenu/ContentItemMenu.d.ts +5 -0
- package/dist/components/ui/ContentItemMenu/hooks/useContentItemActions.d.ts +10 -0
- package/dist/components/ui/ContentItemMenu/hooks/useData.d.ts +13 -0
- package/dist/components/ui/ContentItemMenu/index.d.ts +1 -0
- package/dist/components/ui/Dropdown/Dropdown.d.ts +11 -0
- package/dist/components/ui/Dropdown/index.d.ts +1 -0
- package/dist/components/ui/EditorLayout/EditorLayout.d.ts +6 -0
- package/dist/components/ui/EditorLayout/index.d.ts +1 -0
- package/dist/components/ui/FormHeader/FormHeader.d.ts +5 -0
- package/dist/components/ui/FormHeader/index.d.ts +1 -0
- package/dist/components/ui/Handle/Handle.d.ts +1 -0
- package/dist/components/ui/Handle/index.d.ts +1 -0
- package/dist/components/ui/Header/Header.d.ts +5 -0
- package/dist/components/ui/Header/index.d.ts +1 -0
- package/dist/components/ui/Loader/Loader.d.ts +3 -0
- package/dist/components/ui/Loader/index.d.ts +1 -0
- package/dist/components/ui/Panel/index.d.ts +25 -0
- package/dist/components/ui/PreviewPanel/PreviewPanel.d.ts +6 -0
- package/dist/components/ui/PreviewPanel/index.d.ts +1 -0
- package/dist/components/ui/SortableItemWrapper/SortableItemWrapper.d.ts +26 -0
- package/dist/components/ui/SortableItemWrapper/index.d.ts +1 -0
- package/dist/components/ui/Spinner/Spinner.d.ts +2 -0
- package/dist/components/ui/Spinner/index.d.ts +1 -0
- package/dist/components/ui/Status/Status.d.ts +7 -0
- package/dist/components/ui/Status/index.d.ts +1 -0
- package/dist/components/ui/Surface.d.ts +6 -0
- package/dist/components/ui/TextInput/TextInput.d.ts +9 -0
- package/dist/components/ui/TextInput/index.d.ts +2 -0
- package/dist/components/ui/TextMenu/TextMenu.d.ts +5 -0
- package/dist/components/ui/TextMenu/components/ContentTypePicker.d.ts +22 -0
- package/dist/components/ui/TextMenu/components/index.d.ts +1 -0
- package/dist/components/ui/TextMenu/config.d.ts +20 -0
- package/dist/components/ui/TextMenu/hooks/useTextmenuCommands.d.ts +14 -0
- package/dist/components/ui/TextMenu/hooks/useTextmenuContentTypes.d.ts +3 -0
- package/dist/components/ui/TextMenu/hooks/useTextmenuStates.d.ts +18 -0
- package/dist/components/ui/TextMenu/index.d.ts +1 -0
- package/dist/components/ui/TextMenu/store.d.ts +89 -0
- package/dist/components/ui/Toggle/Toggle.d.ts +6 -0
- package/dist/components/ui/Toggle/index.d.ts +1 -0
- package/dist/components/ui/Toolbar.d.ts +27 -0
- package/dist/components/ui/Tooltip/index.d.ts +3 -0
- package/dist/components/ui/Tooltip/types.d.ts +15 -0
- package/dist/components/ui/index.d.ts +6 -0
- package/dist/components/ui-kit/Button/Button.d.ts +19 -0
- package/dist/components/ui-kit/Button/index.d.ts +1 -0
- package/dist/components/ui-kit/Divider/Divider.d.ts +2 -0
- package/dist/components/ui-kit/Divider/index.d.ts +1 -0
- package/dist/components/ui-kit/DropdownMenu/DropdownMenu.d.ts +29 -0
- package/dist/components/ui-kit/DropdownMenu/index.d.ts +1 -0
- package/dist/components/ui-kit/Form/Form.d.ts +23 -0
- package/dist/components/ui-kit/Form/index.d.ts +1 -0
- package/dist/components/ui-kit/Icon/ArrowUpIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/BinIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/BoldIcon.d.ts +2 -0
- package/dist/components/ui-kit/Icon/BorderRadiusIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/BorderWidthIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/BulletListIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/CenterAlignIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/CloseIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/ColorIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/CopyIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/DesktopIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/DistributeIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/DownIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/DuplicateIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/FacebookIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/FontSizeIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/H1Icon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/H2Icon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/H3Icon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/Icon.d.ts +9 -0
- package/dist/components/ui-kit/Icon/InstagramIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/ItalicIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/LeftAlignIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/LetterSpacingIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/LineHeightIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/LinkIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/LinkedinIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/MediumIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/MobileIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/NumberedListIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/PaddingHorizontalIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/PaddingVerticalIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/ParagraphIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/QuoteIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/RemoveFormattingIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/RightAlignIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/RightArrowIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/StrikethroughIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/UnderlineIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/UpIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/VariableIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/XIcon.d.ts +3 -0
- package/dist/components/ui-kit/Icon/index.d.ts +42 -0
- package/dist/components/ui-kit/Input/Input.d.ts +6 -0
- package/dist/components/ui-kit/Input/index.d.ts +1 -0
- package/dist/components/ui-kit/InputColor/ColorPicker.d.ts +9 -0
- package/dist/components/ui-kit/InputColor/InputColor.d.ts +12 -0
- package/dist/components/ui-kit/InputColor/index.d.ts +1 -0
- package/dist/components/ui-kit/Label/Label.d.ts +6 -0
- package/dist/components/ui-kit/Label/index.d.ts +1 -0
- package/dist/components/ui-kit/Popover/Popover.d.ts +9 -0
- package/dist/components/ui-kit/Popover/index.d.ts +1 -0
- package/dist/components/ui-kit/Slider/Slider.d.ts +4 -0
- package/dist/components/ui-kit/Slider/index.d.ts +1 -0
- package/dist/components/ui-kit/Switch/Switch.d.ts +4 -0
- package/dist/components/ui-kit/Switch/index.d.ts +1 -0
- package/dist/components/ui-kit/Tabs/Tabs.d.ts +7 -0
- package/dist/components/ui-kit/Tabs/index.d.ts +1 -0
- package/dist/components/ui-kit/Textarea/Textarea.d.ts +5 -0
- package/dist/components/ui-kit/Textarea/index.d.ts +1 -0
- package/dist/components/ui-kit/ThemeProvider/ThemeContext.d.ts +2 -0
- package/dist/components/ui-kit/ThemeProvider/ThemeProvider.d.ts +9 -0
- package/dist/components/ui-kit/ThemeProvider/ThemeProvider.types.d.ts +23 -0
- package/dist/components/ui-kit/ThemeProvider/index.d.ts +1 -0
- package/dist/components/ui-kit/Toaster/Toaster.d.ts +4 -0
- package/dist/components/ui-kit/Toaster/index.d.ts +1 -0
- package/dist/components/ui-kit/Toggle/Toggle.d.ts +12 -0
- package/dist/components/ui-kit/Toggle/index.d.ts +1 -0
- package/dist/components/ui-kit/ToggleGroup/ToggleGroup.d.ts +12 -0
- package/dist/components/ui-kit/ToggleGroup/index.d.ts +1 -0
- package/dist/components/ui-kit/index.d.ts +16 -0
- package/dist/components/utils/createOrDuplicateNode.d.ts +3 -0
- package/dist/components/utils/generateNodeIds.d.ts +8 -0
- package/dist/components/utils/getFlattenedVariables.d.ts +14 -0
- package/dist/components/utils/index.d.ts +6 -0
- package/dist/components/utils/isCustomNodeSelected.d.ts +4 -0
- package/dist/components/utils/isTextSelected.d.ts +5 -0
- package/dist/components/utils/multipleContainersKeyboardCoordinates.d.ts +2 -0
- package/dist/esm/index.css +2 -0
- package/dist/esm/index.css.map +7 -0
- package/dist/esm/index.js +187 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/styles.css +3151 -0
- package/dist/hooks/useAutoSave.d.ts +12 -0
- package/dist/index.d.ts +4 -0
- package/dist/lib/api/UploadImageAPI.d.ts +4 -0
- package/dist/lib/api/uploadImage.d.ts +6 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/utils/convertElementalToTiptap/convertElementalToTiptap.d.ts +3 -0
- package/dist/lib/utils/convertElementalToTiptap/index.d.ts +1 -0
- package/dist/lib/utils/convertMarkdownToTiptap/convertMarkdownToTiptap.d.ts +2 -0
- package/dist/lib/utils/convertMarkdownToTiptap/index.d.ts +1 -0
- package/dist/lib/utils/convertTiptapToElemental/convertTiptapToElemental.d.ts +17 -0
- package/dist/lib/utils/convertTiptapToElemental/index.d.ts +1 -0
- package/dist/lib/utils/convertTiptapToMarkdown/convertTiptapToMarkdown.d.ts +2 -0
- package/dist/lib/utils/getRenderContainer/getRenderContainer.d.ts +3 -0
- package/dist/lib/utils/getRenderContainer/index.d.ts +1 -0
- package/dist/lib/utils/image.d.ts +7 -0
- package/dist/lib/utils/index.d.ts +7 -0
- package/dist/lib/utils/useForwardedRefCallback/index.d.ts +1 -0
- package/dist/lib/utils/useForwardedRefCallback/useForwardedRefCallback.d.ts +21 -0
- package/dist/lib/utils/useForwardedRefCallback/useForwardedRefCallback.test.d.ts +1 -0
- package/dist/store.d.ts +3 -0
- package/dist/styles.css +3151 -0
- package/dist/types/elemental.schema.d.ts +25 -0
- package/dist/types/elemental.types.d.ts +195 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/tiptap.types.d.ts +15 -0
- package/package.json +150 -0
package/README.md
ADDED
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
# Introduction
|
|
2
|
+
|
|
3
|
+
The Courier Template editor is a package designed to facilitate the editing of templates in a multi-tenant environment. In platforms like Courier, where the application serves different users or clients (tenants) with unique configurations, this package makes it easy to edit and manage templates associated with specific tenants directly within your React application.
|
|
4
|
+
|
|
5
|
+
## Key Features
|
|
6
|
+
|
|
7
|
+
- **Embedded React Integration**
|
|
8
|
+
|
|
9
|
+
Easily integrate the template editor directly into your existing React application.
|
|
10
|
+
|
|
11
|
+
- **Multi-Tenant Support**
|
|
12
|
+
|
|
13
|
+
Seamlessly manage and edit templates for different tenants, each with their own branding.
|
|
14
|
+
|
|
15
|
+
- **Brand Editing**
|
|
16
|
+
|
|
17
|
+
Customize branding elements such as logos, colors, and styles per tenant to ensure consistency with each client's identity.
|
|
18
|
+
|
|
19
|
+
- **Developer Friendly**
|
|
20
|
+
|
|
21
|
+
Designed with intuitive APIs and flexible components to speed up development and integration.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# Getting Started
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
npm install @trycourier/react-editor
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
or
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
yarn add @trycourier/react-editor
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Authentication
|
|
39
|
+
|
|
40
|
+
To use the Courier Editor, you'll need to authenticate your requests using a JWT token. For development environments, you can quickly get started with a client key, while JWT authentication is recommended for production deployments.
|
|
41
|
+
|
|
42
|
+
### Generate a JWT
|
|
43
|
+
|
|
44
|
+
**Scopes**
|
|
45
|
+
|
|
46
|
+
The follow scopes are available for the editor:
|
|
47
|
+
|
|
48
|
+
- `tenants:read`: allow the user to read all tenant data
|
|
49
|
+
- `tenants:brand:read`: allow the user to read brand data for all tenants
|
|
50
|
+
- `tenants:notifications:read`: allow the user to read all notification data for all tenants
|
|
51
|
+
- `tenants:notifications:write`: allow the user to write all notification data for all tenants
|
|
52
|
+
- `tenant:${TENANT_ID}:read` : allow the user to read tenant data for a specific tenant
|
|
53
|
+
- `tenant:${TENANT_ID}:notification:read` : allow the user to write notification data for a specific tenant
|
|
54
|
+
- `tenant:${TENANT_ID}:notification:write` : allow the user to write notification data for a specific tenant
|
|
55
|
+
- `tenant:${TENANT_ID}:brand:read` : allow the user to read brand data for a specific tenant
|
|
56
|
+
- `tenant:${TENANT_ID}:brand:write`: allow the user to write brand data for a specific tenant
|
|
57
|
+
|
|
58
|
+
Here is a curl example with all the scopes needed that the SDK uses. Change the scopes to the scopes you need for your use case.
|
|
59
|
+
|
|
60
|
+
**Example**
|
|
61
|
+
|
|
62
|
+
This example will generate a JWT that has access to all tenants and tenant notifications
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
curl --request POST \
|
|
66
|
+
--url https://api.courier.com/auth/issue-token \
|
|
67
|
+
--header 'Accept: application/json' \
|
|
68
|
+
--header 'Authorization: Bearer $YOUR_AUTH_KEY' \
|
|
69
|
+
--header 'Content-Type: application/json' \
|
|
70
|
+
--data \
|
|
71
|
+
'{
|
|
72
|
+
"scope": "user_id:$YOUR_USER_ID tenants:read tenants:notifications:read tenants:notifications:write",
|
|
73
|
+
"expires_in": "$YOUR_NUMBER days"
|
|
74
|
+
}'
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Example**
|
|
79
|
+
|
|
80
|
+
This example will generate a JWT that only has access to a specific tenant and it's notifications
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
curl --request POST \
|
|
84
|
+
--url https://api.courier.com/auth/issue-token \
|
|
85
|
+
--header 'Accept: application/json' \
|
|
86
|
+
--header 'Authorization: Bearer $YOUR_AUTH_KEY' \
|
|
87
|
+
--header 'Content-Type: application/json' \
|
|
88
|
+
--data \
|
|
89
|
+
'{
|
|
90
|
+
"scope": "user_id:$YOUR_USER_ID tenant:tenant-123:read tenant:tenant-123:notifications:read tenants:tenant-123:notifications:write",
|
|
91
|
+
"expires_in": "$YOUR_NUMBER days"
|
|
92
|
+
}'
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Example**
|
|
96
|
+
|
|
97
|
+
This example will generate a JWT that gives a user access to change brand information for a specific tenant
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
curl --request POST \
|
|
101
|
+
--url https://api.courier.com/auth/issue-token \
|
|
102
|
+
--header 'Accept: application/json' \
|
|
103
|
+
--header 'Authorization: Bearer $YOUR_AUTH_KEY' \
|
|
104
|
+
--header 'Content-Type: application/json' \
|
|
105
|
+
--data \
|
|
106
|
+
'{
|
|
107
|
+
"scope": "user_id:$YOUR_USER_ID tenant:tenant-123:read tenant:tenant-123:brand:read tenant:tenant-123:brand:write",
|
|
108
|
+
"expires_in": "$YOUR_NUMBER days"
|
|
109
|
+
}'
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Editor Usage
|
|
113
|
+
|
|
114
|
+
### Basic
|
|
115
|
+
|
|
116
|
+
This basic setup provides a fully functional editor with default settings. The TemplateProvider component handles state management and provides necessary context to the Editor.
|
|
117
|
+
|
|
118
|
+
As template changes are made, they are automatically saved to Courier.
|
|
119
|
+
|
|
120
|
+
```tsx
|
|
121
|
+
import { TemplateEditor, TemplateProvider } from '@trycourier/react-editor';
|
|
122
|
+
|
|
123
|
+
function App() {
|
|
124
|
+
return (
|
|
125
|
+
<TemplateProvider templateId="template-123" tenantId="tenant-123" token="jwt">
|
|
126
|
+
<TemplateEditor />
|
|
127
|
+
</TemplateProvider>
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Publishing Hook
|
|
133
|
+
|
|
134
|
+
By default, the Courier template editor exposes a publish button that the template editor can interact with after completing changes. To override this default publishing behavior, you can hide the publishing button and interact with the publishing action directly allowing you to tightly integrate with your application's workflow.
|
|
135
|
+
|
|
136
|
+
*Note:* `useTemplateActions` *must be used inside of the `<TemplateProvider />` context*
|
|
137
|
+
|
|
138
|
+
```tsx
|
|
139
|
+
import { TemplateEditor, TemplateProvider, useTemplateActions } from '@trycourier/react-editor';
|
|
140
|
+
|
|
141
|
+
function SaveButtonComponent() {
|
|
142
|
+
const { publishTemplate } = useTemplateActions();
|
|
143
|
+
|
|
144
|
+
const handlePublishTemplate = () => {
|
|
145
|
+
//... other publish logic
|
|
146
|
+
await publishTemplate();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<TemplateProvider templateId="template-123" tenantId="tenant-123" token="jwt">
|
|
151
|
+
<TemplateEditor hidePublish />
|
|
152
|
+
<button onClick={handlePublishTemplate}>Save Template</button>;
|
|
153
|
+
</TemplateProvider>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Theming
|
|
159
|
+
|
|
160
|
+
You can customize the look and feel through the theming API, which allows you to modify colors, and other visual elements via configuration.
|
|
161
|
+
|
|
162
|
+
```tsx
|
|
163
|
+
import { Editor, TemplateProvider } from '@trycourier/editor';
|
|
164
|
+
|
|
165
|
+
function App() {
|
|
166
|
+
return (
|
|
167
|
+
<Editor
|
|
168
|
+
theme={{
|
|
169
|
+
background: '#ffffff',
|
|
170
|
+
foreground: '#292929',
|
|
171
|
+
muted: '#D9D9D9',
|
|
172
|
+
mutedForeground: '#A3A3A3',
|
|
173
|
+
popover: '#ffffff',
|
|
174
|
+
popoverForeground: '#292929',
|
|
175
|
+
border: '#DCDEE4',
|
|
176
|
+
input: '#DCDEE4',
|
|
177
|
+
card: '#FAF9F8',
|
|
178
|
+
cardForeground: '#292929',
|
|
179
|
+
primary: '#ffffff',
|
|
180
|
+
primaryForeground: '#696F8C',
|
|
181
|
+
secondary: '#F5F5F5',
|
|
182
|
+
secondaryForeground: '#171717',
|
|
183
|
+
accent: '#E5F3FF',
|
|
184
|
+
accentForeground: '#1D4ED8',
|
|
185
|
+
destructive: '#292929',
|
|
186
|
+
destructiveForeground: '#FF3363',
|
|
187
|
+
ring: '#80849D',
|
|
188
|
+
radius: '6px',
|
|
189
|
+
}}
|
|
190
|
+
/>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Disabling Auto-save
|
|
196
|
+
|
|
197
|
+
By default, the Courier Editor auto-saves content. To disable this feature, configure the provider as follows
|
|
198
|
+
|
|
199
|
+
```tsx
|
|
200
|
+
import { TemplateEditor, TemplateProvider, useTemplateActions } from '@trycourier/react-editor';
|
|
201
|
+
|
|
202
|
+
function SaveButtonComponent() {
|
|
203
|
+
const { saveTemplate, publishTemplate } = useTemplateActions();
|
|
204
|
+
|
|
205
|
+
const handleSaveTemplate = () => {
|
|
206
|
+
//... other publish logic
|
|
207
|
+
await saveTemplate(); // the template must be saved before publishing
|
|
208
|
+
await publishTemplate();
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return (
|
|
212
|
+
<TemplateProvider templateId="template-123" tenantId="tenant-123" token="jwt">
|
|
213
|
+
<TemplateEditor autoSave={false} hidePublish />
|
|
214
|
+
<button onClick={handleSaveTemplate}>Save Template</button>;
|
|
215
|
+
</TemplateProvider>
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Brand Editor
|
|
221
|
+
|
|
222
|
+
The Brand Editor component allows you to customize and manage a tenant's brand settings directly within your application. This specialized editor provides an interface for modifying brand colors, logos, and other visual elements that will be applied to your templates.
|
|
223
|
+
|
|
224
|
+
### Basic
|
|
225
|
+
|
|
226
|
+
Similar to the basic Template Editor setup, implementing the Brand Editor requires minimal configuration. The BrandProvider component handles state management and provides the necessary context to the Brand Editor component.
|
|
227
|
+
|
|
228
|
+
```tsx
|
|
229
|
+
import { BrandEditor, BrandProvider } from '@trycourier/editor';
|
|
230
|
+
|
|
231
|
+
function App() {
|
|
232
|
+
return (
|
|
233
|
+
<BrandProvider tenantId="tenant-123" token="jwt">
|
|
234
|
+
<BrandEditor />
|
|
235
|
+
</BrandProvider>
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Publishing Hook
|
|
241
|
+
|
|
242
|
+
Similar to the Template Editor, the Brand Editor also provides a publishing hook that allows you to customize the publishing behavior. You can use the `useBrandActions` hook to programmatically trigger brand updates and integrate them with your application's workflow.
|
|
243
|
+
|
|
244
|
+
*Note: `useBrandActions` must be used inside of the `<BrandProvider />` context*
|
|
245
|
+
|
|
246
|
+
```tsx
|
|
247
|
+
import { BrandEditor, BrandProvider, useBrandActions } from '@trycourier/editor';
|
|
248
|
+
|
|
249
|
+
function SaveBrandComponent() {
|
|
250
|
+
const { publishBrand } = useBrandActions();
|
|
251
|
+
|
|
252
|
+
const handlePublishBrand = () => {
|
|
253
|
+
//... other publish logic
|
|
254
|
+
await publishBrand();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
return (
|
|
258
|
+
<BrandProvider tenantId="tenant-123" token="jwt | client key">
|
|
259
|
+
<BrandEditor hidePublish />
|
|
260
|
+
<button onClick={handlePublishBrand}>Save Brand</button>
|
|
261
|
+
</BrandProvider>
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
# Properties
|
|
267
|
+
|
|
268
|
+
The Properties section details the configuration options available for both the Editor and TemplateProvider components. These properties allow you to customize the behavior and functionality of the editor to match your specific requirements.
|
|
269
|
+
|
|
270
|
+
### Template Editor Properties
|
|
271
|
+
|
|
272
|
+
The Editor component is the core element that provides the template editing interface. If you are using the Template Editor with the Template provider, required properties will be provided.
|
|
273
|
+
|
|
274
|
+
| Property | Type | Default | Description |
|
|
275
|
+
| --- | --- | --- | --- |
|
|
276
|
+
| autoSave | boolean | true | Enables automatic saving of changes to the template. When true, changes are automatically persisted. |
|
|
277
|
+
| autoSaveDebounce | number | 200ms | Time in milliseconds to wait after changes before triggering an auto-save operation. Controls save frequency. |
|
|
278
|
+
| brandEditor | boolean | false | When enabled, shows the brand editor interface alongside the template editor. Allows editing brand settings. |
|
|
279
|
+
| brandProps | BrandEditorProps | | Configuration options for the brand editor when enabled. Passed directly to the BrandEditor component. |
|
|
280
|
+
| hidePublish | boolean | false | When true, hides the "Publish Changes" button in the editor interface. |
|
|
281
|
+
| onChange | (value: ElementalContent) => void | | Callback function that fires whenever the editor content changes, providing the updated ElementalContent structure. |
|
|
282
|
+
| theme | ThemeObj | cssClass | | Controls the visual appearance of the editor. Can be a Theme object with styling properties or a CSS class name. |
|
|
283
|
+
| value | ElementalContent | | Initial content for the editor in ElementalContent format. Used as the starting template when the editor loads. |
|
|
284
|
+
| variables | Record<string, any | | Custom variables available for template personalization. These can be referenced within the template content. |
|
|
285
|
+
|
|
286
|
+
### Template Provider Properties
|
|
287
|
+
|
|
288
|
+
The TemplateProvider component wraps the Editor component and manages the template state, authentication, and data flow. It provides essential context and functionality needed for the editor to operate. Below are the key properties that can be configured when using the
|
|
289
|
+
|
|
290
|
+
| Property | Type | Required | Description |
|
|
291
|
+
| --- | --- | --- | --- |
|
|
292
|
+
| templateId | string | Yes | Unique identifier for the template being edited. Required for loading and saving template data. |
|
|
293
|
+
| tenantId | string | Yes | The tenant ID associated with the template. Used for brand theming and tenant-specific functionality. |
|
|
294
|
+
| token | string | Yes | Authentication token (JWT or ClientKey) used to authorize API requests to Courier services. |
|
|
295
|
+
|
|
296
|
+
### Brand Editor
|
|
297
|
+
|
|
298
|
+
The Brand Editor component accepts properties that allow you to customize its behavior and appearance. These properties provide control over the editing interface and functionality specific to brand management.
|
|
299
|
+
|
|
300
|
+
| Property | Type | Default | Description |
|
|
301
|
+
| --- | --- | --- | --- |
|
|
302
|
+
| autoSave | boolean | true | Enables automatic saving of changes to the template. When true, changes are automatically persisted. |
|
|
303
|
+
| autoSaveDebounce | number | 200ms | Time in milliseconds to wait after changes before triggering an auto-save operation. Controls save frequency. |
|
|
304
|
+
| hidePublish | boolean | false | When true, hides the "Publish Changes" button in the editor interface. |
|
|
305
|
+
| onChange | (value: BrandSettings) => void | | Callback function that fires whenever brand settings are modified, providing the updated brand configuration values. |
|
|
306
|
+
| theme | ThemeObj | cssClass | | Controls the visual appearance of the editor. Can be a Theme object with styling properties or a CSS class name. |
|
|
307
|
+
| value | BrandSettings | | Initial brand settings values to populate the editor with, including colors, logo, social links, and header style preferences. |
|
|
308
|
+
| variables | Record<string, any | | Custom variables available for brand personalization. These can be referenced within the brand footer content. |
|
|
309
|
+
|
|
310
|
+
### Brand Provider
|
|
311
|
+
|
|
312
|
+
The Brand Provider component is responsible for managing brand-related state and context in your application. It wraps the Brand Editor component and handles data flow, authentication, and state management for brand customization. Here are the key properties that can be configured:
|
|
313
|
+
|
|
314
|
+
| Property | Type | Required | Description |
|
|
315
|
+
| --- | --- | --- | --- |
|
|
316
|
+
| tenantId | string | Yes | The unique identifier for the tenant whose brand settings are being edited. |
|
|
317
|
+
| token | string | Yes | Authentication token (JWT or ClientKey) used to authorize brand-related API requests. |
|
|
318
|
+
|
|
319
|
+
# Limitations
|
|
320
|
+
|
|
321
|
+
**React Only**
|
|
322
|
+
|
|
323
|
+
The Courier Editor is currently only compatible with React applications. This means you'll need to have a React-based frontend to integrate the editor into your application. Support for other frameworks like Vue.js or Angular may be considered in future releases based on community demand.
|
|
324
|
+
|
|
325
|
+
Minimal supported React version is 18.2.0.
|
|
326
|
+
|
|
327
|
+
**Email channel support only**
|
|
328
|
+
|
|
329
|
+
Currently, the editor only supports creating and editing email templates. Support for additional channels like SMS, push notifications, and direct messages is currently under development and will be added in the next month or so.
|
|
330
|
+
|
|
331
|
+
# Development
|
|
332
|
+
|
|
333
|
+
## Scripts
|
|
334
|
+
|
|
335
|
+
- `pnpm dev` - Starts the development environment
|
|
336
|
+
- `pnpm build` - Builds the package
|
|
337
|
+
- `pnpm test` - Runs tests
|
|
338
|
+
- `pnpm lint` - Runs linting
|
|
339
|
+
|
|
340
|
+
## Publishing to npm
|
|
341
|
+
|
|
342
|
+
This package can be published to npm using the provided scripts. The publishing process includes version bumping, building, testing, and pushing changes to git.
|
|
343
|
+
|
|
344
|
+
### Publishing workflow
|
|
345
|
+
|
|
346
|
+
1. Make sure your changes are committed and your working directory is clean
|
|
347
|
+
2. Run one of the release commands:
|
|
348
|
+
- `pnpm release` - Bumps patch version and publishes
|
|
349
|
+
- `pnpm release:patch` - Same as above
|
|
350
|
+
- `pnpm release:minor` - Bumps minor version and publishes
|
|
351
|
+
- `pnpm release:major` - Bumps major version and publishes
|
|
352
|
+
- `pnpm release:dry-run` - Simulates the release process without publishing
|
|
353
|
+
- `pnpm release:canary` - Creates a canary release with a unique tag
|
|
354
|
+
|
|
355
|
+
The release script will:
|
|
356
|
+
- Check if your working directory is clean
|
|
357
|
+
- Build the package
|
|
358
|
+
- Run tests
|
|
359
|
+
- Bump the version (if not dry run)
|
|
360
|
+
- Commit version changes and create a git tag (except for canary releases)
|
|
361
|
+
- Publish to npm
|
|
362
|
+
- Push changes and tags to git repository (except for canary releases)
|
|
363
|
+
|
|
364
|
+
### Canary builds
|
|
365
|
+
|
|
366
|
+
Canary builds are pre-release versions that allow users to test the latest changes without affecting the stable release. Each canary build is published with a unique npm tag based on the timestamp when it was created.
|
|
367
|
+
|
|
368
|
+
#### Creating a canary build
|
|
369
|
+
|
|
370
|
+
Run the canary release command:
|
|
371
|
+
```sh
|
|
372
|
+
pnpm release:canary
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
This will:
|
|
376
|
+
- Generate a unique tag in the format `canary-{timestamp}`
|
|
377
|
+
- Create a version like `0.0.1-canary-1718392847`
|
|
378
|
+
- Publish to npm with the unique tag
|
|
379
|
+
|
|
380
|
+
#### Installing a specific canary build
|
|
381
|
+
|
|
382
|
+
To see all available canary builds:
|
|
383
|
+
```sh
|
|
384
|
+
npm dist-tag ls @trycourier/react-editor
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
To install a specific canary build:
|
|
388
|
+
```sh
|
|
389
|
+
# Example for a specific canary build
|
|
390
|
+
npm install @trycourier/react-editor@canary-1718392847
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### Manual publishing
|
|
394
|
+
|
|
395
|
+
If you need more control over the publishing process:
|
|
396
|
+
|
|
397
|
+
1. Build the package: `pnpm build`
|
|
398
|
+
2. Run tests: `pnpm test`
|
|
399
|
+
3. Bump version: `pnpm version patch|minor|major`
|
|
400
|
+
4. Publish: `pnpm publish --access public`
|
|
401
|
+
|
|
402
|
+
Note: You need to have npm publishing rights for the `@trycourier` organization to publish this package.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.ProseMirror{h1{@apply courier-text-3xl;}h2{@apply courier-text-2xl;}h3{@apply courier-text-xl;}h4{@apply courier-text-lg;}h5{@apply courier-text-base;}h6{@apply courier-text-sm;}h1,h2,h3,h4,h5,h6{@apply courier-font-bold first:courier-mt-0 last:courier-mb-0;}h1,h2,h3{@apply courier-mt-12;}h4,h5,h6{@apply courier-mt-8;}a.link{@apply courier-text-blue-700 courier-underline;}mark{@apply courier-bg-red-500 courier-rounded-sm courier-decoration-clone courier-text-inherit courier-py-1 courier-px-0 dark:courier-bg-red-400;}& img{@apply courier-h-auto courier-w-full courier-max-w-full;}[data-type=divider]{@apply courier-py-4 courier-transition-all courier-duration-100 courier-ease-in-out courier-cursor-pointer;&.ProseMirror-selectednode{@apply courier-bg-black/5 dark:courier-bg-white/10;hr{@apply courier-border-t-black/30 dark:courier-border-t-white/30;}}hr{@apply courier-border-0 courier-border-t courier-border-black/20 courier-bg-black/80 courier-m-0 courier-h-px;@apply dark:courier-border-white/20 dark:courier-bg-white/80;}}[data-type=emoji]{display:inline-block;img{width:1em;height:1em;object-fit:cover;display:block}}}.lightTheme{--background: #ffffff;--foreground: #292929;--muted: #D9D9D9;--muted-foreground: #A3A3A3;--popover: #ffffff;--popover-foreground: #292929;--border: #DCDEE4;--input: #DCDEE4;--card: #FAF9F8;--card-foreground: #292929;--primary: #ffffff;--primary-foreground: #696F8C;--secondary: #F5F5F5;--secondary-foreground: #171717;--accent: #E5F3FF;--accent-foreground: #1D4ED8;--destructive: #292929;--destructive-foreground: #FF3363;--ring: #80849D;--radius: 6px}.ProseMirror{>*:first-child,[data-type=column]>*{@apply first:courier-mt-0 last:courier-mb-0;}>*+*{margin-top:.75em}.node-imageUpload{@apply courier-rounded courier-border-2 courier-border-dotted courier-border-black courier-border-opacity-10 courier-p-2 dark:courier-border-neutral-500;transition:border .16s cubic-bezier(.45,.05,.55,.95);&:hover{@apply courier-border-opacity-30;}&:has(.is-active),&.has-focus{@apply courier-border-opacity-40;}}[data-type=columns]{&.has-focus [data-type=column],&:hover [data-type=column]{@apply courier-border-neutral-300 dark:courier-border-neutral-700;}[data-type=column].has-focus{@apply courier-border-neutral-400 dark:courier-border-neutral-600;}}[data-type=column]{@apply courier-rounded courier-border-2 courier-border-dotted courier-border-transparent courier-p-1;transition:border .16s cubic-bezier(.45,.05,.55,.95);&:hover{@apply courier-border-neutral-100 dark:courier-border-neutral-900;}&:has(.is-active),&.has-focus{@apply courier-border-neutral-100 dark:courier-border-neutral-900;}}.node-imageBlock{& img{@apply courier-border-2 courier-border-transparent courier-rounded-xl courier-overflow-hidden;}&:hover img{@apply courier-border-2 courier-border-neutral-100 dark:courier-border-neutral-900;}&:has(.is-active) img,&.has-focus img{@apply courier-border-2 courier-border-neutral-800 dark:courier-border-neutral-200;}}.node-aiWriter,.node-aiImage,.node-tableOfContentsNode{&.has-focus [data-node-view-wrapper]>*{@apply courier-shadow-[0_0_0_2px] courier-shadow-black/30 dark:courier-shadow-white/30 courier-transition-all courier-rounded-lg;}}.ProseMirror-gapcursor+.node-imageBlock,.ProseMirror-gapcursor+.node-imageUpload,.ProseMirror-gapcursor+.node-blockquote{@apply courier-outline-neutral-700 hover:courier-outline-neutral-600 dark:courier-outline-neutral-300 dark:hover:courier-outline-neutral-400;}}@tailwind base;@tailwind components;@tailwind utilities;@keyframes pop{0%{transform:scale(1);box-shadow:var(--box-shadow)}to{transform:scale(var(--scale));box-shadow:var(--box-shadow-picked-up)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.lightTheme{height:100%}@layer base{*{@apply courier-border-border courier-outline-ring;}body{@apply courier-font-sans courier-antialiased courier-bg-background courier-text-foreground;}}.courier-editor-container{@apply courier-relative courier-flex-1 courier-flex courier-flex-col courier-p-6 courier-overflow-y-auto courier-transition-all courier-duration-300 courier-ease-in-out;background:radial-gradient(#0A0A0A32 1px,transparent 1px);background-size:15px 15px}.courier-editor-sidebar{@apply courier-rounded-br-sm courier-border-border courier-bg-white courier-border-l courier-overflow-y-auto courier-h-full courier-transition-all courier-duration-300 courier-ease-in-out;}.courier-editor-loading{@apply courier-w-full courier-h-full courier-flex courier-items-center courier-justify-center courier-pb-10;}.courier-brand-editor-readonly{@apply courier-pointer-events-none;.ProseMirror{@apply courier-cursor-default courier-p-0;.react-renderer{@apply courier-cursor-default;&.node-paragraph{p{@apply courier-text-sm;}.is-empty{p{&:after{content:""}}}}.draggable-item{@apply courier-p-0;}}}}.courier-theme-editor-main{@apply courier-bg-white courier-rounded-lg courier-border courier-border-border courier-shadow-sm courier-max-w-2xl courier-select-none courier-self-center courier-w-full;>div{@apply courier-w-full;.ProseMirror{@apply courier-p-0;.react-renderer{&.node-paragraph{p{@apply courier-text-sm;}.is-empty{p{&:after{content:"Write footer text..."}}}&:hover{.draggable-item{>button{@apply courier-hidden;}}}.draggable-item{@apply courier-p-0;}}}}}}.courier-editor-main{@apply courier-bg-white courier-rounded-lg courier-border courier-border-border courier-shadow-sm courier-max-w-2xl courier-select-none courier-self-center courier-w-full;>div{@apply courier-w-full;}}.courier-editor-preview-mode{&.courier-editor-preview-mode-mobile{.courier-editor-main{@apply courier-max-w-sm;&:hover{>button{@apply courier-hidden;}}}}.ProseMirror{>.react-renderer{&.node-imageBlock,&.node-button,&.node-divider,&.node-paragraph,&.node-heading,&.node-blockquote{*{@apply courier-cursor-default courier-pointer-events-none;}[data-cypress=draggable-handle]{@apply courier-hidden;}&:hover,&:active{[data-cypress=draggable-handle]{@apply courier-hidden;}.node-element{>div,>hr,&.courier-empty-image{&:before{@apply courier-hidden;}}}}}&.node-imageBlock{.courier-empty-image{@apply courier-hidden;}}&.node-paragraph,&.node-blockquote{.is-empty{p,blockquote{&:after{@apply courier-hidden;}}}}&.node-heading{.is-empty{h1,h2,h3{&:after{@apply courier-hidden;}}}}}}}.ProseMirror{@apply courier-caret-black dark:courier-caret-white courier-outline-0 courier-pr-10 courier-pl-4 courier-py-10 courier-z-0 lg:courier-pl-2 lg:courier-pr-10 courier-max-w-2xl courier-h-full;.selection{@apply courier-inline;}.selection,*::selection{@apply courier-bg-black/10 dark:courier-bg-white/20 courier-inline;}>.react-renderer{@apply courier-my-12 first:courier-mt-0 last:courier-mb-0;&.node-divider{@apply courier-flex courier-flex-col courier-justify-center;}&.node-variable{@apply courier-inline-block courier-m-0;}&.node-dragPlaceholder{@apply courier-m-0;}&.node-paragraph{@apply courier-m-0;&:focus,&:focus-visible{outline:none}}&.node-paragraph,&.node-blockquote{p{>div{@apply courier-block courier-relative courier-cursor-text;&[contenteditable=true]{outline:none;caret-color:currentColor}}}.is-empty{p,blockquote{position:relative;&:after{content:"Write body text...";@apply courier-absolute courier-top-0 courier-left-0 courier-text-neutral-500 dark:courier-text-neutral-400 -courier-z-10;}}}}&.node-heading{h1,h2,h3{>div{@apply courier-block courier-relative courier-cursor-text;&[contenteditable=true]{outline:none;caret-color:currentColor}}}.is-empty{h1,h2,h3{position:relative;&:after{content:"Write heading...";@apply courier-absolute courier-top-0 courier-left-0 courier-text-neutral-500 dark:courier-text-neutral-400 -courier-z-10;}}}}&.node-imageBlock,&.node-button,&.node-divider,&.node-paragraph,&.node-heading,&.node-blockquote{@apply courier-m-0 courier-relative;[data-cypress=draggable-handle]{@apply courier-invisible;}&:hover,&:active{[data-cypress=draggable-handle]{@apply courier-visible;}.node-element{>div,>hr,&.courier-empty-image{&:before{@apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md courier-border-2 courier-border-border courier-absolute courier-content-[""];}}}}.node-element{@apply courier-relative;&:focus,&:focus-visible{outline:none}}.selected-element{.node-element{@apply courier-relative courier-z-20;&:before{@apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md courier-border courier-border-[#0085FF] courier-absolute courier-content-[""] -courier-z-10;}.node-element{&:before{@apply courier-hidden;}}}.courier-actions-panel{@apply courier-block;}}}&.node-blockquote{@apply courier-m-0;@apply courier-text-foreground;@apply dark:courier-text-white;&:hover,&:active{[data-cypress=draggable-handle]{@apply courier-visible;}.node-element{&:before{@apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md !courier-border-2 !courier-border-border courier-absolute courier-content-[""] -courier-z-20;}>div{&:before{@apply courier-hidden;}}.node-element{&:before{@apply courier-hidden;}}}.selected-element{.node-element{.node-element{&:before{@apply courier-hidden -courier-z-20;}}}}}}}&.resize-cursor{@apply courier-cursor-col-resize;}.ProseMirror-gapcursor{@apply courier-relative courier-w-full courier-max-w-2xl courier-mx-auto;&:after{@apply courier-border-t-black/40 dark:courier-border-t-white/40 courier-w-full courier-top-[-1.5em] courier-max-w-2xl courier-mx-auto courier-left-0 courier-right-0;}}}[data-theme=slash-command]{@apply courier-w-full;}.tiptap{outline:none;:first-child{margin-top:0}ul,ol{padding:0 1rem;margin:1.25rem 1rem 1.25rem .4rem;li p{margin-top:.25em;margin-bottom:.25em}}h1,h2,h3,h4,h5,h6{line-height:1.1;margin-top:2.5rem;text-wrap:pretty}h1,h2{margin-top:3.5rem;margin-bottom:1.5rem}h1{font-size:1.4rem}h2{font-size:1.2rem}h3{font-size:1.1rem}h4,h5,h6{font-size:1rem}code{background-color:var(--purple-light);border-radius:.4rem;color:var(--black);font-size:.85rem;padding:.25em .3em}pre{background:var(--black);border-radius:.5rem;color:var(--white);font-family:JetBrainsMono,monospace;margin:1.5rem 0;padding:.75rem 1rem;code{background:none;color:inherit;font-size:.8rem;padding:0}}}@layer utilities{.animate-pop{animation:pop .2s cubic-bezier(.18,.67,.6,1.22)}.animate-fadeIn{animation:fadeIn .5s ease}.touch-transparent{-webkit-tap-highlight-color:transparent}.courier-editor-preview-mode{>div:first-child{flex-grow:1;width:100%}>div:last-child{width:0}}}
|
|
2
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["css-file:/home/runner/work/courier-designer/courier-designer/packages/react-designer/src/components/typography.css", "css-file:/home/runner/work/courier-designer/courier-designer/packages/react-designer/src/components/generated/theme.css", "css-file:/home/runner/work/courier-designer/courier-designer/packages/react-designer/src/components/editor.css", "css-file:/home/runner/work/courier-designer/courier-designer/packages/react-designer/src/styles.css"],
|
|
4
|
+
"sourcesContent": [".ProseMirror {\n /* p {\n @apply leading-relaxed courier-my-3 first:courier-mt-0 last:courier-mb-0;\n }\n\n & > p {\n @apply courier-my-6 first:courier-mt-0 last:courier-mb-0;\n } */\n\n h1 {\n @apply courier-text-3xl;\n }\n\n h2 {\n @apply courier-text-2xl;\n }\n\n h3 {\n @apply courier-text-xl;\n }\n\n h4 {\n @apply courier-text-lg;\n }\n\n h5 {\n @apply courier-text-base;\n }\n\n h6 {\n @apply courier-text-sm;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n @apply courier-font-bold first:courier-mt-0 last:courier-mb-0;\n }\n\n h1,\n h2,\n h3 {\n @apply courier-mt-12;\n }\n\n h4,\n h5,\n h6 {\n @apply courier-mt-8;\n }\n\n a.link {\n @apply courier-text-blue-700 courier-underline;\n }\n\n mark {\n @apply courier-bg-red-500 courier-rounded-sm courier-decoration-clone courier-text-inherit courier-py-1 courier-px-0 dark:courier-bg-red-400;\n }\n\n & img {\n @apply courier-h-auto courier-w-full courier-max-w-full;\n }\n\n [data-type=\"divider\"] {\n @apply courier-py-4 courier-transition-all courier-duration-100 courier-ease-in-out courier-cursor-pointer;\n\n &.ProseMirror-selectednode {\n @apply courier-bg-black/5 dark:courier-bg-white/10;\n\n hr {\n @apply courier-border-t-black/30 dark:courier-border-t-white/30;\n }\n }\n\n /* &:hover:not(&.ProseMirror-selectednode) {\n @apply courier-bg-black/5;\n @apply dark:courier-bg-white/10;\n } */\n\n hr {\n @apply courier-border-0 courier-border-t courier-border-black/20 courier-bg-black/80 courier-m-0 courier-h-px;\n @apply dark:courier-border-white/20 dark:courier-bg-white/80;\n }\n }\n\n [data-type=\"emoji\"] {\n display: inline-block;\n\n img {\n width: 1em;\n height: 1em;\n object-fit: cover;\n display: block;\n }\n }\n}", ".lightTheme {\n --background: #ffffff;\n --foreground: #292929;\n --muted: #D9D9D9;\n --muted-foreground: #A3A3A3;\n --popover: #ffffff;\n --popover-foreground: #292929;\n --border: #DCDEE4;\n --input: #DCDEE4;\n --card: #FAF9F8;\n --card-foreground: #292929;\n --primary: #ffffff;\n --primary-foreground: #696F8C;\n --secondary: #F5F5F5;\n --secondary-foreground: #171717;\n --accent: #E5F3FF;\n --accent-foreground: #1D4ED8;\n --destructive: #292929;\n --destructive-foreground: #FF3363;\n --ring: #80849D;\n --radius: 6px;\n}\n", "@import \"./typography.css\";\n@import \"./generated/theme.css\";\n\n.ProseMirror {\n /* .is-empty::before {\n @apply courier-text-neutral-500 dark:courier-text-neutral-400;\n content: attr(data-placeholder);\n float: left;\n height: 0;\n pointer-events: none;\n width: 100%;\n } */\n\n &>*:first-child,\n [data-type=\"column\"]>* {\n @apply first:courier-mt-0 last:courier-mb-0;\n }\n\n &>*+* {\n margin-top: 0.75em;\n }\n\n .node-imageUpload {\n @apply courier-rounded courier-border-2 courier-border-dotted courier-border-black courier-border-opacity-10 courier-p-2 dark:courier-border-neutral-500;\n transition: border 160ms cubic-bezier(0.45, 0.05, 0.55, 0.95);\n\n &:hover {\n @apply courier-border-opacity-30;\n }\n\n &:has(.is-active),\n &.has-focus {\n @apply courier-border-opacity-40;\n }\n }\n\n [data-type=\"columns\"] {\n\n &.has-focus [data-type=\"column\"],\n &:hover [data-type=\"column\"] {\n @apply courier-border-neutral-300 dark:courier-border-neutral-700;\n }\n\n [data-type=\"column\"].has-focus {\n @apply courier-border-neutral-400 dark:courier-border-neutral-600;\n }\n }\n\n [data-type=\"column\"] {\n @apply courier-rounded courier-border-2 courier-border-dotted courier-border-transparent courier-p-1;\n transition: border 160ms cubic-bezier(0.45, 0.05, 0.55, 0.95);\n\n &:hover {\n @apply courier-border-neutral-100 dark:courier-border-neutral-900;\n }\n\n &:has(.is-active),\n &.has-focus {\n @apply courier-border-neutral-100 dark:courier-border-neutral-900;\n }\n }\n\n .node-imageBlock {\n & img {\n @apply courier-border-2 courier-border-transparent courier-rounded-xl courier-overflow-hidden;\n }\n\n &:hover img {\n @apply courier-border-2 courier-border-neutral-100 dark:courier-border-neutral-900;\n }\n\n &:has(.is-active) img,\n &.has-focus img {\n @apply courier-border-2 courier-border-neutral-800 dark:courier-border-neutral-200;\n }\n }\n\n .node-aiWriter,\n .node-aiImage,\n .node-tableOfContentsNode {\n &.has-focus [data-node-view-wrapper]>* {\n @apply courier-shadow-[0_0_0_2px] courier-shadow-black/30 dark:courier-shadow-white/30 courier-transition-all courier-rounded-lg;\n }\n }\n\n .ProseMirror-gapcursor+.node-imageBlock,\n .ProseMirror-gapcursor+.node-imageUpload,\n .ProseMirror-gapcursor+.node-blockquote {\n @apply courier-outline-neutral-700 hover:courier-outline-neutral-600 dark:courier-outline-neutral-300 dark:hover:courier-outline-neutral-400;\n }\n}", "@import \"./components/editor.css\";\n\n@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@keyframes pop {\n 0% {\n transform: scale(1);\n box-shadow: var(--box-shadow);\n }\n\n 100% {\n transform: scale(var(--scale));\n box-shadow: var(--box-shadow-picked-up);\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.lightTheme {\n height: 100%;\n}\n\n@layer base {\n * {\n @apply courier-border-border courier-outline-ring;\n /* @apply courier-border-border courier-outline-ring/50; */\n }\n\n body {\n @apply courier-font-sans courier-antialiased courier-bg-background courier-text-foreground;\n }\n}\n\n.courier-editor-container {\n @apply courier-relative courier-flex-1 courier-flex courier-flex-col courier-p-6 courier-overflow-y-auto courier-transition-all courier-duration-300 courier-ease-in-out;\n background: radial-gradient(#0A0A0A32 1px, transparent 1px);\n background-size: 15px 15px;\n}\n\n.courier-editor-sidebar {\n @apply courier-rounded-br-sm courier-border-border courier-bg-white courier-border-l courier-overflow-y-auto courier-h-full courier-transition-all courier-duration-300 courier-ease-in-out;\n}\n\n.courier-editor-loading {\n @apply courier-w-full courier-h-full courier-flex courier-items-center courier-justify-center courier-pb-10;\n}\n\n.courier-brand-editor-readonly {\n @apply courier-pointer-events-none;\n\n .ProseMirror {\n @apply courier-cursor-default courier-p-0;\n\n .react-renderer {\n @apply courier-cursor-default;\n\n &.node-paragraph {\n p {\n @apply courier-text-sm;\n }\n\n .is-empty {\n p {\n &::after {\n content: '';\n }\n }\n }\n }\n\n .draggable-item {\n @apply courier-p-0;\n }\n }\n }\n}\n\n.courier-theme-editor-main {\n @apply courier-bg-white courier-rounded-lg courier-border courier-border-border courier-shadow-sm courier-max-w-2xl courier-select-none courier-self-center courier-w-full;\n\n >div {\n @apply courier-w-full;\n\n .ProseMirror {\n @apply courier-p-0;\n\n .react-renderer {\n &.node-paragraph {\n p {\n @apply courier-text-sm;\n }\n\n .is-empty {\n p {\n &::after {\n content: 'Write footer text...';\n }\n }\n }\n\n &:hover {\n .draggable-item {\n >button {\n @apply courier-hidden;\n }\n }\n }\n\n .draggable-item {\n @apply courier-p-0;\n }\n }\n }\n }\n }\n}\n\n.courier-editor-main {\n @apply courier-bg-white courier-rounded-lg courier-border courier-border-border courier-shadow-sm courier-max-w-2xl courier-select-none courier-self-center courier-w-full;\n\n >div {\n @apply courier-w-full;\n }\n}\n\n.courier-editor-preview-mode {\n &.courier-editor-preview-mode-mobile {\n .courier-editor-main {\n @apply courier-max-w-sm;\n\n &:hover {\n >button {\n @apply courier-hidden;\n }\n }\n }\n }\n\n .ProseMirror {\n\n &>.react-renderer {\n\n &.node-imageBlock,\n &.node-button,\n &.node-divider,\n &.node-paragraph,\n &.node-heading,\n &.node-blockquote {\n\n * {\n @apply courier-cursor-default courier-pointer-events-none;\n }\n\n [data-cypress=\"draggable-handle\"] {\n @apply courier-hidden;\n }\n\n &:hover,\n &:active {\n [data-cypress=\"draggable-handle\"] {\n @apply courier-hidden;\n }\n\n .node-element {\n\n &>div,\n &>hr,\n &.courier-empty-image {\n &::before {\n @apply courier-hidden;\n }\n }\n }\n }\n }\n\n &.node-imageBlock {\n .courier-empty-image {\n @apply courier-hidden;\n }\n }\n\n &.node-paragraph,\n &.node-blockquote {\n .is-empty {\n\n p,\n blockquote {\n &::after {\n @apply courier-hidden;\n }\n }\n }\n }\n\n &.node-heading {\n .is-empty {\n\n h1,\n h2,\n h3 {\n &::after {\n @apply courier-hidden;\n }\n }\n }\n }\n }\n }\n}\n\n.ProseMirror {\n @apply courier-caret-black dark:courier-caret-white courier-outline-0 courier-pr-10 courier-pl-4 courier-py-10 courier-z-0 lg:courier-pl-2 lg:courier-pr-10 courier-max-w-2xl courier-h-full;\n\n .selection {\n @apply courier-inline;\n }\n\n .selection,\n *::selection {\n @apply courier-bg-black/10 dark:courier-bg-white/20 courier-inline;\n }\n\n &>.react-renderer {\n @apply courier-my-12 first:courier-mt-0 last:courier-mb-0;\n\n &.node-divider {\n @apply courier-flex courier-flex-col courier-justify-center;\n }\n\n &.node-variable {\n @apply courier-inline-block courier-m-0;\n }\n\n &.node-dragPlaceholder {\n @apply courier-m-0;\n }\n\n &.node-paragraph {\n @apply courier-m-0;\n\n &:focus,\n &:focus-visible {\n outline: none;\n }\n }\n\n &.node-paragraph,\n &.node-blockquote {\n\n p {\n >div {\n @apply courier-block courier-relative courier-cursor-text;\n\n &[contenteditable=\"true\"] {\n outline: none;\n caret-color: currentColor;\n }\n }\n }\n\n .is-empty {\n\n p,\n blockquote {\n position: relative;\n\n &::after {\n content: 'Write body text...';\n @apply courier-absolute courier-top-0 courier-left-0 courier-text-neutral-500 dark:courier-text-neutral-400 -courier-z-10;\n }\n }\n }\n }\n\n &.node-heading {\n\n h1,\n h2,\n h3 {\n >div {\n @apply courier-block courier-relative courier-cursor-text;\n\n &[contenteditable=\"true\"] {\n outline: none;\n caret-color: currentColor;\n }\n }\n }\n\n .is-empty {\n\n h1,\n h2,\n h3 {\n position: relative;\n\n &::after {\n content: 'Write heading...';\n @apply courier-absolute courier-top-0 courier-left-0 courier-text-neutral-500 dark:courier-text-neutral-400 -courier-z-10;\n }\n }\n }\n }\n\n\n &.node-imageBlock,\n &.node-button,\n &.node-divider,\n &.node-paragraph,\n &.node-heading,\n &.node-blockquote {\n @apply courier-m-0 courier-relative;\n\n [data-cypress=\"draggable-handle\"] {\n @apply courier-invisible;\n }\n\n &:hover,\n &:active {\n [data-cypress=\"draggable-handle\"] {\n @apply courier-visible;\n }\n\n .node-element {\n\n &>div,\n &>hr,\n &.courier-empty-image {\n &::before {\n @apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md courier-border-2 courier-border-border courier-absolute courier-content-[''];\n }\n }\n }\n }\n\n .node-element {\n @apply courier-relative;\n\n &:focus,\n &:focus-visible {\n outline: none;\n }\n }\n\n .selected-element {\n .node-element {\n @apply courier-relative courier-z-20;\n\n &::before {\n @apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md courier-border courier-border-[#0085FF] courier-absolute courier-content-[''] -courier-z-10;\n }\n\n .node-element {\n &::before {\n @apply courier-hidden;\n }\n }\n }\n\n .courier-actions-panel {\n @apply courier-block;\n }\n }\n }\n\n &.node-blockquote {\n @apply courier-m-0;\n @apply courier-text-foreground;\n @apply dark:courier-text-white;\n\n &:hover,\n &:active {\n [data-cypress=\"draggable-handle\"] {\n @apply courier-visible;\n }\n\n .node-element {\n &::before {\n @apply courier-left-[-12px] courier-right-[-12px] courier-top-0 courier-bottom-0 courier-rounded-md !courier-border-2 !courier-border-border courier-absolute courier-content-[''] -courier-z-20;\n }\n\n &>div {\n &::before {\n @apply courier-hidden;\n }\n }\n\n .node-element {\n &::before {\n @apply courier-hidden;\n }\n }\n }\n\n .selected-element {\n .node-element {\n .node-element {\n &::before {\n @apply courier-hidden -courier-z-20;\n }\n }\n }\n }\n }\n }\n }\n\n &.resize-cursor {\n @apply courier-cursor-col-resize;\n }\n\n .ProseMirror-gapcursor {\n @apply courier-relative courier-w-full courier-max-w-2xl courier-mx-auto;\n\n &:after {\n @apply courier-border-t-black/40 dark:courier-border-t-white/40 courier-w-full courier-top-[-1.5em] courier-max-w-2xl courier-mx-auto courier-left-0 courier-right-0;\n }\n }\n}\n\n[data-theme=\"slash-command\"] {\n @apply courier-w-full;\n}\n\n/* Basic editor styles */\n.tiptap {\n outline: none;\n\n :first-child {\n margin-top: 0;\n }\n\n /* List styles */\n ul,\n ol {\n padding: 0 1rem;\n margin: 1.25rem 1rem 1.25rem 0.4rem;\n\n li p {\n margin-top: 0.25em;\n margin-bottom: 0.25em;\n }\n }\n\n /* Heading styles */\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n line-height: 1.1;\n margin-top: 2.5rem;\n text-wrap: pretty;\n }\n\n h1,\n h2 {\n margin-top: 3.5rem;\n margin-bottom: 1.5rem;\n }\n\n h1 {\n font-size: 1.4rem;\n }\n\n h2 {\n font-size: 1.2rem;\n }\n\n h3 {\n font-size: 1.1rem;\n }\n\n h4,\n h5,\n h6 {\n font-size: 1rem;\n }\n\n /* Code and preformatted text styles */\n code {\n background-color: var(--purple-light);\n border-radius: 0.4rem;\n color: var(--black);\n font-size: 0.85rem;\n padding: 0.25em 0.3em;\n }\n\n pre {\n background: var(--black);\n border-radius: 0.5rem;\n color: var(--white);\n font-family: \"JetBrainsMono\", monospace;\n margin: 1.5rem 0;\n padding: 0.75rem 1rem;\n\n code {\n background: none;\n color: inherit;\n font-size: 0.8rem;\n padding: 0;\n }\n }\n\n /* hr {\n border: none;\n border-top: 1px solid var(--gray-2);\n margin: 2rem 0;\n } */\n}\n\n@layer utilities {\n .animate-pop {\n animation: pop 200ms cubic-bezier(0.18, 0.67, 0.6, 1.22);\n }\n\n .animate-fadeIn {\n animation: fadeIn 500ms ease;\n }\n\n .touch-transparent {\n -webkit-tap-highlight-color: transparent;\n }\n\n .courier-editor-preview-mode {\n &>div:first-child {\n flex-grow: 1;\n width: 100%;\n }\n\n &>div:last-child {\n width: 0;\n }\n }\n}"],
|
|
5
|
+
"mappings": "AAAA,CAAC,YASC,GACE,OAAO,iBACT,CAEA,GACE,OAAO,iBACT,CAEA,GACE,OAAO,gBACT,CAEA,GACE,OAAO,gBACT,CAEA,GACE,OAAO,kBACT,CAEA,GACE,OAAO,gBACT,CAEA,GACA,GACA,GACA,GACA,GACA,GACE,OAAO,kBAAkB,KAAK,CAAC,aAAa,IAAI,CAAC,aACnD,CAEA,GACA,GACA,GACE,OAAO,cACT,CAEA,GACA,GACA,GACE,OAAO,aACT,CAEA,CAAC,CAAC,KACA,OAAO,sBAAsB,kBAC/B,CAEA,KACE,OAAO,mBAAmB,mBAAmB,yBAAyB,qBAAqB,aAAa,aAAa,IAAI,CAAC,mBAC5H,CAEA,EAAE,IACA,OAAO,eAAe,eAAe,mBACvC,CAEA,CAAC,mBACC,OAAO,aAAa,uBAAuB,qBAAqB,oBAAoB,uBAEpF,CAAC,CAAC,yBACA,OAAO,gBAAgB,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,GAEhD,GACE,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