@me-framework/me-ui-antdv-next 0.0.28 → 0.0.30

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 (38) hide show
  1. package/dist/chunks/modal-D4Tl-Qzk.js +166 -0
  2. package/dist/chunks/skeleton-D1-aYUPf.js +135 -0
  3. package/dist/code-box/code-item.vue.d.ts +14 -0
  4. package/dist/code-box/index.css +1 -0
  5. package/dist/code-box/index.d.ts +5 -0
  6. package/dist/code-box/index.js +178 -0
  7. package/dist/code-box/index.vue.d.ts +20 -0
  8. package/dist/code-box/types.d.ts +64 -0
  9. package/dist/env.d.ts +12 -0
  10. package/dist/index.d.ts +5 -1
  11. package/dist/input-gps/index.js +1 -1
  12. package/dist/input-gps/index.vue.d.ts +1 -1
  13. package/dist/input-icon-selector/index.vue.d.ts +1 -1
  14. package/dist/input-property/index.css +1 -0
  15. package/dist/input-property/index.d.ts +5 -0
  16. package/dist/input-property/index.js +821 -0
  17. package/dist/input-property/index.vue.d.ts +21 -0
  18. package/dist/input-property/types.d.ts +114 -0
  19. package/dist/input-property/validate.d.ts +75 -0
  20. package/dist/load-json/index.css +1 -1
  21. package/dist/load-json/index.js +89 -123
  22. package/dist/load-json/index.vue.d.ts +3 -3
  23. package/dist/me-ui-antdv-next.js +4934 -1528
  24. package/dist/me-ui-antdv-next.umd.cjs +11 -9
  25. package/dist/message/index.vue.d.ts +1 -1
  26. package/dist/modal/index.css +1 -1
  27. package/dist/modal/index.js +7 -1
  28. package/dist/modal/index.vue.d.ts +26 -5
  29. package/dist/modal/types.d.ts +47 -7
  30. package/dist/nav/index.vue.d.ts +3 -3
  31. package/dist/resolver/index.js +4 -1
  32. package/dist/skeleton/index.js +5 -138
  33. package/dist/style.css +1 -1
  34. package/dist/tree-menu/TreeMenuEdit.vue.d.ts +1 -1
  35. package/dist/tree-menu/index.vue.d.ts +1 -1
  36. package/dist/utils/hljs.d.ts +19 -0
  37. package/package.json +2 -2
  38. package/dist/chunks/modal-KBZYtIHD.js +0 -178
@@ -110,9 +110,9 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
110
110
  size: "small" | "large" | "middle";
111
111
  form: MeTreeMenuData;
112
112
  label: string;
113
+ list: MeTreeMenuData[];
113
114
  iconfontData: string[];
114
115
  rules: Record<string, any[]>;
115
- list: MeTreeMenuData[];
116
116
  titleType: MeTreeMenuTitleType;
117
117
  editTitle: string;
118
118
  iconSources: MeInputIconSelectorSource[];
@@ -307,10 +307,10 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
307
307
  }>, {
308
308
  form: MeTreeMenuData;
309
309
  label: string;
310
+ list: MeTreeMenuData[];
310
311
  iconfontData: string[];
311
312
  draggable: boolean;
312
313
  leftWidth: string | number;
313
- list: MeTreeMenuData[];
314
314
  showLine: boolean;
315
315
  actions: MeTreeMenuAction[];
316
316
  editTitle: string;
@@ -0,0 +1,19 @@
1
+ import { default as hljs } from 'highlight.js/lib/core';
2
+ /**
3
+ * 对高亮后的 HTML 添加行号,返回带编号列的表格结构。
4
+ * 自实现(复用 highlightjs-line-numbers.js 的算法思路)而非引入该插件:
5
+ * 插件为依赖 window.hljs 的 IIFE,动态 import 会破坏 UMD 库构建,静态 import 又无法保证
6
+ * 挂载顺序且访问 window/document 影响 Node 下 import 库。
7
+ *
8
+ * @param html - highlight.js 输出的 HTML
9
+ * @param singleLine - 单行代码是否也显示行号,默认 true
10
+ */
11
+ export declare const addLineNumbers: (html: string, singleLine?: boolean) => string;
12
+ /**
13
+ * 语法高亮代码片段。
14
+ * @param code - 原始代码文本
15
+ * @param language - 语言标识(如 vue/ts/js/html/css/scss/json/bash)
16
+ * @returns 高亮后的 HTML(hljs 已对代码转义,可安全 v-html)
17
+ */
18
+ export declare const highlightCode: (code: string, language?: string) => string;
19
+ export default hljs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@me-framework/me-ui-antdv-next",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "description": "A Vue 3 + TypeScript UI component library",
5
5
  "type": "module",
6
6
  "main": "./dist/me-ui-antdv-next.umd.cjs",
@@ -68,7 +68,6 @@
68
68
  "@types/node": "^26.2.0",
69
69
  "@typescript/typescript6": "^6.0.2",
70
70
  "@vitejs/plugin-vue": "^6.0.8",
71
- "highlight.js": "^11.12.0",
72
71
  "highlightjs-line-numbers.js": "^2.9.1",
73
72
  "marked": "^18.0.10",
74
73
  "puppeteer": "^25.9.0",
@@ -84,6 +83,7 @@
84
83
  },
