nuvra 0.2.0 → 0.2.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.
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  Word-style document editor for Vue 3. A real page view with paper sizes and margins, a lighter web view for
4
4
  forms, tables, images, lists, find & replace, HTML source mode, printing and export to HTML or Word (`.doc`).
5
5
 
6
+ **[Documentation and live demo →](https://nuvra-docs.vercel.app)**
7
+
6
8
  - No editor framework underneath: its own small editing engine with a sanitizing schema.
7
9
  - No UI framework either: native HTML controls, built-in SVG icons and plain CSS variables. Vue is the only
8
10
  dependency.
@@ -122,8 +124,11 @@ Numbers are pixels; strings are used as CSS lengths (`'100%'`, `'50vh'`).
122
124
 
123
125
  ### Keyboard shortcuts
124
126
 
125
- `Ctrl/⌘+B`, `I`, `U` — bold, italic, underline · `Ctrl/⌘+Z`, `Ctrl/⌘+Shift+Z` — undo, redo ·
126
- `Ctrl/⌘+F` — find · `Ctrl/⌘+H` — replace · `Ctrl/⌘+K` — link · `Ctrl/⌘+P` — print.
127
+ `Ctrl/⌘+B`, `I`, `U` — bold, italic, underline · `Ctrl/⌘+Shift+H` — highlight · `Ctrl/⌘+Z`, `Ctrl/⌘+Shift+Z` — undo,
128
+ redo · `Ctrl/⌘+F` — find · `Ctrl/⌘+H` — replace · `Ctrl/⌘+K` — link · `Ctrl/⌘+P` — print.
129
+
130
+ The full list, with Markdown-like input rules, is in the
131
+ [keyboard shortcuts guide](https://nuvra-docs.vercel.app/docs/keyboard-shortcuts).
127
132
 
128
133
  ## Translations
129
134
 
@@ -155,7 +160,9 @@ setEditorTranslator((key, named) => (i18n.global.te(key) ? i18n.global.t(key, na
155
160
 
156
161
  ## Theming
157
162
 
158
- Colors come from CSS variables declared on `.document-editor`. Override any of them there, or on an ancestor:
163
+ Colors come from CSS variables declared on `.document-editor` with zero specificity, so any rule that targets
164
+ `.document-editor` overrides them, whatever order the stylesheets load in. Set them on the editor element itself:
165
+ values on an ancestor such as `body` do not apply, because the editor declares its own.
159
166
 
160
167
  ```css
161
168
  .document-editor {
@@ -192,7 +199,8 @@ Colors come from CSS variables declared on `.document-editor`. Override any of t
192
199
  | `--nuvra-shadow` | Popovers and floating panels |
193
200
  | `--nuvra-fullscreen-z-index` | Stacking order of the fullscreen editor (`2000`) |
194
201
 
195
- A dark palette is applied when an ancestor (usually `<html>`) has the `dark` class or `data-theme="dark"`.
202
+ A dark palette is applied when an ancestor (usually `<html>`) has the `dark` class or `data-theme="dark"`. To change
203
+ dark values separately, target `.dark .document-editor`.
196
204
 
197
205
  To follow an Element Plus theme, map the variables to its own:
198
206
 
package/dist/index.js CHANGED
@@ -5471,7 +5471,7 @@ var P = /* @__PURE__ */ new Set([
5471
5471
  U = e, Pe();
5472
5472
  }, Ie = (e) => {
5473
5473
  let t = e.ctrlKey || e.metaKey, n = e.code;
5474
- t && !e.altKey && !e.shiftKey && n === "KeyF" ? (e.preventDefault(), J(!1)) : t && !e.altKey && n === "KeyH" ? (e.preventDefault(), J(!0)) : t && n === "KeyK" && !i.disabled && !P.value ? (e.preventDefault(), w.value?.openLink()) : t && n === "KeyP" ? (e.preventDefault(), ke()) : e.key === "Escape" && F.value ? (e.stopPropagation(), we()) : e.key === "Escape" && N.value && (e.stopPropagation(), N.value = !1);
5474
+ t && !e.altKey && !e.shiftKey && n === "KeyF" ? (e.preventDefault(), J(!1)) : t && !e.altKey && !e.shiftKey && n === "KeyH" ? (e.preventDefault(), J(!0)) : t && n === "KeyK" && !i.disabled && !P.value ? (e.preventDefault(), w.value?.openLink()) : t && n === "KeyP" ? (e.preventDefault(), ke()) : e.key === "Escape" && F.value ? (e.stopPropagation(), we()) : e.key === "Escape" && N.value && (e.stopPropagation(), N.value = !1);
5475
5475
  };
5476
5476
  return j(f, (e) => {
5477
5477
  let t = E.value;
@@ -5629,7 +5629,7 @@ var P = /* @__PURE__ */ new Set([
5629
5629
  }, null, 8, ["engine", "scroll-target"])) : l("", !0)
5630
5630
  ], 16)], 8, ["to", "disabled"]));
5631
5631
  }
5632
- }), [["__scopeId", "data-v-e22a5e8e"]]), wc = /* @__PURE__ */ m({
5632
+ }), [["__scopeId", "data-v-75b7da51"]]), wc = /* @__PURE__ */ m({
5633
5633
  name: "RichTextEditor",
5634
5634
  __name: "editor",
5635
5635
  props: /*@__PURE__*/ g({