@kungal/editor-vue 0.32.1 → 0.33.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/CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # @kungal/editor-vue
2
2
 
3
+ ## 0.33.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9294ba2: Insert a link from the selection bubble without a native `prompt`
8
+
9
+ Selecting text → 「链接」 used to pop `window.prompt`. The bubble now asks for the
10
+ URL **in place**: the button row swaps for a URL input (`data-mode="link"`),
11
+ Enter applies, Esc cancels, and the row comes back. If the selection is already
12
+ a link its href is prefilled (and selected), so editing a URL is the same flow.
13
+
14
+ Why in place, and not a popover/dialog: the bubble is a Milkdown tooltip whose
15
+ `shouldShow` keeps it alive only while focus is in the editor **or inside the
16
+ bubble element**. Any popover teleports its panel to `<body>` — outside that
17
+ element — so the bubble would hide the moment the panel's input took focus. An
18
+ input in our own DOM keeps the bubble put, and the ProseMirror selection
19
+ survives the DOM blur, so the link wraps exactly what was selected.
20
+
21
+ Still headless: a plain `<input>` plus one new class hook.
22
+
23
+ ```css
24
+ .kun-editor__bubble[data-mode="link"] {
25
+ /* the URL-entry state */
26
+ }
27
+ .kun-editor__bubble-input {
28
+ /* the input itself */
29
+ }
30
+ ```
31
+
32
+ Hosts that want their own UI keep the escape hatch — the `linkPrompt` adapter
33
+ takes precedence over the inline input, exactly as it does over the KunUI
34
+ toolbar's popover.
35
+
36
+ Also in the shipped reference stylesheet (`@kungal/editor-nuxt/editor.css`): the
37
+ selection bubble, the @mention dropdown and the sticker/emoji picker painted
38
+ themselves with `--color-background` — KunUI's _glassy page_ tint (0.7 alpha) —
39
+ so document text showed through a panel floating over it. They now use the
40
+ RAISED surface token the KunUI popovers use, via one overridable var:
41
+
42
+ ```css
43
+ :root {
44
+ --kun-editor-surface: var(--color-content1, var(--color-background));
45
+ }
46
+ ```
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies [9294ba2]
51
+ - @kungal/editor-core@0.33.0
52
+
3
53
  ## 0.32.1
4
54
 
5
55
  ### Patch Changes
@@ -95,11 +95,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, KunEditorEx
95
95
  "onUpdate:loading"?: ((loading: boolean) => any) | undefined;
96
96
  "onUpdate:headings"?: ((headings: KunHeading[]) => any) | undefined;
97
97
  }>, {
98
+ placeholder: string;
98
99
  adapters: KunEditorAdapters;
99
100
  features: KunEditorFeatures;
100
101
  locale: KunEditorLocale;
101
102
  readonly: boolean;
102
- placeholder: string;
103
103
  placeholderMode: "doc" | "block";
104
104
  selectionToolbar: boolean | KunSelectionItem[];
105
105
  views: ViewMode[];
@@ -1 +1 @@
1
- {"version":3,"file":"KunEditor.vue.d.ts","sourceRoot":"","sources":["../../src/components/KunEditor.vue"],"names":[],"mappings":"AA8bA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,UAAU,EACX,MAAM,qBAAqB,CAAA;AAQ5B,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAUjE,KAAK,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE9C,KAAK,WAAW,GAAG;IACf,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,qDAAqD;IACrD,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,eAAe,CAAC,EAAE,KAAK,GAAG,OAAO,CAAA;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAA;IAClB;oEACgE;IAChE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AAC;AAShD,QAAA,MAAM,UAAU;;;;;;;;;iBAzhBE,MAAM;cART,iBAAiB;cAEjB,iBAAiB;YAEnB,eAAe;cAEb,OAAO;qBAQA,KAAK,GAAG,OAAO;sBAgBd,OAAO,GAAG,gBAAgB,EAAE;WAVvC,QAAQ,EAAE;gBAGL,OAAO;6EA+gBtB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionTooltip.vue.d.ts","sourceRoot":"","sources":["../../src/components/SelectionTooltip.vue"],"names":[],"mappings":"AA8UA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"SelectionTooltip.vue.d.ts","sourceRoot":"","sources":["../../src/components/SelectionTooltip.vue"],"names":[],"mappings":"AA0lBA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}