85
84
  "dependencies": {
86
85
  "@amap/amap-jsapi-loader": "^1.0.1",
86
+ "highlight.js": "^11.12.0",
87
87
  "@lucide/vue": "^1.41.0",
88
88
  "remixicon": "^4.9.1",
89
89
  "antdv-next": "^1.5.2",
@@ -1,178 +0,0 @@
1
- import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeProps as c, onMounted as l, onUnmounted as u, openBlock as d, ref as f, renderSlot as p, resolveComponent as m, resolveDynamicComponent as h, toDisplayString as g, unref as _, useAttrs as v, withCtx as y, withModifiers as b } from "vue";
2
- import { Maximize as x, Minimize as S } from "@lucide/vue";
3
- import { theme as C } from "antdv-next";
4
- //#region src/components/modal/index.vue?vue&type=script&setup=true&lang.ts
5
- var w = { class: "me-modal__title-row" }, T = { class: "me-modal__title-text" }, E = ["title"], D = /* @__PURE__ */ s({
6
- name: "MeModal",
7
- __name: "index",
8
- props: {
9
- open: {
10
- type: Boolean,
11
- default: !1
12
- },
13
- fullscreen: {
14
- type: Boolean,
15
- default: !0
16
- },
17
- defaultFullscreen: {
18
- type: Boolean,
19
- default: !1
20
- },
21
- width: { default: 520 },
22
- _semanticOmit: {},
23
- _renderSemanticContent: {},
24
- confirmLoading: { type: Boolean },
25
- title: {},
26
- afterClose: {},
27
- afterOpenChange: {},
28
- centered: { type: Boolean },
29
- okText: {},
30
- okType: {},
31
- cancelText: {},
32
- forceRender: { type: Boolean },
33
- okButtonProps: {},
34
- cancelButtonProps: {},
35
- destroyOnClose: { type: Boolean },
36
- destroyOnHidden: { type: Boolean },
37
- wrapClassName: {},
38
- maskTransitionName: {},
39
- transitionName: {},
40
- rootClass: {},
41
- rootStyle: {},
42
- getContainer: { type: [
43
- String,
44
- Function,
45
- Boolean
46
- ] },
47
- zIndex: {},
48
- bodyStyle: {},
49
- maskStyle: {},
50
- mask: { type: [Object, Boolean] },
51
- maskClosable: { type: Boolean },
52
- keyboard: { type: Boolean },
53
- scrollLock: { type: Boolean },
54
- wrapProps: {},
55
- prefixCls: {},
56
- closeIcon: {},
57
- modalRender: {},
58
- focusTriggerAfterClose: { type: Boolean },
59
- mousePosition: {},
60
- loading: { type: Boolean },
61
- focusable: {},
62
- footer: {},
63
- closable: { type: [Boolean, Object] },
64
- classes: {},
65
- styles: {},
66
- className: {},
67
- children: { type: [
68
- Object,
69
- String,
70
- Number,
71
- null,
72
- Boolean,
73
- Array
74
- ] },
75
- visible: { type: Boolean },
76
- wrapStyle: {},
77
- height: {},
78
- bodyProps: {},
79
- maskProps: {},
80
- rootClassName: {},
81
- panelRef: {},
82
- onOk: {},
83
- onCancel: {},
84
- "onUpdate:open": {}
85
- },
86
- emits: [
87
- "update:open",
88
- "fullscreen-change",
89
- "ok",
90
- "cancel"
91
- ],
92
- setup(s, { expose: D, emit: O }) {
93
- let { defaultAlgorithm: k, darkAlgorithm: A } = C, j = s, M = O, N = v(), P = x, F = S, I = e(() => !!j.loading), L = e(() => j.title ?? ""), R = e(() => {
94
- let { open: e, fullscreen: t, defaultFullscreen: n, width: r, loading: i, "onUpdate:open": a, "onFullscreen-change": o, onOk: s, onCancel: c, ...l } = N;
95
- return l;
96
- }), z = e(() => j.fullscreen), B = e({
97
- get: () => j.open,
98
- set: (e) => {
99
- M("update:open", e);
100
- }
101
- }), V = f(j.defaultFullscreen), H = () => {
102
- V.value = !V.value, M("fullscreen-change", V.value);
103
- }, U = (e) => {
104
- M("cancel", e);
105
- }, W = (e) => {
106
- M("ok", e);
107
- }, G = e(() => V.value ? "100%" : j.width), K = e(() => {
108
- let e = ["me-modal-wrap"];
109
- return V.value && e.push("me-modal-wrap--fullscreen"), e.join(" ");
110
- }), q = f(!1), J = () => {
111
- typeof document < "u" && (q.value = document.documentElement.classList.contains("dark"));
112
- }, Y = null;
113
- l(() => {
114
- J(), typeof document < "u" && (Y = new MutationObserver(() => {
115
- J();
116
- }), Y.observe(document.documentElement, {
117
- attributes: !0,
118
- attributeFilter: ["class"]
119
- }));
120
- }), u(() => {
121
- Y?.disconnect(), Y = null;
122
- });
123
- let X = e(() => ({
124
- algorithm: q.value ? A : k,
125
- token: { borderRadius: 6 }
126
- }));
127
- return D({
128
- toggleFullscreen: H,
129
- isFullscreen: V
130
- }), (e, s) => {
131
- let l = m("a-skeleton"), u = m("a-modal"), f = m("a-config-provider");
132
- return d(), t(f, { theme: X.value }, {
133
- default: y(() => [o(u, c({
134
- open: B.value,
135
- "onUpdate:open": s[0] ||= (e) => B.value = e,
136
- width: G.value,
137
- "wrap-class-name": K.value,
138
- class: ["me-modal", {
139
- "me-modal--fullscreen": V.value,
140
- "me-modal--has-fullscreen": z.value
141
- }]
142
- }, R.value, {
143
- onCancel: U,
144
- onOk: W
145
- }), {
146
- title: y(() => [i("div", w, [i("span", T, [p(e.$slots, "title", {}, () => [a(g(L.value), 1)])]), z.value ? (d(), r("span", {
147
- key: 0,
148
- class: "me-modal__fullscreen-btn",
149
- role: "button",
150
- title: V.value ? "退出全屏" : "全屏",
151
- onClick: b(H, ["stop"])
152
- }, [(d(), t(h(V.value ? _(F) : _(P)), { size: 16 }))], 8, E)) : n("", !0)])]),
153
- default: y(() => [I.value ? (d(), t(l, {
154
- key: 0,
155
- active: "",
156
- paragraph: { rows: 4 },
157
- class: "me-modal__skeleton"
158
- })) : p(e.$slots, "default", {}, void 0, void 0, 1)]),
159
- _: 3
160
- }, 16, [
161
- "open",
162
- "width",
163
- "wrap-class-name",
164
- "class"
165
- ])]),
166
- _: 3
167
- }, 8, ["theme"]);
168
- };
169
- }
170
- });
171
- //#endregion
172
- //#region src/components/modal/index.ts
173
- D.install = (e) => {
174
- e.component("MeModal", D);
175
- };
176
- var O = D;
177
- //#endregion
178
- export { D as n, O as t };