@things-factory/reference-app 6.0.14 → 6.0.17

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 (84) hide show
  1. package/client/components/editor-lexical.tsx +24 -4
  2. package/client/pages/web-editor-lexical-page.js +103 -2
  3. package/db.sqlite +0 -0
  4. package/dist-server/tsconfig.tsbuildinfo +1 -1
  5. package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +12 -62
  6. package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +6 -291
  7. package/logs/application-2023-03-13-10.log +15 -0
  8. package/logs/application-2023-03-13-11.log +5 -0
  9. package/logs/application-2023-03-13-19.log +3 -0
  10. package/logs/application-2023-03-13-20.log +1 -0
  11. package/package.json +7 -7
  12. package/logs/application-2023-01-27-03.log +0 -6
  13. package/logs/application-2023-01-27-05.log +0 -8
  14. package/logs/application-2023-01-27-06.log +0 -6
  15. package/logs/application-2023-01-27-08.log +0 -5
  16. package/logs/application-2023-01-27-12.log +0 -1
  17. package/logs/application-2023-01-27-15.log +0 -1
  18. package/logs/application-2023-01-27-17.log +0 -1
  19. package/logs/application-2023-01-27-23.log +0 -5
  20. package/logs/application-2023-01-28-00.log +0 -5
  21. package/logs/application-2023-01-28-08.log +0 -1
  22. package/logs/application-2023-01-28-09.log +0 -16
  23. package/logs/application-2023-01-28-11.log +0 -17
  24. package/logs/application-2023-01-28-18.log +0 -3
  25. package/logs/application-2023-01-28-20.log +0 -3
  26. package/logs/connections-2023-01-14-17.log +0 -0
  27. package/logs/connections-2023-01-15-01.log +0 -0
  28. package/logs/connections-2023-01-15-02.log +0 -0
  29. package/logs/connections-2023-01-15-09.log +0 -0
  30. package/logs/connections-2023-01-15-10.log +0 -0
  31. package/logs/connections-2023-01-15-13.log +0 -0
  32. package/logs/connections-2023-01-15-15.log +0 -0
  33. package/logs/connections-2023-01-15-16.log +0 -0
  34. package/logs/connections-2023-01-16-02.log +0 -0
  35. package/logs/connections-2023-01-16-03.log +0 -0
  36. package/logs/connections-2023-01-16-04.log +0 -0
  37. package/logs/connections-2023-01-16-05.log +0 -0
  38. package/logs/connections-2023-01-16-18.log +0 -0
  39. package/logs/connections-2023-01-18-14.log +0 -0
  40. package/logs/connections-2023-01-18-15.log +0 -0
  41. package/logs/connections-2023-01-18-16.log +0 -0
  42. package/logs/connections-2023-01-21-03.log +0 -0
  43. package/logs/connections-2023-01-21-08.log +0 -0
  44. package/logs/connections-2023-01-21-09.log +0 -0
  45. package/logs/connections-2023-01-21-13.log +0 -0
  46. package/logs/connections-2023-01-21-14.log +0 -0
  47. package/logs/connections-2023-01-21-15.log +0 -0
  48. package/logs/connections-2023-01-22-09.log +0 -0
  49. package/logs/connections-2023-01-22-10.log +0 -0
  50. package/logs/connections-2023-01-22-11.log +0 -0
  51. package/logs/connections-2023-01-22-12.log +0 -0
  52. package/logs/connections-2023-01-23-02.log +0 -0
  53. package/logs/connections-2023-01-23-03.log +0 -0
  54. package/logs/connections-2023-01-23-04.log +0 -0
  55. package/logs/connections-2023-01-23-05.log +0 -0
  56. package/logs/connections-2023-01-23-06.log +0 -0
  57. package/logs/connections-2023-01-23-07.log +0 -0
  58. package/logs/connections-2023-01-23-08.log +0 -0
  59. package/logs/connections-2023-01-23-12.log +0 -0
  60. package/logs/connections-2023-01-23-13.log +0 -0
  61. package/logs/connections-2023-01-23-14.log +0 -0
  62. package/logs/connections-2023-01-23-17.log +0 -0
  63. package/logs/connections-2023-01-24-03.log +0 -0
  64. package/logs/connections-2023-01-24-04.log +0 -0
  65. package/logs/connections-2023-01-24-05.log +0 -0
  66. package/logs/connections-2023-01-25-00.log +0 -0
  67. package/logs/connections-2023-01-25-04.log +0 -0
  68. package/logs/connections-2023-01-25-05.log +0 -0
  69. package/logs/connections-2023-01-25-06.log +0 -0
  70. package/logs/connections-2023-01-25-07.log +0 -0
  71. package/logs/connections-2023-01-25-12.log +0 -0
  72. package/logs/connections-2023-01-26-00.log +0 -0
  73. package/logs/connections-2023-01-26-01.log +0 -0
  74. package/logs/connections-2023-01-26-02.log +0 -0
  75. package/logs/connections-2023-01-26-06.log +0 -0
  76. package/logs/connections-2023-01-27-03.log +0 -0
  77. package/logs/connections-2023-01-27-06.log +0 -0
  78. package/logs/connections-2023-01-27-08.log +0 -0
  79. package/logs/connections-2023-01-27-23.log +0 -0
  80. package/logs/connections-2023-01-28-00.log +0 -0
  81. package/logs/connections-2023-01-28-09.log +0 -0
  82. package/logs/connections-2023-01-28-11.log +0 -0
  83. /package/logs/{connections-2023-01-14-15.log → connections-2023-03-13-10.log} +0 -0
  84. /package/logs/{connections-2023-01-14-16.log → connections-2023-03-13-11.log} +0 -0
