@crystallize/design-system 1.5.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/index.css +85 -142
  3. package/dist/index.d.ts +7 -3
  4. package/dist/index.js +1512 -4409
  5. package/dist/index.mjs +1376 -4291
  6. package/package.json +19 -19
  7. package/src/iconography/document.tsx +19 -0
  8. package/src/iconography/folder.tsx +30 -0
  9. package/src/iconography/index.ts +8 -2
  10. package/src/iconography/product.tsx +42 -0
  11. package/src/rich-text-editor/model/crystallize-to-lexical.ts +1 -1
  12. package/src/rich-text-editor/model/lexical-to-crystallize.ts +2 -2
  13. package/src/rich-text-editor/model/to-text.test.ts +97 -0
  14. package/src/rich-text-editor/model/to-text.ts +47 -0
  15. package/src/rich-text-editor/nodes/BaseNodes.ts +0 -3
  16. package/src/rich-text-editor/plugins/ActionsPlugin/index.tsx +1 -1
  17. package/src/rich-text-editor/plugins/CodeActionMenuPlugin/index.tsx +1 -1
  18. package/src/rich-text-editor/plugins/ComponentPickerPlugin/index.tsx +5 -5
  19. package/src/rich-text-editor/plugins/DraggableBlockPlugin/index.tsx +29 -50
  20. package/src/rich-text-editor/plugins/MaxLengthPlugin/index.tsx +34 -23
  21. package/src/rich-text-editor/plugins/ToolbarPlugin/index.tsx +8 -8
  22. package/src/rich-text-editor/rich-text-editor.css +3 -3
  23. package/src/rich-text-editor/rich-text-editor.stories.tsx +9 -1
  24. package/src/rich-text-editor/rich-text-editor.tsx +30 -24
  25. package/src/rich-text-editor/tests/rich-text-editor-basic-rendering.test.tsx +1 -1
  26. package/src/rich-text-editor/tests/rich-text-editor-model-basics.test.tsx +1 -1
  27. package/src/rich-text-editor/tests/rich-text-editor-model-conversions.test.tsx +1 -1
  28. package/src/rich-text-editor/tests/rich-text-editor-text-formats.test.tsx +1 -1
  29. package/src/rich-text-editor/themes/{PlaygroundEditorTheme.css → CrystallizeRTEditorTheme.css} +81 -85
  30. package/src/rich-text-editor/themes/CrystallizeRTEditorTheme.ts +113 -0
  31. package/dist/draggable-block-menu-KKHDNKJA.svg +0 -1
  32. package/src/rich-text-editor/appSettings.ts +0 -28
  33. package/src/rich-text-editor/context/SettingsContext.tsx +0 -71
  34. package/src/rich-text-editor/context/SharedAutocompleteContext.tsx +0 -60
  35. package/src/rich-text-editor/nodes/AutocompleteNode.tsx +0 -96
  36. package/src/rich-text-editor/plugins/AutocompletePlugin/index.tsx +0 -2536
  37. package/src/rich-text-editor/themes/PlaygroundEditorTheme.ts +0 -113
  38. /package/src/rich-text-editor/{model → types}/crystallize-rich-text-types/code.ts +0 -0
  39. /package/src/rich-text-editor/{model → types}/crystallize-rich-text-types/headings.ts +0 -0
  40. /package/src/rich-text-editor/{model → types}/crystallize-rich-text-types/index.ts +0 -0
  41. /package/src/rich-text-editor/{model → types}/crystallize-rich-text-types/link.ts +0 -0
  42. /package/src/rich-text-editor/{model → types}/crystallize-rich-text-types/table.ts +0 -0
  43. /package/src/rich-text-editor/{types.ts → types/types.ts} +0 -0
