@kungal/editor-vue 0.34.0 → 0.35.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,47 @@
1
1
  # @kungal/editor-vue
2
2
 
3
+ ## 0.35.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c90e1b9: fix(link): give a typed URL the scheme it needs, in ONE place
8
+
9
+ Typing `www.kungal.com/topic/1` into any link input produced a **relative**
10
+ href: with no scheme the browser resolves it against the current page, so the
11
+ link went to `<origin>/<current/path>/www.kungal.com/topic/1` — dead, and dead
12
+ in a way the author can't see while writing.
13
+
14
+ `insertLinkCommand` now normalizes its `href`, and since every link entry point
15
+ (the selection bubble's input, the headless toolbar's URL panel, the KunUI
16
+ toolbar's popover, and a host's own `linkPrompt` adapter) dispatches that one
17
+ command, all of them are fixed at once — a host must not re-implement this.
18
+
19
+ - `www.kungal.com/topic/1` → `https://www.kungal.com/topic/1` (https, not http:
20
+ an http-only site redirects, an https-only site doesn't). Ports, queries,
21
+ fragments and bare IPv4 hosts included.
22
+ - `me@kungal.com` → `mailto:me@kungal.com` (`https://` would read the address as
23
+ userinfo and go nowhere).
24
+ - Untouched: anything with a scheme — `kungal-user:` / `kungal-reply:` included
25
+ — and anything explicitly relative (`/x`, `./x`, `../x`, `#x`, `?x`, `//host`).
26
+ - The one ambiguous input is a lone dotted word: `readme.md` looks exactly like
27
+ a hostname (`.md` is a TLD), so it gets `https://`. Write `./readme.md` when a
28
+ relative file is what you mean.
29
+
30
+ The rule is also exported as `normalizeLinkHref(input)` from the light,
31
+ zero-dependency `@kungal/editor-core` entry, so a server can normalize legacy
32
+ content with the exact same logic.
33
+
34
+ Along with it, the three URL inputs move from `type="url"` to `type="text"` +
35
+ `inputmode="url"`. Native URL validation rejects exactly the schemeless input
36
+ this change exists to accept — in the KunUI toolbar's popover, which submits a
37
+ real `<form>`, pressing Enter on `www.kungal.com/topic/1` did nothing at all.
38
+ The mobile keyboard hint is kept.
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [c90e1b9]
43
+ - @kungal/editor-core@0.35.0
44
+
3
45
  ## 0.34.0
4
46
 
5
47
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"LinkInput.vue.d.ts","sourceRoot":"","sources":["../../src/components/LinkInput.vue"],"names":[],"mappings":"AA0UA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"LinkInput.vue.d.ts","sourceRoot":"","sources":["../../src/components/LinkInput.vue"],"names":[],"mappings":"AA8UA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionTooltip.vue.d.ts","sourceRoot":"","sources":["../../src/components/SelectionTooltip.vue"],"names":[],"mappings":"AAkkBA,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":"AAukBA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
package/dist/index.js CHANGED
@@ -313,7 +313,8 @@ var Ne = [
313
313
  ref_key: "inputRef",
314
314
  ref: A,
315
315
  "onUpdate:modelValue": n[0] ||= (e) => k.value = e,
316
- type: "url",
316
+ type: "text",
317
+ inputmode: "url",
317
318
  class: "kun-editor__link-input",
318
319
  placeholder: g.value.linkUrl,
319
320
  "aria-label": g.value.linkUrl,
@@ -500,7 +501,8 @@ var Ne = [
500
501
  ref_key: "inputRef",
501
502
  ref: g,
502
503
  "onUpdate:modelValue": t[0] ||= (e) => d.value = e,
503
- type: "url",
504
+ type: "text",
505
+ inputmode: "url",
504
506
  class: "kun-editor__link-input",
505
507
  placeholder: s.value.linkUrl,
506
508
  "aria-label": s.value.linkUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/editor-vue",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "KunEditor Vue 3 layer — the headless <KunEditor> component (dual WYSIWYG / markdown-source), toolbar and plugin views. Ships zero CSS and no UI-kit dependency; consumes @kungal/editor-core, and pairs with @kungal/editor-nuxt for optional KunUI chrome.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@prosemirror-adapter/vue": "^0.4.6",
43
- "@kungal/editor-core": "0.34.0"
43
+ "@kungal/editor-core": "0.35.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@codemirror/lang-markdown": "^6.0.0",
@@ -80,7 +80,7 @@
80
80
  "vite": "^8.0.16",
81
81
  "vue": "^3.5.35",
82
82
  "vue-tsc": "^3.3.3",
83
- "@kungal/editor-core": "0.34.0"
83
+ "@kungal/editor-core": "0.35.0"
84
84
  },
85
85
  "scripts": {
86
86
  "build": "vite build && vue-tsc -p tsconfig.build.json",