editorjs-shadcn 2.31.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 (69) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +244 -0
  3. package/dist/editorjs.mjs +11209 -0
  4. package/dist/editorjs.umd.js +51 -0
  5. package/dist/vendor.LICENSE.txt +468 -0
  6. package/package.json +76 -0
  7. package/types/api/block.d.ts +87 -0
  8. package/types/api/blocks.d.ts +160 -0
  9. package/types/api/caret.d.ts +67 -0
  10. package/types/api/events.d.ts +28 -0
  11. package/types/api/i18n.d.ts +11 -0
  12. package/types/api/index.d.ts +17 -0
  13. package/types/api/inline-toolbar.d.ts +15 -0
  14. package/types/api/listeners.d.ts +32 -0
  15. package/types/api/notifier.d.ts +14 -0
  16. package/types/api/readonly.d.ts +17 -0
  17. package/types/api/sanitizer.d.ts +14 -0
  18. package/types/api/saver.d.ts +13 -0
  19. package/types/api/selection.d.ts +41 -0
  20. package/types/api/styles.d.ts +44 -0
  21. package/types/api/toolbar.d.ts +26 -0
  22. package/types/api/tools.d.ts +11 -0
  23. package/types/api/tooltip.d.ts +30 -0
  24. package/types/api/ui.d.ts +24 -0
  25. package/types/block-tunes/block-tune-data.d.ts +1 -0
  26. package/types/block-tunes/block-tune.d.ts +70 -0
  27. package/types/block-tunes/index.d.ts +1 -0
  28. package/types/configs/conversion-config.ts +26 -0
  29. package/types/configs/editor-config.d.ts +118 -0
  30. package/types/configs/i18n-config.d.ts +16 -0
  31. package/types/configs/i18n-dictionary.d.ts +93 -0
  32. package/types/configs/index.d.ts +7 -0
  33. package/types/configs/log-levels.d.ts +9 -0
  34. package/types/configs/paste-config.d.ts +38 -0
  35. package/types/configs/sanitizer-config.d.ts +43 -0
  36. package/types/data-formats/block-data.d.ts +23 -0
  37. package/types/data-formats/block-id.ts +4 -0
  38. package/types/data-formats/index.d.ts +2 -0
  39. package/types/data-formats/output-data.d.ts +46 -0
  40. package/types/events/block/Base.ts +11 -0
  41. package/types/events/block/BlockAdded.ts +21 -0
  42. package/types/events/block/BlockChanged.ts +21 -0
  43. package/types/events/block/BlockMoved.ts +26 -0
  44. package/types/events/block/BlockRemoved.ts +21 -0
  45. package/types/events/block/index.ts +44 -0
  46. package/types/index.d.ts +190 -0
  47. package/types/tools/adapters/base-tool-adapter.d.ts +76 -0
  48. package/types/tools/adapters/block-tool-adapter.d.ts +78 -0
  49. package/types/tools/adapters/block-tune-adapter.d.ts +14 -0
  50. package/types/tools/adapters/inline-tool-adapter.d.ts +15 -0
  51. package/types/tools/adapters/tool-factory.d.ts +5 -0
  52. package/types/tools/adapters/tool-type.ts +18 -0
  53. package/types/tools/adapters/tools-collection.d.ts +34 -0
  54. package/types/tools/block-tool-data.d.ts +5 -0
  55. package/types/tools/block-tool.d.ts +121 -0
  56. package/types/tools/hook-events.d.ts +23 -0
  57. package/types/tools/index.d.ts +16 -0
  58. package/types/tools/inline-tool.d.ts +66 -0
  59. package/types/tools/menu-config.d.ts +54 -0
  60. package/types/tools/paste-events.d.ts +52 -0
  61. package/types/tools/tool-config.d.ts +4 -0
  62. package/types/tools/tool-settings.d.ts +91 -0
  63. package/types/tools/tool.d.ts +60 -0
  64. package/types/utils/popover/hint.d.ts +29 -0
  65. package/types/utils/popover/index.d.ts +5 -0
  66. package/types/utils/popover/popover-event.ts +15 -0
  67. package/types/utils/popover/popover-item-type.ts +13 -0
  68. package/types/utils/popover/popover-item.d.ts +248 -0
  69. package/types/utils/popover/popover.d.ts +101 -0
