@cocoar/vue-markdown-editor 1.13.1 → 1.15.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.
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ /** Sanitized color currently active at the selection, or null. */
3
+ currentColor: string | null;
4
+ /** Callback invoked with `null` to clear, or a hex/css color string to apply. */
5
+ pick: (color: string | null) => void;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
8
+ export default _default;
9
+ //# sourceMappingURL=ColorPickerPanel.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorPickerPanel.vue.d.ts","sourceRoot":"","sources":["../../src/text-color/ColorPickerPanel.vue"],"names":[],"mappings":"AA+IA,KAAK,WAAW,GAAG;IACjB,kEAAkE;IAClE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,iFAAiF;IACjF,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACtC,CAAC;;AAoGF,wBAOG"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Public surface for the text-color slice of the markdown editor.
3
+ *
4
+ * Consumers register the bundle once via `.use(textColor)` and pick up the
5
+ * mark, the DOM parsing rule, and the markdown round-trip in one call.
6
+ *
7
+ * `COAR_TEXT_COLOR_PALETTE` is the canonical 8-swatch palette wired into the
8
+ * built-in toolbar — exported so consumers can reuse the same set when they
9
+ * embed the editor and want their own picker UI to match.
10
+ */
11
+ export { textColor, textColorMark, textColorRemark } from './textColorMark';
12
+ /**
13
+ * Default 8 swatches used by the built-in color picker. Hex values were
14
+ * chosen for adequate contrast on both the light and dark Cocoar themes —
15
+ * pure CSS-token colors (e.g. `var(--coar-text-semantic-error)`) would
16
+ * round-trip through `sanitizeColor` as rejected (it intentionally bans
17
+ * `var()` to keep the whitelist tight), so we use resolved hex instead.
18
+ */
19
+ export declare const COAR_TEXT_COLOR_PALETTE: readonly {
20
+ readonly name: string;
21
+ readonly value: string;
22
+ }[];
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/text-color/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE5E;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAU/F,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { MilkdownPlugin } from '@milkdown/ctx';
2
+ export declare const textColorRemark: import('@milkdown/utils').$Remark<"textColor", unknown>;
3
+ export declare const textColorMark: import('@milkdown/utils').$MarkSchema<"text_color">;
4
+ export declare const textColor: MilkdownPlugin[];
5
+ //# sourceMappingURL=textColorMark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textColorMark.d.ts","sourceRoot":"","sources":["../../src/text-color/textColorMark.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAuHpD,eAAO,MAAM,eAAe,yDAAoD,CAAC;AA+FjF,eAAO,MAAM,aAAa,qDAAoD,CAAC;AAI/E,eAAO,MAAM,SAAS,EAAE,cAAc,EAA4C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocoar/vue-markdown-editor",
3
- "version": "1.13.1",
3
+ "version": "1.15.0",
4
4
  "description": "WYSIWYG Markdown editor for Vue 3 based on Milkdown, with Cocoar Design System styling",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -42,11 +42,13 @@
42
42
  "lint": "eslint src/"
43
43
  },
44
44
  "peerDependencies": {
45
- "@cocoar/vue-markdown": "1.13.1",
46
- "@cocoar/vue-ui": "1.13.1",
45
+ "@cocoar/vue-markdown": "1.15.0",
46
+ "@cocoar/vue-markdown-core": "1.15.0",
47
+ "@cocoar/vue-ui": "1.15.0",
47
48
  "vue": "^3.5.0"
48
49
  },
49
50
  "dependencies": {
51
+ "unified": "^11.0.5",
50
52
  "@milkdown/core": "^7.20.0",
51
53
  "@milkdown/ctx": "^7.20.0",
52
54
  "@milkdown/kit": "^7.20.0",
@@ -61,7 +63,9 @@
61
63
  },
62
64
  "devDependencies": {
63
65
  "@cocoar/vue-markdown": "workspace:*",
66
+ "@cocoar/vue-markdown-core": "workspace:*",
64
67
  "@cocoar/vue-ui": "workspace:*",
68
+ "@types/mdast": "^4.0.4",
65
69
  "vue": "^3.5.32"
66
70
  }
67
71
  }