@kungal/editor-nuxt 0.33.0 → 0.34.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/editor.css +44 -17
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @kungal/editor-nuxt
2
2
 
3
+ ## 0.34.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ab7fbc2: No native `prompt` left: the headless toolbar gets a link URL panel too
8
+
9
+ 0.33.0 gave the selection bubble an inline URL input; the fixed (headless)
10
+ toolbar still popped `window.prompt`. It now opens a small panel under the link
11
+ button — Enter applies, Esc cancels, clicking outside closes, and the editor
12
+ gets focus back. Same behaviour as the bubble otherwise: an existing href is
13
+ prefilled (and selected), and with nothing selected the URL is inserted as
14
+ linked text. A panel rather than an in-place swap because a fixed toolbar row
15
+ that rearranges itself is jarring; the bubble is already a floating layer, so
16
+ there the swap is the right shape.
17
+
18
+ **Breaking (CSS hook, one version old):** `.kun-editor__bubble-input` →
19
+ `.kun-editor__link-input`. Both entry points render the same input, so the hook
20
+ is named after the thing, not the place. Hosts importing
21
+ `@kungal/editor-nuxt/editor.css` need no change; a copied stylesheet wants the
22
+ rename plus the two new hooks:
23
+
24
+ ```css
25
+ .kun-editor__link {
26
+ position: relative;
27
+ } /* structural */
28
+ .kun-editor__link-panel {
29
+ position: absolute;
30
+ } /* structural */
31
+ .kun-editor__link-input {
32
+ /* shared by the toolbar panel and the bubble */
33
+ }
34
+ ```
35
+
36
+ `linkPrompt` keeps taking precedence over all three built-in entries (bubble
37
+ input, toolbar panel, KunUI popover), so a host modal is still one override.
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies [ab7fbc2]
42
+ - @kungal/editor-core@0.34.0
43
+ - @kungal/editor-vue@0.34.0
44
+
3
45
  ## 0.33.0
4
46
 
5
47
  ### Minor Changes
package/editor.css CHANGED
@@ -166,23 +166,6 @@
166
166
  .kun-editor__bubble-btn:hover {
167
167
  background: var(--color-default-100);
168
168
  }
169
- /* Link entry: the bubble swaps its button row for this URL input in place
170
- (data-mode="link"), so no second floating layer is involved. */
171
- .kun-editor__bubble-input {
172
- width: 14rem;
173
- min-width: 0;
174
- padding: 0.25rem 0.5rem;
175
- border: 1px solid var(--color-default-200);
176
- border-radius: 0.375rem;
177
- background: transparent;
178
- color: var(--color-foreground);
179
- font: inherit;
180
- font-size: 0.875rem;
181
- outline: none;
182
- }
183
- .kun-editor__bubble-input:focus {
184
- border-color: var(--color-primary);
185
- }
186
169
 
187
170
  /* ── Loading placeholder (WYSIWYG create/hydrate gap) ───────────────────── */
188
171
  /* Shown while Milkdown hydrates; reserves height so the area doesn't collapse. */
@@ -270,6 +253,50 @@
270
253
  display: inline-flex;
271
254
  }
272
255
 
256
+ /* ── Link URL entry ─────────────────────────────────────────────────────── */
257
+ /* Two shapes, one input hook. The selection bubble swaps its button row for the
258
+ input IN PLACE (it is itself a floating tooltip — see `[data-mode='link']`);
259
+ the fixed toolbar, being a static row, opens this small panel under its
260
+ button instead. */
261
+ .kun-editor__link {
262
+ position: relative;
263
+ display: inline-flex;
264
+ }
265
+
266
+ .kun-editor__link-panel {
267
+ position: absolute;
268
+ top: calc(100% + 0.25rem);
269
+ left: 0;
270
+ z-index: 30;
271
+ display: flex;
272
+ align-items: center;
273
+ gap: 0.25rem;
274
+ padding: 0.375rem;
275
+ background: var(--kun-editor-surface);
276
+ border: 1px solid var(--color-default-200);
277
+ border-radius: 0.5rem;
278
+ box-shadow:
279
+ 0 4px 6px -1px rgb(0 0 0 / 0.1),
280
+ 0 2px 4px -2px rgb(0 0 0 / 0.1);
281
+ }
282
+
283
+ .kun-editor__link-input {
284
+ width: 14rem;
285
+ min-width: 0;
286
+ padding: 0.25rem 0.5rem;
287
+ border: 1px solid var(--color-default-200);
288
+ border-radius: 0.375rem;
289
+ background: transparent;
290
+ color: var(--color-foreground);
291
+ font: inherit;
292
+ font-size: 0.875rem;
293
+ outline: none;
294
+ }
295
+
296
+ .kun-editor__link-input:focus {
297
+ border-color: var(--color-primary);
298
+ }
299
+
273
300
  /* ── Markdown source (CodeMirror) ───────────────────────────────────────── */
274
301
  .kun-editor__source .cm-editor {
275
302
  border: 1px solid var(--color-default-200);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/editor-nuxt",
3
- "version": "0.33.0",
3
+ "version": "0.34.0",
4
4
  "description": "KunEditor Nuxt Layer — wraps @kungal/editor-vue and auto-imports <KunEditor> so an existing Nuxt app keeps its exact DX (no import needed).",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -32,8 +32,8 @@
32
32
  "nuxt.config.ts"
33
33
  ],
34
34
  "dependencies": {
35
- "@kungal/editor-core": "0.33.0",
36
- "@kungal/editor-vue": "0.33.0"
35
+ "@kungal/editor-core": "0.34.0",
36
+ "@kungal/editor-vue": "0.34.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@kungal/ui-vue": "^2.7.0",