@npm-questionpro/wick-ui-editor 0.8.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/README.md +73 -0
- package/dist/style.css +1 -0
- package/dist/wick-ui-editor/es/index.js +6378 -0
- package/package.json +115 -0
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## React Compiler
|
|
11
|
+
|
|
12
|
+
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
|
13
|
+
|
|
14
|
+
## Expanding the ESLint configuration
|
|
15
|
+
|
|
16
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
export default defineConfig([
|
|
20
|
+
globalIgnores(['dist']),
|
|
21
|
+
{
|
|
22
|
+
files: ['**/*.{ts,tsx}'],
|
|
23
|
+
extends: [
|
|
24
|
+
// Other configs...
|
|
25
|
+
|
|
26
|
+
// Remove tseslint.configs.recommended and replace with this
|
|
27
|
+
tseslint.configs.recommendedTypeChecked,
|
|
28
|
+
// Alternatively, use this for stricter rules
|
|
29
|
+
tseslint.configs.strictTypeChecked,
|
|
30
|
+
// Optionally, add this for stylistic rules
|
|
31
|
+
tseslint.configs.stylisticTypeChecked,
|
|
32
|
+
|
|
33
|
+
// Other configs...
|
|
34
|
+
],
|
|
35
|
+
languageOptions: {
|
|
36
|
+
parserOptions: {
|
|
37
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
38
|
+
tsconfigRootDir: import.meta.dirname,
|
|
39
|
+
},
|
|
40
|
+
// other options...
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
])
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
// eslint.config.js
|
|
50
|
+
import reactX from 'eslint-plugin-react-x'
|
|
51
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
52
|
+
|
|
53
|
+
export default defineConfig([
|
|
54
|
+
globalIgnores(['dist']),
|
|
55
|
+
{
|
|
56
|
+
files: ['**/*.{ts,tsx}'],
|
|
57
|
+
extends: [
|
|
58
|
+
// Other configs...
|
|
59
|
+
// Enable lint rules for React
|
|
60
|
+
reactX.configs['recommended-typescript'],
|
|
61
|
+
// Enable lint rules for React DOM
|
|
62
|
+
reactDom.configs.recommended,
|
|
63
|
+
],
|
|
64
|
+
languageOptions: {
|
|
65
|
+
parserOptions: {
|
|
66
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
67
|
+
tsconfigRootDir: import.meta.dirname,
|
|
68
|
+
},
|
|
69
|
+
// other options...
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
])
|
|
73
|
+
```
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";._WuContentEditor_kw1nx_8 img{margin:0}._WuContentEditor_kw1nx_8 [data-resize-handle]{position:absolute;background:#00000080;border:1px solid rgba(255,255,255,.8);border-radius:2px;z-index:9}._WuContentEditor_kw1nx_8 [data-resize-handle]:hover{background:#000c}._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=top-left],._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=top-right],._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=bottom-left],._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=bottom-right]{width:8px;height:8px}._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=top-left]{top:0;left:-4px;cursor:nwse-resize}._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=top-right]{top:-4px;right:-4px;cursor:nesw-resize}._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=bottom-left]{bottom:-4px;left:-4px;cursor:nesw-resize}._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=bottom-right]{bottom:-4px;right:-4px;cursor:nwse-resize}._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=top],._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=bottom]{height:6px;left:8px;right:8px}._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=top]{top:-3px;cursor:ns-resize}._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=bottom]{bottom:-3px;cursor:ns-resize}._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=left],._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=right]{width:6px;top:8px;bottom:8px}._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=left]{left:-3px;cursor:ew-resize}._WuContentEditor_kw1nx_8 [data-resize-handle][data-resize-handle=right]{right:-3px;cursor:ew-resize}._WuContentEditor_kw1nx_8 table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}._WuContentEditor_kw1nx_8 table td,._WuContentEditor_kw1nx_8 table th{border:1px solid #e6e6e6;box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}._WuContentEditor_kw1nx_8 table td>*,._WuContentEditor_kw1nx_8 table th>*{margin-bottom:0}._WuContentEditor_kw1nx_8 table th{background-color:#f5f5f5;font-weight:700;text-align:left}._WuContentEditor_kw1nx_8 table ._selectedCell_kw1nx_1:after{background:green;content:"";left:0;right:0;top:0;bottom:0;pointer-events:none;position:absolute;z-index:2}._WuContentEditor_kw1nx_8 table ._column-resize-handle_kw1nx_1{background-color:#00f;bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}._WuContentEditor_kw1nx_8 ._tableWrapper_kw1nx_1{margin:1.5rem 0;overflow-x:auto;scrollbar-width:thin;scrollbar-color:rgb(var(--wu-gray-20)) transparent}._WuContentEditor_kw1nx_8 ._tableWrapper_kw1nx_1::-webkit-scrollbar{width:6px;height:6px}._WuContentEditor_kw1nx_8 ._tableWrapper_kw1nx_1::-webkit-scrollbar-track{background:transparent}._WuContentEditor_kw1nx_8 ._tableWrapper_kw1nx_1::-webkit-scrollbar-thumb{background-color:rgb(var(--wu-gray-20));border-radius:4px}._WuContentEditor_kw1nx_8 ._tableWrapper_kw1nx_1::-webkit-scrollbar-corner{background:transparent}._WuContentEditor_kw1nx_8._resize-cursor_kw1nx_1{cursor:ew-resize;cursor:col-resize}img{margin:0}[data-resize-handle]{position:absolute;background:#00000080;border:1px solid rgba(255,255,255,.8);border-radius:2px;z-index:9}[data-resize-handle]:hover{background:#000c}[data-resize-handle][data-resize-handle=top-left],[data-resize-handle][data-resize-handle=top-right],[data-resize-handle][data-resize-handle=bottom-left],[data-resize-handle][data-resize-handle=bottom-right]{width:8px;height:8px}[data-resize-handle][data-resize-handle=top-left]{top:0;left:-4px;cursor:nwse-resize}[data-resize-handle][data-resize-handle=top-right]{top:-4px;right:-4px;cursor:nesw-resize}[data-resize-handle][data-resize-handle=bottom-left]{bottom:-4px;left:-4px;cursor:nesw-resize}[data-resize-handle][data-resize-handle=bottom-right]{bottom:-4px;right:-4px;cursor:nwse-resize}[data-resize-handle][data-resize-handle=top],[data-resize-handle][data-resize-handle=bottom]{height:6px;left:8px;right:8px}[data-resize-handle][data-resize-handle=top]{top:-3px;cursor:ns-resize}[data-resize-handle][data-resize-handle=bottom]{bottom:-3px;cursor:ns-resize}[data-resize-handle][data-resize-handle=left],[data-resize-handle][data-resize-handle=right]{width:6px;top:8px;bottom:8px}[data-resize-handle][data-resize-handle=left]{left:-3px;cursor:ew-resize}[data-resize-handle][data-resize-handle=right]{right:-3px;cursor:ew-resize}[data-resize-state=true] [data-resize-wrapper]{outline:1px solid rgba(0,0,0,.25);border-radius:.125rem}._WuContentEditor_kw1nx_8 h1{@apply wu-text-heading-1 wu-my-1;}._WuContentEditor_kw1nx_8 h2{@apply wu-text-heading-2 wu-my-1;}._WuContentEditor_kw1nx_8 h3{@apply wu-text-heading-3 wu-my-1;}._WuContentEditor_kw1nx_8 h4{@apply wu-text-heading-4 wu-my-1;}._WuContentEditor_kw1nx_8 p{@apply wu-text-body-1 wu-my-1;}._WuContentEditor_kw1nx_8 ul,._WuContentEditor_kw1nx_8 ol{all:unset;display:revert;box-sizing:border-box}._WuContentEditor_kw1nx_8 ul{padding-left:2rem;list-style-type:disc}._WuContentEditor_kw1nx_8 ol{padding-left:2rem;list-style-type:decimal}._WuContentEditor_kw1nx_8 ul[data-type=taskList]{list-style-type:none;padding-left:1rem}._WuContentEditor_kw1nx_8 ul[data-type=taskList] li{display:flex;align-items:center;justify-content:flex-start;gap:8px}._WuContentEditor_kw1nx_8 ul[data-type=taskList] li label{position:relative;top:2px}._WuContentEditor_kw1nx_8{--wu-blue-p: 27 135 230;display:flex;background-color:#fff;border:1px solid #ddd;border-radius:8px;line-height:1.5;overflow:auto;position:relative;min-height:160px;scrollbar-width:thin;scrollbar-color:rgb(var(--wu-gray-20)) transparent}._WuContentEditor_kw1nx_8::-webkit-scrollbar{width:6px;height:6px}._WuContentEditor_kw1nx_8::-webkit-scrollbar-track{background:transparent}._WuContentEditor_kw1nx_8::-webkit-scrollbar-thumb{background-color:rgb(var(--wu-gray-20));border-radius:4px}._WuContentEditor_kw1nx_8::-webkit-scrollbar-corner{background:transparent}._WuContentEditor_kw1nx_8 *:focus{outline:none}._WuContentEditor_kw1nx_8 a{font-weight:400;text-decoration:underline;color:rgb(var(--wu-blue-q))}._WuContentEditor_kw1nx_8 blockquote{border-left:4px solid rgb(var(--wu-blue-p) / 50);background-color:rgb(var(--wu-blue-p) / .1);padding:1rem;margin:1.5rem 0;border-radius:0 8px 8px 0;font-style:italic}._WuContentEditor_kw1nx_8 code{font-family:JetBrains Mono,monospace!important;font-size:.75em;background-color:rgb(var(--wu-gray-20));color:rgb(var(--wu-blue-q));padding:4px;border-radius:2px}._WuContentEditor_kw1nx_8 code:before,._WuContentEditor_kw1nx_8 code:after{content:""}._toolbarContainer_kw1nx_70{display:flex;gap:.25rem;padding:.5rem;align-items:center;justify-content:start;border-style:solid;border-color:#9ca3af}._editorAction_kw1nx_80{display:flex;height:1.5rem;width:1.5rem;cursor:pointer;align-items:center;justify-content:center;border-radius:.25rem;font-size:1.125rem;line-height:1.75rem}._editorAction_kw1nx_80:hover{background-color:rgb(var(--wu-blue-p) / .15)}._editorActionActive_kw1nx_96{background-color:rgb(var(--wu-blue-p) / .05);color:rgb(var(--wu-blue-p))}._flexCol_kw1nx_101{flex-direction:column}._flexColReverse_kw1nx_105{flex-direction:column-reverse}._toolbar_kw1nx_70{position:sticky;z-index:10;background-color:#fff}._toolbarTop_kw1nx_115{top:0;border-bottom:1px solid #ddd}._toolbarBottom_kw1nx_120{bottom:0;border-top:1px solid #ddd}._editorContent_kw1nx_125{padding:1rem;flex-grow:1}._fontFamilyDropdownMenuContent_kw1nx_130{border:1px solid rgb(var(--wu-blue-p));box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;color:rgb(var(--wu-gray-lead) / 1);font-size:.75rem;line-height:1rem;background-color:#fff;border-radius:.25rem;overflow:hidden;min-width:8rem}h1{font-size:2rem;font-weight:400;line-height:"40px"}h2{font-size:1.5rem;font-weight:400;line-height:"32px"}h3{font-size:1.25rem;font-weight:500;line-height:"32px"}h4{font-size:1.125rem;font-weight:500;line-height:"24px"}._separator_1bim7_1{background-color:#e0e0e0;flex-shrink:0}._horizontal_1bim7_6{width:100%;height:1px}._vertical_1bim7_11{width:1px;height:100%;min-height:25px}._bgColorCursorPointer_1tsqg_1{cursor:pointer}._bgColorHiddenInput_1tsqg_5{opacity:0;width:0;height:0}._fontSizeInputContainer_1tsqg_11{display:flex;align-items:center;gap:.25rem}._fontSizeInputField_1tsqg_17{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;text-align:center;border-width:1px;border-style:solid;border-radius:.25rem;width:2.5rem;height:1.5rem}._fontFamilyDropdown_1tsqg_29{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}._fontFamilyDropdownMenuItem_1tsqg_36{position:relative;display:flex;cursor:default;-webkit-user-select:none;user-select:none;align-items:center;font-size:.75rem;padding:.5rem;outline:none;transition:background-color .15s ease,color .15s ease}._fontFamilyDropdownMenuItem_1tsqg_36:hover{background-color:#f3f4f6}._fontFamilyDropdownMenuItem_1tsqg_36:focus{background-color:#f3f4f6}._fontFamilyDropdownMenuItem_1tsqg_36[data-disabled]{cursor:not-allowed;opacity:.5}._modalActions_1tsqg_63{display:flex;justify-content:flex-end;gap:.5rem}._tableModalContentContainer_1tsqg_69{margin-top:8px}._tableModalContent_1tsqg_69{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 12px}._tableModalButton_1tsqg_78{font-size:12px;display:flex;justify-content:start}._tableModalActions_1tsqg_84{display:flex;justify-content:flex-end;gap:.5rem;margin-top:8px}._tableModalClose_1tsqg_91{font-size:12px}
|