@@ -0,0 +1,468 @@
1
+ Name: @babel/register
2
+ Version: 7.21.0
3
+ License: MIT
4
+ Private: false
5
+ Description: babel require hook
6
+ Repository: https://github.com/babel/babel.git
7
+ Homepage: https://babel.dev/docs/en/next/babel-register
8
+ Author: The Babel Team (https://babel.dev/team)
9
+ License Copyright:
10
+ ===
11
+
12
+ MIT License
13
+
14
+ Copyright (c) 2014-present Sebastian McKenzie and other contributors
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining
17
+ a copy of this software and associated documentation files (the
18
+ "Software"), to deal in the Software without restriction, including
19
+ without limitation the rights to use, copy, modify, merge, publish,
20
+ distribute, sublicense, and/or sell copies of the Software, and to
21
+ permit persons to whom the Software is furnished to do so, subject to
22
+ the following conditions:
23
+
24
+ The above copyright notice and this permission notice shall be
25
+ included in all copies or substantial portions of the Software.
26
+
27
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
31
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
32
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
33
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
+
35
+
36
+ ---
37
+
38
+ Name: nanoid
39
+ Version: 4.0.2
40
+ License: MIT
41
+ Private: false
42
+ Description: A tiny (116 bytes), secure URL-friendly unique string ID generator
43
+ Repository: undefined
44
+ Author: Andrey Sitnik <andrey@sitnik.ru>
45
+ License Copyright:
46
+ ===
47
+
48
+ The MIT License (MIT)
49
+
50
+ Copyright 2017 Andrey Sitnik <andrey@sitnik.ru>
51
+
52
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
53
+ this software and associated documentation files (the "Software"), to deal in
54
+ the Software without restriction, including without limitation the rights to
55
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
56
+ the Software, and to permit persons to whom the Software is furnished to do so,
57
+ subject to the following conditions:
58
+
59
+ The above copyright notice and this permission notice shall be included in all
60
+ copies or substantial portions of the Software.
61
+
62
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
63
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
64
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
65
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
66
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
67
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
68
+
69
+
70
+ ---
71
+
72
+ Name: codex-notifier
73
+ Version: 1.1.2
74
+ License: MIT
75
+ Private: false
76
+ Description: Simple notifications for your website
77
+ Repository: git+https://github.com/codex-team/js-notifier.git
78
+ Homepage: https://github.com/codex-team/js-notifier#readme
79
+ Author: CodeX Team <team@ifmo.su>
80
+ License Copyright:
81
+ ===
82
+
83
+ MIT License
84
+
85
+ Copyright (c) 2017 CodeX
86
+
87
+ Permission is hereby granted, free of charge, to any person obtaining a copy
88
+ of this software and associated documentation files (the "Software"), to deal
89
+ in the Software without restriction, including without limitation the rights
90
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
91
+ copies of the Software, and to permit persons to whom the Software is
92
+ furnished to do so, subject to the following conditions:
93
+
94
+ The above copyright notice and this permission notice shall be included in all
95
+ copies or substantial portions of the Software.
96
+
97
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
98
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
99
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
100
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
101
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
102
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
103
+ SOFTWARE.
104
+
105
+
106
+ ---
107
+
108
+ Name: html-janitor
109
+ Version: 2.0.4
110
+ License: null
111
+ Private: false
112
+ Repository: https://github.com/guardian/html-janitor.git
113
+ License Copyright:
114
+ ===
115
+
116
+ Apache License
117
+ Version 2.0, January 2004
118
+ http://www.apache.org/licenses/
119
+
120
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
121
+
122
+ 1. Definitions.
123
+
124
+ "License" shall mean the terms and conditions for use, reproduction,
125
+ and distribution as defined by Sections 1 through 9 of this document.
126
+
127
+ "Licensor" shall mean the copyright owner or entity authorized by
128
+ the copyright owner that is granting the License.
129
+
130
+ "Legal Entity" shall mean the union of the acting entity and all
131
+ other entities that control, are controlled by, or are under common
132
+ control with that entity. For the purposes of this definition,
133
+ "control" means (i) the power, direct or indirect, to cause the
134
+ direction or management of such entity, whether by contract or
135
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
136
+ outstanding shares, or (iii) beneficial ownership of such entity.
137
+
138
+ "You" (or "Your") shall mean an individual or Legal Entity
139
+ exercising permissions granted by this License.
140
+
141
+ "Source" form shall mean the preferred form for making modifications,
142
+ including but not limited to software source code, documentation
143
+ source, and configuration files.
144
+
145
+ "Object" form shall mean any form resulting from mechanical
146
+ transformation or translation of a Source form, including but
147
+ not limited to compiled object code, generated documentation,
148
+ and conversions to other media types.
149
+
150
+ "Work" shall mean the work of authorship, whether in Source or
151
+ Object form, made available under the License, as indicated by a
152
+ copyright notice that is included in or attached to the work
153
+ (an example is provided in the Appendix below).
154
+
155
+ "Derivative Works" shall mean any work, whether in Source or Object
156
+ form, that is based on (or derived from) the Work and for which the
157
+ editorial revisions, annotations, elaborations, or other modifications
158
+ represent, as a whole, an original work of authorship. For the purposes
159
+ of this License, Derivative Works shall not include works that remain
160
+ separable from, or merely link (or bind by name) to the interfaces of,
161
+ the Work and Derivative Works thereof.
162
+
163
+ "Contribution" shall mean any work of authorship, including
164
+ the original version of the Work and any modifications or additions
165
+ to that Work or Derivative Works thereof, that is intentionally
166
+ submitted to Licensor for inclusion in the Work by the copyright owner
167
+ or by an individual or Legal Entity authorized to submit on behalf of
168
+ the copyright owner. For the purposes of this definition, "submitted"
169
+ means any form of electronic, verbal, or written communication sent
170
+ to the Licensor or its representatives, including but not limited to
171
+ communication on electronic mailing lists, source code control systems,
172
+ and issue tracking systems that are managed by, or on behalf of, the
173
+ Licensor for the purpose of discussing and improving the Work, but
174
+ excluding communication that is conspicuously marked or otherwise
175
+ designated in writing by the copyright owner as "Not a Contribution."
176
+
177
+ "Contributor" shall mean Licensor and any individual or Legal Entity
178
+ on behalf of whom a Contribution has been received by Licensor and
179
+ subsequently incorporated within the Work.
180
+
181
+ 2. Grant of Copyright License. Subject to the terms and conditions of
182
+ this License, each Contributor hereby grants to You a perpetual,
183
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
184
+ copyright license to reproduce, prepare Derivative Works of,
185
+ publicly display, publicly perform, sublicense, and distribute the
186
+ Work and such Derivative Works in Source or Object form.
187
+
188
+ 3. Grant of Patent License. Subject to the terms and conditions of
189
+ this License, each Contributor hereby grants to You a perpetual,
190
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
191
+ (except as stated in this section) patent license to make, have made,
192
+ use, offer to sell, sell, import, and otherwise transfer the Work,
193
+ where such license applies only to those patent claims licensable
194
+ by such Contributor that are necessarily infringed by their
195
+ Contribution(s) alone or by combination of their Contribution(s)
196
+ with the Work to which such Contribution(s) was submitted. If You
197
+ institute patent litigation against any entity (including a
198
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
199
+ or a Contribution incorporated within the Work constitutes direct
200
+ or contributory patent infringement, then any patent licenses
201
+ granted to You under this License for that Work shall terminate
202
+ as of the date such litigation is filed.
203
+
204
+ 4. Redistribution. You may reproduce and distribute copies of the
205
+ Work or Derivative Works thereof in any medium, with or without
206
+ modifications, and in Source or Object form, provided that You
207
+ meet the following conditions:
208
+
209
+ (a) You must give any other recipients of the Work or
210
+ Derivative Works a copy of this License; and
211
+
212
+ (b) You must cause any modified files to carry prominent notices
213
+ stating that You changed the files; and
214
+
215
+ (c) You must retain, in the Source form of any Derivative Works
216
+ that You distribute, all copyright, patent, trademark, and
217
+ attribution notices from the Source form of the Work,
218
+ excluding those notices that do not pertain to any part of
219
+ the Derivative Works; and
220
+
221
+ (d) If the Work includes a "NOTICE" text file as part of its
222
+ distribution, then any Derivative Works that You distribute must
223
+ include a readable copy of the attribution notices contained
224
+ within such NOTICE file, excluding those notices that do not
225
+ pertain to any part of the Derivative Works, in at least one
226
+ of the following places: within a NOTICE text file distributed
227
+ as part of the Derivative Works; within the Source form or
228
+ documentation, if provided along with the Derivative Works; or,
229
+ within a display generated by the Derivative Works, if and
230
+ wherever such third-party notices normally appear. The contents
231
+ of the NOTICE file are for informational purposes only and
232
+ do not modify the License. You may add Your own attribution
233
+ notices within Derivative Works that You distribute, alongside
234
+ or as an addendum to the NOTICE text from the Work, provided
235
+ that such additional attribution notices cannot be construed
236
+ as modifying the License.
237
+
238
+ You may add Your own copyright statement to Your modifications and
239
+ may provide additional or different license terms and conditions
240
+ for use, reproduction, or distribution of Your modifications, or
241
+ for any such Derivative Works as a whole, provided Your use,
242
+ reproduction, and distribution of the Work otherwise complies with
243
+ the conditions stated in this License.
244
+
245
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
246
+ any Contribution intentionally submitted for inclusion in the Work
247
+ by You to the Licensor shall be under the terms and conditions of
248
+ this License, without any additional terms or conditions.
249
+ Notwithstanding the above, nothing herein shall supersede or modify
250
+ the terms of any separate license agreement you may have executed
251
+ with Licensor regarding such Contributions.
252
+
253
+ 6. Trademarks. This License does not grant permission to use the trade
254
+ names, trademarks, service marks, or product names of the Licensor,
255
+ except as required for reasonable and customary use in describing the
256
+ origin of the Work and reproducing the content of the NOTICE file.
257
+
258
+ 7. Disclaimer of Warranty. Unless required by applicable law or
259
+ agreed to in writing, Licensor provides the Work (and each
260
+ Contributor provides its Contributions) on an "AS IS" BASIS,
261
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
262
+ implied, including, without limitation, any warranties or conditions
263
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
264
+ PARTICULAR PURPOSE. You are solely responsible for determining the
265
+ appropriateness of using or redistributing the Work and assume any
266
+ risks associated with Your exercise of permissions under this License.
267
+
268
+ 8. Limitation of Liability. In no event and under no legal theory,
269
+ whether in tort (including negligence), contract, or otherwise,
270
+ unless required by applicable law (such as deliberate and grossly
271
+ negligent acts) or agreed to in writing, shall any Contributor be
272
+ liable to You for damages, including any direct, indirect, special,
273
+ incidental, or consequential damages of any character arising as a
274
+ result of this License or out of the use or inability to use the
275
+ Work (including but not limited to damages for loss of goodwill,
276
+ work stoppage, computer failure or malfunction, or any and all
277
+ other commercial damages or losses), even if such Contributor
278
+ has been advised of the possibility of such damages.
279
+
280
+ 9. Accepting Warranty or Additional Liability. While redistributing
281
+ the Work or Derivative Works thereof, You may choose to offer,
282
+ and charge a fee for, acceptance of support, warranty, indemnity,
283
+ or other liability obligations and/or rights consistent with this
284
+ License. However, in accepting such obligations, You may act only
285
+ on Your own behalf and on Your sole responsibility, not on behalf
286
+ of any other Contributor, and only if You agree to indemnify,
287
+ defend, and hold each Contributor harmless for any liability
288
+ incurred by, or claims asserted against, such Contributor by reason
289
+ of your accepting any such warranty or additional liability.
290
+
291
+ END OF TERMS AND CONDITIONS
292
+
293
+ APPENDIX: How to apply the Apache License to your work.
294
+
295
+ To apply the Apache License to your work, attach the following
296
+ boilerplate notice, with the fields enclosed by brackets "{}"
297
+ replaced with your own identifying information. (Don't include
298
+ the brackets!) The text should be enclosed in the appropriate
299
+ comment syntax for the file format. We also recommend that a
300
+ file or class name and description of purpose be included on the
301
+ same "printed page" as the copyright notice for easier
302
+ identification within third-party archives.
303
+
304
+ Copyright {yyyy} {name of copyright owner}
305
+
306
+ Licensed under the Apache License, Version 2.0 (the "License");
307
+ you may not use this file except in compliance with the License.
308
+ You may obtain a copy of the License at
309
+
310
+ http://www.apache.org/licenses/LICENSE-2.0
311
+
312
+ Unless required by applicable law or agreed to in writing, software
313
+ distributed under the License is distributed on an "AS IS" BASIS,
314
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
315
+ See the License for the specific language governing permissions and
316
+ limitations under the License.
317
+
318
+
319
+ ---
320
+
321
+ Name: codex-tooltip
322
+ Version: 1.0.5
323
+ License: MIT
324
+ Private: false
325
+ Description: Simple tooltips module
326
+ Repository: git+https://github.com/codex-team/codex.tooltips
327
+ Homepage: https://github.com/codex-team/codex.tooltips
328
+ Author: CodeX <team@codex.so>
329
+ License Copyright:
330
+ ===
331
+
332
+ Copyright 2019 CodeX https://codex.so
333
+
334
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
335
+
336
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
337
+
338
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
339
+
340
+
341
+ ---
342
+
343
+ Name: @codexteam/icons
344
+ Version: 0.3.2
345
+ License: MIT
346
+ Private: false
347
+ Repository: git+https://github.com/codex-team/icon-pack.git
348
+ License Copyright:
349
+ ===
350
+
351
+ MIT License
352
+
353
+ Copyright (c) 2022 CodeX
354
+
355
+ Permission is hereby granted, free of charge, to any person obtaining a copy
356
+ of this software and associated documentation files (the "Software"), to deal
357
+ in the Software without restriction, including without limitation the rights
358
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
359
+ copies of the Software, and to permit persons to whom the Software is
360
+ furnished to do so, subject to the following conditions:
361
+
362
+ The above copyright notice and this permission notice shall be included in all
363
+ copies or substantial portions of the Software.
364
+
365
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
366
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
367
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
368
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
369
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
370
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
371
+ SOFTWARE.
372
+
373
+
374
+ ---
375
+
376
+ Name: @codexteam/shortcuts
377
+ Version: 1.2.0
378
+ License: MIT
379
+ Private: false
380
+ Description: Library for handling keyboard shortcuts
381
+ Repository: git+https://github.com/codex-team/codex.shortcuts.git
382
+ Homepage: https://github.com/codex-team/codex.shortcuts#readme
383
+ Author: CodeX (https://codex.so)
384
+ License Copyright:
385
+ ===
386
+
387
+ MIT License
388
+
389
+ Copyright (c) 2018 CodeX
390
+
391
+ Permission is hereby granted, free of charge, to any person obtaining a copy
392
+ of this software and associated documentation files (the "Software"), to deal
393
+ in the Software without restriction, including without limitation the rights
394
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
395
+ copies of the Software, and to permit persons to whom the Software is
396
+ furnished to do so, subject to the following conditions:
397
+
398
+ The above copyright notice and this permission notice shall be included in all
399
+ copies or substantial portions of the Software.
400
+
401
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
402
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
403
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
404
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
405
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
406
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
407
+ SOFTWARE.
408
+
409
+ ---
410
+
411
+ Name: @editorjs/caret
412
+ Version: 1.0.1
413
+ License: MIT
414
+ Private: false
415
+ Description: Utils useful for work with caret for Editor.js tools development
416
+ Repository: undefined
417
+
418
+ ---
419
+
420
+ Name: @editorjs/dom
421
+ Version: 1.0.0
422
+ License: MIT
423
+ Private: false
424
+ Description: Utils useful for work with dom for Editor.js tools development
425
+ Repository: undefined
426
+
427
+ ---
428
+
429
+ Name: @editorjs/helpers
430
+ Version: 1.0.0
431
+ License: MIT
432
+ Private: false
433
+ Description: Utils useful for Editor.js tools development
434
+ Repository: undefined
435
+
436
+ ---
437
+
438
+ Name: @editorjs/paragraph
439
+ Version: 2.11.6
440
+ License: MIT
441
+ Private: false
442
+ Description: Paragraph Tool for Editor.js
443
+ Repository: undefined
444
+ Author: CodeX <team@codex.so>
445
+ License Copyright:
446
+ ===
447
+
448
+ MIT License
449
+
450
+ Copyright (c) 2018 CodeX
451
+
452
+ Permission is hereby granted, free of charge, to any person obtaining a copy
453
+ of this software and associated documentation files (the "Software"), to deal
454
+ in the Software without restriction, including without limitation the rights
455
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
456
+ copies of the Software, and to permit persons to whom the Software is
457
+ furnished to do so, subject to the following conditions:
458
+
459
+ The above copyright notice and this permission notice shall be included in all
460
+ copies or substantial portions of the Software.
461
+
462
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
463
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
464
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
465
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
466
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
467
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
468
+ SOFTWARE.
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "editorjs-shadcn",
3
+ "version": "2.31.1",
4
+ "description": "Editor.js — open source block-style WYSIWYG editor with JSON output",
5
+ "main": "dist/editorjs.umd.js",
6
+ "module": "dist/editorjs.mjs",
7
+ "types": "./types/index.d.ts",
8
+ "keywords": [
9
+ "codex editor",
10
+ "text editor",
11
+ "editor",
12
+ "editor.js",
13
+ "editorjs",
14
+ "wysiwyg"
15
+ ],
16
+ "scripts": {
17
+ "dev": "vite",
18
+ "build": "vite build --mode production",
19
+ "build:test": "vite build --mode test",
20
+ "lint": "eslint src/ --ext .ts && yarn lint:tests",
21
+ "lint:errors": "eslint src/ --ext .ts --quiet",
22
+ "lint:fix": "eslint src/ --ext .ts --fix",
23
+ "lint:tests": "eslint test/ --ext .ts",
24
+ "test:e2e": "yarn build:test && cypress run",
25
+ "test:e2e:open": "yarn build:test && cypress open"
26
+ },
27
+ "author": "CodeX",
28
+ "license": "Apache-2.0",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/codex-team/editor.js.git"
32
+ },
33
+ "devDependencies": {
34
+ "@babel/register": "^7.21.0",
35
+ "@codexteam/icons": "0.3.2",
36
+ "@codexteam/shortcuts": "^1.1.1",
37
+ "@cypress/code-coverage": "^3.10.3",
38
+ "@editorjs/code": "^2.7.0",
39
+ "@editorjs/delimiter": "^1.2.0",
40
+ "@editorjs/header": "^2.8.8",
41
+ "@editorjs/paragraph": "^2.11.6",
42
+ "@editorjs/simple-image": "^1.4.1",
43
+ "@types/node": "^18.15.11",
44
+ "chai-subset": "^1.6.0",
45
+ "core-js": "3.30.0",
46
+ "cypress": "^13.13.3",
47
+ "cypress-intellij-reporter": "^0.0.7",
48
+ "cypress-plugin-tab": "^1.0.5",
49
+ "cypress-terminal-report": "^5.3.2",
50
+ "cypress-vite": "^1.5.0",
51
+ "eslint": "^8.37.0",
52
+ "eslint-config-codex": "^1.7.1",
53
+ "eslint-plugin-chai-friendly": "^0.7.2",
54
+ "eslint-plugin-cypress": "2.12.1",
55
+ "html-janitor": "^2.0.4",
56
+ "nanoid": "^4.0.2",
57
+ "postcss-apply": "^0.12.0",
58
+ "postcss-nested": "4.1.2",
59
+ "postcss-preset-env": "^8.3.0",
60
+ "rollup-plugin-license": "^3.0.1",
61
+ "stylelint": "^15.4.0",
62
+ "tslint": "^6.1.1",
63
+ "typescript": "5.0.3",
64
+ "vite": "^4.2.1",
65
+ "vite-plugin-css-injected-by-js": "^3.1.0"
66
+ },
67
+ "collective": {
68
+ "type": "opencollective",
69
+ "url": "https://opencollective.com/editorjs"
70
+ },
71
+ "dependencies": {
72
+ "@editorjs/caret": "^1.0.1",
73
+ "codex-notifier": "^1.1.2",
74
+ "codex-tooltip": "^1.0.5"
75
+ }
76
+ }
@@ -0,0 +1,87 @@
1
+ import {BlockToolData, ToolConfig, ToolboxConfigEntry} from '../tools';
2
+ import {SavedData} from '../data-formats';
3
+
4
+ /**
5
+ * @interface BlockAPI Describes Block API methods and properties
6
+ */
7
+ export interface BlockAPI {
8
+ /**
9
+ * Block unique identifier
10
+ */
11
+ readonly id: string;
12
+
13
+ /**
14
+ * Tool name
15
+ */
16
+ readonly name: string;
17
+
18
+ /**
19
+ * Tool config passed on Editor's initialization
20
+ */
21
+ readonly config: ToolConfig;
22
+
23
+ /**
24
+ * Wrapper of Tool's HTML element
25
+ */
26
+ readonly holder: HTMLElement;
27
+
28
+ /**
29
+ * True if Block content is empty
30
+ */
31
+ readonly isEmpty: boolean;
32
+
33
+ /**
34
+ * True if Block is selected with Cross-Block selection
35
+ */
36
+ readonly selected: boolean;
37
+
38
+ /**
39
+ * True if Block has inputs to be focused
40
+ */
41
+ readonly focusable: boolean;
42
+
43
+ /**
44
+ * Setter sets Block's stretch state
45
+ *
46
+ * Getter returns true if Block is stretched
47
+ */
48
+ stretched: boolean;
49
+
50
+ /**
51
+ * Call Tool method with errors handler under-the-hood
52
+ *
53
+ * @param {string} methodName - method to call
54
+ * @param {object} param - object with parameters
55
+ *
56
+ * @return {void}
57
+ */
58
+ call(methodName: string, param?: object): void;
59
+
60
+ /**
61
+ * Save Block content
62
+ *
63
+ * @return {Promise<void|SavedData>}
64
+ */
65
+ save(): Promise<void|SavedData>;
66
+
67
+ /**
68
+ * Validate Block data
69
+ *
70
+ * @param {BlockToolData} data
71
+ *
72
+ * @return {Promise<boolean>}
73
+ */
74
+ validate(data: BlockToolData): Promise<boolean>;
75
+
76
+ /**
77
+ * Allows to say Editor that Block was changed. Used to manually trigger Editor's 'onChange' callback
78
+ * Can be useful for block changes invisible for editor core.
79
+ */
80
+ dispatchChange(): void;
81
+
82
+ /**
83
+ * Tool could specify several entries to be displayed at the Toolbox (for example, "Heading 1", "Heading 2", "Heading 3")
84
+ * This method returns the entry that is related to the Block (depended on the Block data)
85
+ */
86
+ getActiveToolboxEntry(): Promise<ToolboxConfigEntry | undefined>
87
+ }