@nine-lab/nine-ux 0.1.66 → 0.1.70

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/style.css ADDED
@@ -0,0 +1 @@
1
+ :host(nine-editor){position:relative;height:100%;width:100%;display:flex;flex-direction:column;border:1px solid #ddd;border-radius:4px;background:#fff;overflow:hidden}:host(nine-editor) #editor-container{flex:1;min-height:0;display:flex;flex-direction:column}:host(nine-editor) .menu-bar{background:#f8f9fa;padding:5px;border-bottom:1px solid #ddd;display:flex;flex-wrap:wrap;gap:4px}:host(nine-editor) .menu-bar button,:host(nine-editor) .menu-bar input[type=color]{width:32px;height:32px;cursor:pointer;border:1px solid #dee2e6;background:#fff;border-radius:4px;font-size:12px}:host(nine-editor) .menu-bar select{background:#fff;border:1px solid #dee2e6;border-radius:2px;color:#333;padding:0 4px;outline:none}:host(nine-editor) .menu-bar input[type=color]{padding:4px;color:#333}:host(nine-editor) .menu-bar button{display:inline-flex;align-items:center;justify-content:center;padding:0;transition:all .2s;color:#333}:host(nine-editor) .menu-bar button i{display:inline-block;width:18px;height:18px;background-repeat:no-repeat;background-position:center;background-size:contain;background-color:currentColor;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center}:host(nine-editor) .menu-bar button:hover{background-color:#f8f9fa;border-color:#adb5bd}:host(nine-editor) .menu-bar button:active{background-color:green}:host(nine-editor) .menu-bar button.is-active{background-color:green;color:#fff;--border-color: darkgreen}:host(nine-editor) .menu-bar button.is-active i{background-color:#fff}:host(nine-editor) .icon-highlight{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-highlighter" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M11.096.644a2 2 0 0 1 2.791.036l1.433 1.433a2 2 0 0 1 .035 2.791l-.413.435-8.07 8.995a.5.5 0 0 1-.372.166h-3a.5.5 0 0 1-.234-.058l-.412.412A.5.5 0 0 1 2.5 15h-2a.5.5 0 0 1-.354-.854l1.412-1.412A.5.5 0 0 1 1.5 12.5v-3a.5.5 0 0 1 .166-.372l8.995-8.07zm-.115 1.47L2.727 9.52l3.753 3.753 7.406-8.254zm3.585 2.17.064-.068a1 1 0 0 0-.017-1.396L13.18 1.387a1 1 0 0 0-1.396-.018l-.068.065zM5.293 13.5 2.5 10.707v1.586L3.707 13.5z"/></svg>')}:host(nine-editor) .icon-left{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-text-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/></svg>')}:host(nine-editor) .icon-center{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-text-center" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/></svg>')}:host(nine-editor) .icon-right{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-text-right" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-4-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m4-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-4-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/></svg>')}:host(nine-editor) .icon-ul{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list-ul" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m-3 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2m0 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2m0 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>')}:host(nine-editor) .icon-ol{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list-ol" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5"/><path d="M1.713 11.865v-.474H2c.217 0 .363-.137.363-.317 0-.185-.158-.31-.361-.31-.223 0-.367.152-.373.31h-.59c.016-.467.373-.787.986-.787.588-.002.954.291.957.703a.595.595 0 0 1-.492.594v.033a.615.615 0 0 1 .569.631c.003.533-.502.8-1.051.8-.656 0-1-.37-1.008-.794h.582c.008.178.186.306.422.309.254 0 .424-.145.422-.35-.002-.195-.155-.348-.414-.348h-.3zm-.004-4.699h-.604v-.035c0-.408.295-.844.958-.844.583 0 .96.326.96.756 0 .389-.257.617-.476.848l-.537.572v.03h1.054V9H1.143v-.395l.957-.99c.138-.142.293-.304.293-.508 0-.18-.147-.32-.342-.32a.33.33 0 0 0-.342.338zM2.564 5h-.635V2.924h-.031l-.598.42v-.567l.629-.443h.635z"/></svg>')}:host(nine-editor) .icon-image{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-image" viewBox="0 0 16 16"><path d="M6.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/><path d="M2.002 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2zm12 1a1 1 0 0 1 1 1v6.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12V3a1 1 0 0 1 1-1z"/></svg>')}:host(nine-editor) .icon-undo{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2z"/><path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466"/></svg>')}:host(nine-editor) .icon-redo{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-clockwise" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2z"/><path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466"/></svg>')}:host(nine-editor) .tiptap{flex:1;padding:15px;overflow-y:auto;outline:none;background:#fff;min-height:250px;font-family:Arial,sans-serif!important}:host(nine-editor) .tiptap p{margin:0}:host(nine-editor) .tiptap img{max-width:100%;height:auto;border-radius:4px}:host(nine-editor) .tiptap [style*="text-align: left"]{text-align:left}:host(nine-editor) .tiptap [style*="text-align: center"]{text-align:center}:host(nine-editor) .tiptap [style*="text-align: right"]{text-align:right}:host(nine-editor) .tiptap{font-synthesis:style weight!important;-webkit-font-smoothing:antialiased}:host(nine-editor) .tiptap em{font-style:italic!important;font-display:swap}:host(nine-editor) .tiptap i{--font-style: italic !important;font-style:oblique}:host(nine-editor) .tiptap span[style*=font-size]{display:inline-block}:host(nine-editor) #editor-container .ProseMirror{white-space:pre-wrap;word-wrap:break-word;outline:none;padding:10px;min-height:200px}:host(nine-editor) #editor-container .ProseMirror p{margin:0}:host([readonly]) #editor-container{border-color:transparent;background-color:#f9f9f9;cursor:default}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@nine-lab/nine-ux",
3
- "version": "0.1.66",
3
+ "version": "0.1.70",
4
+ "type": "module",
4
5
  "main": "dist/nine-ux.umd.js",
5
6
  "module": "dist/nine-ux.es.js",
6
7
  "files": [
@@ -8,7 +9,7 @@
8
9
  ],
9
10
  "scripts": {
10
11
  "dev": "vite",
11
- "build": "vite build",
12
+ "build": "vite build && mkdir -p dist/css && cp src/components/editor/nineEditor.css dist/css/nine-editor.css",
12
13
  "release": "npm version patch && npm run build && npm publish"
13
14
  },
14
15
  "peerDependencies": {
@@ -20,11 +21,11 @@
20
21
  },
21
22
  "dependencies": {
22
23
  "@tiptap/core": "^2.0.0",
23
- "@tiptap/starter-kit": "^2.0.0",
24
24
  "@tiptap/extension-color": "^2.0.0",
25
25
  "@tiptap/extension-highlight": "^2.0.0",
26
26
  "@tiptap/extension-image": "^2.0.0",
27
27
  "@tiptap/extension-text-align": "^2.0.0",
28
- "@tiptap/extension-text-style": "^2.0.0"
28
+ "@tiptap/extension-text-style": "^2.0.0",
29
+ "@tiptap/starter-kit": "^2.0.0"
29
30
  }
30
31
  }