@@ -1,113 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- import type { EditorThemeClasses } from 'lexical';
10
-
11
- import './PlaygroundEditorTheme.css';
12
-
13
- const theme: EditorThemeClasses = {
14
- blockCursor: 'PlaygroundEditorTheme__blockCursor',
15
- characterLimit: 'PlaygroundEditorTheme__characterLimit',
16
- code: 'PlaygroundEditorTheme__code',
17
- codeHighlight: {
18
- atrule: 'PlaygroundEditorTheme__tokenAttr',
19
- attr: 'PlaygroundEditorTheme__tokenAttr',
20
- boolean: 'PlaygroundEditorTheme__tokenProperty',
21
- builtin: 'PlaygroundEditorTheme__tokenSelector',
22
- cdata: 'PlaygroundEditorTheme__tokenComment',
23
- char: 'PlaygroundEditorTheme__tokenSelector',
24
- class: 'PlaygroundEditorTheme__tokenFunction',
25
- 'class-name': 'PlaygroundEditorTheme__tokenFunction',
26
- comment: 'PlaygroundEditorTheme__tokenComment',
27
- constant: 'PlaygroundEditorTheme__tokenProperty',
28
- deleted: 'PlaygroundEditorTheme__tokenProperty',
29
- doctype: 'PlaygroundEditorTheme__tokenComment',
30
- entity: 'PlaygroundEditorTheme__tokenOperator',
31
- function: 'PlaygroundEditorTheme__tokenFunction',
32
- important: 'PlaygroundEditorTheme__tokenVariable',
33
- inserted: 'PlaygroundEditorTheme__tokenSelector',
34
- keyword: 'PlaygroundEditorTheme__tokenAttr',
35
- namespace: 'PlaygroundEditorTheme__tokenVariable',
36
- number: 'PlaygroundEditorTheme__tokenProperty',
37
- operator: 'PlaygroundEditorTheme__tokenOperator',
38
- prolog: 'PlaygroundEditorTheme__tokenComment',
39
- property: 'PlaygroundEditorTheme__tokenProperty',
40
- punctuation: 'PlaygroundEditorTheme__tokenPunctuation',
41
- regex: 'PlaygroundEditorTheme__tokenVariable',
42
- selector: 'PlaygroundEditorTheme__tokenSelector',
43
- string: 'PlaygroundEditorTheme__tokenSelector',
44
- symbol: 'PlaygroundEditorTheme__tokenProperty',
45
- tag: 'PlaygroundEditorTheme__tokenProperty',
46
- url: 'PlaygroundEditorTheme__tokenOperator',
47
- variable: 'PlaygroundEditorTheme__tokenVariable',
48
- },
49
- embedBlock: {
50
- base: 'PlaygroundEditorTheme__embedBlock',
51
- focus: 'PlaygroundEditorTheme__embedBlockFocus',
52
- },
53
- hashtag: 'PlaygroundEditorTheme__hashtag',
54
- heading: {
55
- h1: 'PlaygroundEditorTheme__h1',
56
- h2: 'PlaygroundEditorTheme__h2',
57
- h3: 'PlaygroundEditorTheme__h3',
58
- h4: 'PlaygroundEditorTheme__h4',
59
- h5: 'PlaygroundEditorTheme__h5',
60
- h6: 'PlaygroundEditorTheme__h6',
61
- },
62
- image: 'editor-image',
63
- indent: 'PlaygroundEditorTheme__indent',
64
- link: 'PlaygroundEditorTheme__link',
65
- list: {
66
- listitem: 'PlaygroundEditorTheme__listItem',
67
- listitemChecked: 'PlaygroundEditorTheme__listItemChecked',
68
- listitemUnchecked: 'PlaygroundEditorTheme__listItemUnchecked',
69
- nested: {
70
- listitem: 'PlaygroundEditorTheme__nestedListItem',
71
- },
72
- olDepth: [
73
- 'PlaygroundEditorTheme__ol1',
74
- 'PlaygroundEditorTheme__ol2',
75
- 'PlaygroundEditorTheme__ol3',
76
- 'PlaygroundEditorTheme__ol4',
77
- 'PlaygroundEditorTheme__ol5',
78
- ],
79
- ul: 'PlaygroundEditorTheme__ul',
80
- },
81
- ltr: 'PlaygroundEditorTheme__ltr',
82
- mark: 'PlaygroundEditorTheme__mark',
83
- markOverlap: 'PlaygroundEditorTheme__markOverlap',
84
- paragraph: 'PlaygroundEditorTheme__paragraph',
85
- quote: 'PlaygroundEditorTheme__quote',
86
- rtl: 'PlaygroundEditorTheme__rtl',
87
- table: 'PlaygroundEditorTheme__table',
88
- tableAddColumns: 'PlaygroundEditorTheme__tableAddColumns',
89
- tableAddRows: 'PlaygroundEditorTheme__tableAddRows',
90
- tableCell: 'PlaygroundEditorTheme__tableCell',
91
- tableCellActionButton: 'PlaygroundEditorTheme__tableCellActionButton',
92
- tableCellActionButtonContainer: 'PlaygroundEditorTheme__tableCellActionButtonContainer',
93
- tableCellEditing: 'PlaygroundEditorTheme__tableCellEditing',
94
- tableCellHeader: 'PlaygroundEditorTheme__tableCellHeader',
95
- tableCellPrimarySelected: 'PlaygroundEditorTheme__tableCellPrimarySelected',
96
- tableCellResizer: 'PlaygroundEditorTheme__tableCellResizer',
97
- tableCellSelected: 'PlaygroundEditorTheme__tableCellSelected',
98
- tableCellSortedIndicator: 'PlaygroundEditorTheme__tableCellSortedIndicator',
99
- tableResizeRuler: 'PlaygroundEditorTheme__tableCellResizeRuler',
100
- tableSelected: 'PlaygroundEditorTheme__tableSelected',
101
- text: {
102
- bold: 'PlaygroundEditorTheme__textBold',
103
- code: 'PlaygroundEditorTheme__textCode',
104
- italic: 'PlaygroundEditorTheme__textItalic',
105
- strikethrough: 'PlaygroundEditorTheme__textStrikethrough',
106
- subscript: 'PlaygroundEditorTheme__textSubscript',
107
- superscript: 'PlaygroundEditorTheme__textSuperscript',
108
- underline: 'PlaygroundEditorTheme__textUnderline',
109
- underlineStrikethrough: 'PlaygroundEditorTheme__textUnderlineStrikethrough',
110
- },
111
- };
112
-
113
- export default theme;