@@ -1,6 +1,26 @@
1
- import { ReactContainer } from './react-container'
2
- // import Editor from 'lexical-playground'
1
+ // import { ReactContainer } from './react-container'
2
+ // // import Editor from 'lexical-playground'
3
3
 
4
- export default function LexicalEditor() {
5
- return <ReactContainer>{/* <Editor></Editor> */}</ReactContainer>
4
+ // export default function LexicalEditor() {
5
+ // return <ReactContainer>{/* <Editor></Editor> */}</ReactContainer>
6
+ // }
7
+ import { LexicalComposer } from '@lexical/react/LexicalComposer'
8
+ import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'
9
+ import { ContentEditable } from '@lexical/react/LexicalContentEditable'
10
+ import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary'
11
+
12
+ type LexicalEditorProps = {
13
+ config: Parameters<typeof LexicalComposer>['0']['initialConfig']
14
+ }
15
+
16
+ export function LexicalEditor(props: LexicalEditorProps) {
17
+ return (
18
+ <LexicalComposer initialConfig={props.config}>
19
+ <RichTextPlugin
20
+ contentEditable={<ContentEditable />}
21
+ placeholder={<div>Start writing...</div>}
22
+ ErrorBoundary={LexicalErrorBoundary}
23
+ />
24
+ </LexicalComposer>
25
+ )
6
26
  }
@@ -4,7 +4,7 @@ import React from 'react'
4
4
  import ReactDOM from 'react-dom/client'
5
5
 
6
6
  // import { EditorLexical } from '../components/editor-lexical'
7
- import LexicalEditor from '../components/editor-lexical'
7
+ import { LexicalEditor } from '../components/editor-lexical'
8
8
 
9
9
  import { PageView, store } from '@things-factory/shell'
10
10
 
@@ -19,6 +19,29 @@ class WebEditorLexicalPage extends connect(store)(PageView) {
19
19
  :host > * {
20
20
  flex: 1;
21
21
  }
22
+
23
+ .ltr {
24
+ text-align: left;
25
+ }
26
+
27
+ .rtl {
28
+ text-align: right;
29
+ }
30
+
31
+ .editor-placeholder {
32
+ color: #999;
33
+ overflow: hidden;
34
+ position: absolute;
35
+ top: 15px;
36
+ left: 15px;
37
+ user-select: none;
38
+ pointer-events: none;
39
+ }
40
+
41
+ .editor-paragraph {
42
+ margin: 0 0 15px 0;
43
+ position: relative;
44
+ }
22
45
  `
23
46
  ]
24
47
  }
@@ -40,7 +63,85 @@ class WebEditorLexicalPage extends connect(store)(PageView) {
40
63
  }
41
64
 
42
65
  firstUpdated() {
43
- ReactDOM.createRoot(this.renderRoot).render(React.createElement(LexicalEditor, {}))
66
+ ReactDOM.createRoot(this.renderRoot).render(
67
+ React.createElement(LexicalEditor, {
68
+ config: {
69
+ namespace: 'MyEditor',
70
+ theme: {
71
+ ltr: 'ltr',
72
+ rtl: 'rtl',
73
+ placeholder: 'editor-placeholder',
74
+ paragraph: 'editor-paragraph',
75
+ quote: 'editor-quote',
76
+ heading: {
77
+ h1: 'editor-heading-h1',
78
+ h2: 'editor-heading-h2',
79
+ h3: 'editor-heading-h3',
80
+ h4: 'editor-heading-h4',
81
+ h5: 'editor-heading-h5',
82
+ h6: 'editor-heading-h6'
83
+ },
84
+ list: {
85
+ nested: {
86
+ listitem: 'editor-nested-listitem'
87
+ },
88
+ ol: 'editor-list-ol',
89
+ ul: 'editor-list-ul',
90
+ listitem: 'editor-listItem',
91
+ listitemChecked: 'editor-listItemChecked',
92
+ listitemUnchecked: 'editor-listItemUnchecked'
93
+ },
94
+ hashtag: 'editor-hashtag',
95
+ image: 'editor-image',
96
+ link: 'editor-link',
97
+ text: {
98
+ bold: 'editor-textBold',
99
+ code: 'editor-textCode',
100
+ italic: 'editor-textItalic',
101
+ strikethrough: 'editor-textStrikethrough',
102
+ subscript: 'editor-textSubscript',
103
+ superscript: 'editor-textSuperscript',
104
+ underline: 'editor-textUnderline',
105
+ underlineStrikethrough: 'editor-textUnderlineStrikethrough'
106
+ },
107
+ code: 'editor-code',
108
+ codeHighlight: {
109
+ atrule: 'editor-tokenAttr',
110
+ attr: 'editor-tokenAttr',
111
+ boolean: 'editor-tokenProperty',
112
+ builtin: 'editor-tokenSelector',
113
+ cdata: 'editor-tokenComment',
114
+ char: 'editor-tokenSelector',
115
+ class: 'editor-tokenFunction',
116
+ 'class-name': 'editor-tokenFunction',
117
+ comment: 'editor-tokenComment',
118
+ constant: 'editor-tokenProperty',
119
+ deleted: 'editor-tokenProperty',
120
+ doctype: 'editor-tokenComment',
121
+ entity: 'editor-tokenOperator',
122
+ function: 'editor-tokenFunction',
123
+ important: 'editor-tokenVariable',
124
+ inserted: 'editor-tokenSelector',
125
+ keyword: 'editor-tokenAttr',
126
+ namespace: 'editor-tokenVariable',
127
+ number: 'editor-tokenProperty',
128
+ operator: 'editor-tokenOperator',
129
+ prolog: 'editor-tokenComment',
130
+ property: 'editor-tokenProperty',
131
+ punctuation: 'editor-tokenPunctuation',
132
+ regex: 'editor-tokenVariable',
133
+ selector: 'editor-tokenSelector',
134
+ string: 'editor-tokenSelector',
135
+ symbol: 'editor-tokenProperty',
136
+ tag: 'editor-tokenProperty',
137
+ url: 'editor-tokenOperator',
138
+ variable: 'editor-tokenVariable'
139
+ }
140
+ },
141
+ onError: console.error
142
+ }
143
+ })
144
+ )
44
145
  }
45
146
 
46
147
  stateChanged(state) {}
package/db.sqlite CHANGED
Binary file