x-star-editor 0.5.0 → 0.6.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.
- package/dist/components/Toolbar.js +16 -51
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/dist/styles/cursor/editor-eraser.png +0 -0
- package/dist/styles/cursor/pencil.png +0 -0
- package/dist/styles/index.css +1455 -1261
- package/dist/themes/lark.css +160 -59
- package/dist/utils/markdown.d.ts +8 -1
- package/dist/utils/markdown.js +31 -4
- package/dist/utils/slide/index.d.ts +0 -0
- package/dist/utils/slide/index.js +32 -0
- package/dist/x-star-md-viewer/index.js +8 -5
- package/dist/x-star-slide-viewer/index.d.ts +42 -0
- package/dist/x-star-slide-viewer/index.js +367 -0
- package/package.json +4 -1
|
@@ -140,42 +140,22 @@ var headingOptions = [{
|
|
|
140
140
|
depth: 6,
|
|
141
141
|
fontSize: '0.9em'
|
|
142
142
|
}];
|
|
143
|
-
var mermaidOptions = [
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
// A[Start] --> B{Is it?}
|
|
148
|
-
// B -- Yes --> C[OK]
|
|
149
|
-
// C --> D[Rethink]
|
|
150
|
-
// D --> B
|
|
151
|
-
// B -- No ----> E[End]`,
|
|
152
|
-
// },
|
|
153
|
-
{
|
|
143
|
+
var mermaidOptions = [{
|
|
144
|
+
label: 'Flowchart',
|
|
145
|
+
value: "flowchart TD\n A[Start] --> B{Is it?}\n B -- Yes --> C[OK]\n C --> D[Rethink]\n D --> B\n B -- No ----> E[End]"
|
|
146
|
+
}, {
|
|
154
147
|
label: 'Sequence Diagram',
|
|
155
148
|
value: "sequenceDiagram\n Alice->>John: Hello John, how are you?\n John-->>Alice: Great!\n Alice-)John: See you later!"
|
|
156
149
|
}, {
|
|
157
150
|
label: 'Class Diagram',
|
|
158
|
-
value: "classDiagram\n
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
// Still --> Moving
|
|
167
|
-
// Moving --> Still
|
|
168
|
-
// Moving --> Crash
|
|
169
|
-
// Crash --> [*]`,
|
|
170
|
-
// },
|
|
171
|
-
// {
|
|
172
|
-
// label: 'Entity Relationship Diagram',
|
|
173
|
-
// value: `erDiagram
|
|
174
|
-
// CUSTOMER ||--o{ ORDER : places
|
|
175
|
-
// ORDER ||--|{ LINE-ITEM : contains
|
|
176
|
-
// CUSTOMER }|..|{ DELIVERY-ADDRESS : uses`,
|
|
177
|
-
// },
|
|
178
|
-
{
|
|
151
|
+
value: "classDiagram\n Animal <|-- Duck\n Animal <|-- Fish\n Animal <|-- Zebra\n Animal : +int age\n Animal : +String gender\n Animal: +isMammal()\n Animal: +mate()\n class Duck{\n +String beakColor\n +swim()\n +quack()\n }\n class Fish{\n -int sizeInFeet\n -canEat()\n }\n class Zebra{\n +bool is_wild\n +run()\n }"
|
|
152
|
+
}, {
|
|
153
|
+
label: 'State Diagram',
|
|
154
|
+
value: "stateDiagram-v2\n [*] --> Still\n Still --> [*]\n\n Still --> Moving\n Moving --> Still\n Moving --> Crash\n Crash --> [*]"
|
|
155
|
+
}, {
|
|
156
|
+
label: 'Entity Relationship Diagram',
|
|
157
|
+
value: "erDiagram\n CUSTOMER ||--o{ ORDER : places\n ORDER ||--|{ LINE-ITEM : contains\n CUSTOMER }|..|{ DELIVERY-ADDRESS : uses"
|
|
158
|
+
}, {
|
|
179
159
|
label: 'User Journey',
|
|
180
160
|
value: "journey\n title My working day\n section Go to work\n Make tea: 5: Me\n Go upstairs: 3: Me\n Do work: 1: Me, Cat\n section Go home\n Go downstairs: 5: Me\n Sit down: 5: Me"
|
|
181
161
|
}, {
|
|
@@ -187,25 +167,10 @@ var mermaidOptions = [
|
|
|
187
167
|
}, {
|
|
188
168
|
label: 'Quadrant Chart',
|
|
189
169
|
value: "quadrantChart\n title Reach and engagement of campaigns\n x-axis Low Reach --> High Reach\n y-axis Low Engagement --> High Engagement\n quadrant-1 We should expand\n quadrant-2 Need to promote\n quadrant-3 Re-evaluate\n quadrant-4 May be improved\n Campaign A: [0.3, 0.6]\n Campaign B: [0.45, 0.23]\n Campaign C: [0.57, 0.69]\n Campaign D: [0.78, 0.34]\n Campaign E: [0.40, 0.34]\n Campaign F: [0.35, 0.78]"
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
// requirement test_req {
|
|
196
|
-
// id: 1
|
|
197
|
-
// text: the test text.
|
|
198
|
-
// risk: high
|
|
199
|
-
// verifymethod: test
|
|
200
|
-
// }
|
|
201
|
-
|
|
202
|
-
// element test_entity {
|
|
203
|
-
// type: simulation
|
|
204
|
-
// }
|
|
205
|
-
|
|
206
|
-
// test_entity - satisfies -> test_req`,
|
|
207
|
-
// },
|
|
208
|
-
{
|
|
170
|
+
}, {
|
|
171
|
+
label: 'Requirement Diagram',
|
|
172
|
+
value: "requirementDiagram\n\n requirement test_req {\n id: 1\n text: the test text.\n risk: high\n verifymethod: test\n }\n\n element test_entity {\n type: simulation\n }\n\n test_entity - satisfies -> test_req"
|
|
173
|
+
}, {
|
|
209
174
|
label: 'Gitgraph (Git) Diagram',
|
|
210
175
|
value: "gitGraph\n commit\n commit\n branch develop\n checkout develop\n commit\n commit\n checkout main\n merge develop\n commit\n commit"
|
|
211
176
|
}, {
|
package/dist/index.d.ts
CHANGED
|
@@ -9,3 +9,5 @@ export { default as XStarMdEditor, useMdEditorRef } from './x-star-md-editor';
|
|
|
9
9
|
export type { XStarMdEditorHandle, XStarMdEditorPlugin, XStarMdEditorProps, } from './x-star-md-editor';
|
|
10
10
|
export { default as XStarMdViewer, useMdViewerRef } from './x-star-md-viewer';
|
|
11
11
|
export type { XStarMdViewerHandle, XStarMdViewerPlugin, XStarMdViewerProps, } from './x-star-md-viewer';
|
|
12
|
+
export { default as XStarSlideViewer, useSlideViewerRef, } from './x-star-slide-viewer';
|
|
13
|
+
export type { XStarSlideViewerHandle, XStarSlideViewerPlugin, XStarSlideViewerProps, } from './x-star-slide-viewer';
|
package/dist/index.js
CHANGED
|
@@ -3,4 +3,5 @@ export { batchHandler, insertHandler, mutateHandler, redoHandler, selectHandler,
|
|
|
3
3
|
export { toHTML, toMarkdown, toText } from "./utils/markdown";
|
|
4
4
|
export { default as XStarEditor, useEditorRef } from "./x-star-editor";
|
|
5
5
|
export { default as XStarMdEditor, useMdEditorRef } from "./x-star-md-editor";
|
|
6
|
-
export { default as XStarMdViewer, useMdViewerRef } from "./x-star-md-viewer";
|
|
6
|
+
export { default as XStarMdViewer, useMdViewerRef } from "./x-star-md-viewer";
|
|
7
|
+
export { default as XStarSlideViewer, useSlideViewerRef } from "./x-star-slide-viewer";
|
|
Binary file
|
|
Binary file
|