@antdv-next/x 1.1.2 → 1.1.3-beta.2
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/dist/index.umd.js +25 -3
- package/dist/mermaid/Mermaid.d.ts +10 -1
- package/dist/mermaid/Mermaid.js +20 -1
- package/dist/mermaid/index.d.ts +1 -1
- package/dist/package.js +1 -1
- package/dist/sender/style/index.js +2 -1
- package/dist/sender/style/slot-textarea.js +2 -0
- package/es/antdv-next-x.esm.js +73 -55
- package/package.json +8 -2
package/dist/index.umd.js
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs);
|
|
50
50
|
shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs);
|
|
51
51
|
//#region package.json
|
|
52
|
-
var version = "1.1.2";
|
|
52
|
+
var version = "1.1.3-beta.2";
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region components/x-provider/context.ts
|
|
55
55
|
var XProviderContextKey = Symbol("antdv-next-x-provider-context");
|
|
@@ -7307,19 +7307,30 @@
|
|
|
7307
7307
|
isDragging.value = false;
|
|
7308
7308
|
}
|
|
7309
7309
|
function handleZoomIn() {
|
|
7310
|
+
if (mergedRenderType.value !== RenderType.Image) return;
|
|
7310
7311
|
scale.value = Math.min(scale.value + .2, 3);
|
|
7311
7312
|
}
|
|
7312
7313
|
function handleZoomOut() {
|
|
7314
|
+
if (mergedRenderType.value !== RenderType.Image) return;
|
|
7313
7315
|
scale.value = Math.max(scale.value - .2, .5);
|
|
7314
7316
|
}
|
|
7315
7317
|
function handleReset() {
|
|
7318
|
+
if (mergedRenderType.value !== RenderType.Image) return;
|
|
7316
7319
|
scale.value = 1;
|
|
7317
7320
|
position.value = {
|
|
7318
7321
|
x: 0,
|
|
7319
7322
|
y: 0
|
|
7320
7323
|
};
|
|
7321
7324
|
}
|
|
7325
|
+
async function handleCopy() {
|
|
7326
|
+
try {
|
|
7327
|
+
await navigator.clipboard.writeText(props.content);
|
|
7328
|
+
} catch (error) {
|
|
7329
|
+
warning(false, "Mermaid", `Copy failed: ${String(error)}`);
|
|
7330
|
+
}
|
|
7331
|
+
}
|
|
7322
7332
|
function handleDownload() {
|
|
7333
|
+
if (mergedRenderType.value !== RenderType.Image) return;
|
|
7323
7334
|
const svgElement = graphRef.value?.querySelector("svg");
|
|
7324
7335
|
if (!svgElement) return;
|
|
7325
7336
|
const svgString = new XMLSerializer().serializeToString(svgElement);
|
|
@@ -7379,7 +7390,15 @@
|
|
|
7379
7390
|
});
|
|
7380
7391
|
function renderHeader() {
|
|
7381
7392
|
if (props.header === null) return null;
|
|
7382
|
-
if (slots.header) return slots.header(
|
|
7393
|
+
if (slots.header) return slots.header({
|
|
7394
|
+
renderType: mergedRenderType.value,
|
|
7395
|
+
setRenderType: switchRenderType,
|
|
7396
|
+
zoomIn: handleZoomIn,
|
|
7397
|
+
zoomOut: handleZoomOut,
|
|
7398
|
+
resetZoom: handleReset,
|
|
7399
|
+
download: handleDownload,
|
|
7400
|
+
copy: handleCopy
|
|
7401
|
+
});
|
|
7383
7402
|
if (props.header !== void 0) return props.header;
|
|
7384
7403
|
return (0, vue.createVNode)("div", {
|
|
7385
7404
|
"class": [`${props.prefixCls}-header`, mergedClasses.value.header],
|
|
@@ -9250,6 +9269,7 @@
|
|
|
9250
9269
|
const { componentCls, antCls, calc } = token;
|
|
9251
9270
|
const slotCls = `${componentCls}-slot`;
|
|
9252
9271
|
const antInputCls = `${antCls}-input`;
|
|
9272
|
+
const antInputBorderlessCls = `${antInputCls}-borderless`;
|
|
9253
9273
|
const antDropdownCls = `${antCls}-dropdown-trigger`;
|
|
9254
9274
|
const slotInputCls = `${componentCls}-slot-input`;
|
|
9255
9275
|
const slotSelectCls = `${componentCls}-slot-select`;
|
|
@@ -9289,6 +9309,7 @@
|
|
|
9289
9309
|
fontSize: "inherit",
|
|
9290
9310
|
lineHeight: "inherit",
|
|
9291
9311
|
position: "relative",
|
|
9312
|
+
[`&${antInputBorderlessCls}`]: { "&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)": { outline: "none" } },
|
|
9292
9313
|
[`&::placeholder`]: {
|
|
9293
9314
|
color: token.colorTextSlotPlaceholder,
|
|
9294
9315
|
fontSize: "inherit",
|
|
@@ -9494,7 +9515,8 @@
|
|
|
9494
9515
|
flex: "auto",
|
|
9495
9516
|
alignSelf: "center",
|
|
9496
9517
|
caretColor: token.colorPrimary,
|
|
9497
|
-
fontSize: token.fontSize
|
|
9518
|
+
fontSize: token.fontSize,
|
|
9519
|
+
[`&${antCls}-input-borderless`]: { "&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)": { outline: "none" } }
|
|
9498
9520
|
},
|
|
9499
9521
|
[`${componentCls}-actions-list`]: {
|
|
9500
9522
|
flex: "none",
|
|
@@ -28,11 +28,20 @@ export interface MermaidProps extends Omit<HTMLAttributes, "content" | "class" |
|
|
|
28
28
|
export interface MermaidRef {
|
|
29
29
|
nativeElement: HTMLDivElement;
|
|
30
30
|
}
|
|
31
|
+
export interface MermaidHeaderSlotScope {
|
|
32
|
+
renderType: MermaidRenderType;
|
|
33
|
+
setRenderType: (type: MermaidRenderType) => void;
|
|
34
|
+
zoomIn: () => void;
|
|
35
|
+
zoomOut: () => void;
|
|
36
|
+
resetZoom: () => void;
|
|
37
|
+
download: () => void;
|
|
38
|
+
copy: () => Promise<void>;
|
|
39
|
+
}
|
|
31
40
|
export interface MermaidSlots {
|
|
32
41
|
/**
|
|
33
42
|
* 自定义头部区,优先级高于 `header` 属性
|
|
34
43
|
*/
|
|
35
|
-
header?: () => VNodeChild;
|
|
44
|
+
header?: (scope: MermaidHeaderSlotScope) => VNodeChild;
|
|
36
45
|
}
|
|
37
46
|
declare enum RenderType {
|
|
38
47
|
Code = "code",
|
package/dist/mermaid/Mermaid.js
CHANGED
|
@@ -228,19 +228,30 @@ var XMermaid = /* @__PURE__ */ defineComponent({
|
|
|
228
228
|
isDragging.value = false;
|
|
229
229
|
}
|
|
230
230
|
function handleZoomIn() {
|
|
231
|
+
if (mergedRenderType.value !== RenderType.Image) return;
|
|
231
232
|
scale.value = Math.min(scale.value + .2, 3);
|
|
232
233
|
}
|
|
233
234
|
function handleZoomOut() {
|
|
235
|
+
if (mergedRenderType.value !== RenderType.Image) return;
|
|
234
236
|
scale.value = Math.max(scale.value - .2, .5);
|
|
235
237
|
}
|
|
236
238
|
function handleReset() {
|
|
239
|
+
if (mergedRenderType.value !== RenderType.Image) return;
|
|
237
240
|
scale.value = 1;
|
|
238
241
|
position.value = {
|
|
239
242
|
x: 0,
|
|
240
243
|
y: 0
|
|
241
244
|
};
|
|
242
245
|
}
|
|
246
|
+
async function handleCopy() {
|
|
247
|
+
try {
|
|
248
|
+
await navigator.clipboard.writeText(props.content);
|
|
249
|
+
} catch (error) {
|
|
250
|
+
warning(false, "Mermaid", `Copy failed: ${String(error)}`);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
243
253
|
function handleDownload() {
|
|
254
|
+
if (mergedRenderType.value !== RenderType.Image) return;
|
|
244
255
|
const svgElement = graphRef.value?.querySelector("svg");
|
|
245
256
|
if (!svgElement) return;
|
|
246
257
|
const svgString = new XMLSerializer().serializeToString(svgElement);
|
|
@@ -300,7 +311,15 @@ var XMermaid = /* @__PURE__ */ defineComponent({
|
|
|
300
311
|
});
|
|
301
312
|
function renderHeader() {
|
|
302
313
|
if (props.header === null) return null;
|
|
303
|
-
if (slots.header) return slots.header(
|
|
314
|
+
if (slots.header) return slots.header({
|
|
315
|
+
renderType: mergedRenderType.value,
|
|
316
|
+
setRenderType: switchRenderType,
|
|
317
|
+
zoomIn: handleZoomIn,
|
|
318
|
+
zoomOut: handleZoomOut,
|
|
319
|
+
resetZoom: handleReset,
|
|
320
|
+
download: handleDownload,
|
|
321
|
+
copy: handleCopy
|
|
322
|
+
});
|
|
304
323
|
if (props.header !== void 0) return props.header;
|
|
305
324
|
return createVNode("div", {
|
|
306
325
|
"class": [`${props.prefixCls}-header`, mergedClasses.value.header],
|
package/dist/mermaid/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as Mermaid } from './Mermaid';
|
|
2
|
-
export type { MermaidActions, MermaidProps, MermaidRef, MermaidRenderType, MermaidSemanticType, MermaidSlots, } from './Mermaid';
|
|
2
|
+
export type { MermaidActions, MermaidHeaderSlotScope, MermaidProps, MermaidRef, MermaidRenderType, MermaidSemanticType, MermaidSlots, } from './Mermaid';
|
|
3
3
|
export default Mermaid;
|
package/dist/package.js
CHANGED
|
@@ -43,7 +43,8 @@ var genSenderStyle = (token) => {
|
|
|
43
43
|
flex: "auto",
|
|
44
44
|
alignSelf: "center",
|
|
45
45
|
caretColor: token.colorPrimary,
|
|
46
|
-
fontSize: token.fontSize
|
|
46
|
+
fontSize: token.fontSize,
|
|
47
|
+
[`&${antCls}-input-borderless`]: { "&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)": { outline: "none" } }
|
|
47
48
|
},
|
|
48
49
|
[`${componentCls}-actions-list`]: {
|
|
49
50
|
flex: "none",
|
|
@@ -4,6 +4,7 @@ var genSlotTextAreaStyle = (token) => {
|
|
|
4
4
|
const { componentCls, antCls, calc } = token;
|
|
5
5
|
const slotCls = `${componentCls}-slot`;
|
|
6
6
|
const antInputCls = `${antCls}-input`;
|
|
7
|
+
const antInputBorderlessCls = `${antInputCls}-borderless`;
|
|
7
8
|
const antDropdownCls = `${antCls}-dropdown-trigger`;
|
|
8
9
|
const slotInputCls = `${componentCls}-slot-input`;
|
|
9
10
|
const slotSelectCls = `${componentCls}-slot-select`;
|
|
@@ -43,6 +44,7 @@ var genSlotTextAreaStyle = (token) => {
|
|
|
43
44
|
fontSize: "inherit",
|
|
44
45
|
lineHeight: "inherit",
|
|
45
46
|
position: "relative",
|
|
47
|
+
[`&${antInputBorderlessCls}`]: { "&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)": { outline: "none" } },
|
|
46
48
|
[`&::placeholder`]: {
|
|
47
49
|
color: token.colorTextSlotPlaceholder,
|
|
48
50
|
fontSize: "inherit",
|
package/es/antdv-next-x.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { r as e } from "./chunk-WQLz0Won.js";
|
|
|
2
2
|
import { S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "./Serializer-D1JYN1kI.js";
|
|
3
3
|
import { Comment as C, Fragment as w, Teleport as T, Text as E, Transition as D, TransitionGroup as O, cloneVNode as k, computed as A, createTextVNode as j, createVNode as M, defineComponent as N, getCurrentInstance as P, getCurrentScope as F, h as I, inject as L, isVNode as R, markRaw as ee, mergeDefaults as z, mergeProps as B, nextTick as V, onBeforeMount as te, onBeforeUnmount as H, onBeforeUpdate as ne, onMounted as re, onScopeDispose as ie, onUnmounted as U, onUpdated as ae, provide as W, reactive as oe, ref as G, render as se, resolveDynamicComponent as ce, shallowReactive as le, shallowRef as K, toRaw as ue, toRef as de, toRefs as fe, toValue as pe, triggerRef as me, unref as he, useAttrs as ge, useId as _e, useSlots as ve, vShow as ye, watch as q, watchEffect as be, withDirectives as xe } from "vue";
|
|
4
4
|
//#region package.json
|
|
5
|
-
var Se = "1.1.2", Ce = "anticon", we = {}, Te = [
|
|
5
|
+
var Se = "1.1.3-beta.2", Ce = "anticon", we = {}, Te = [
|
|
6
6
|
"outlined",
|
|
7
7
|
"borderless",
|
|
8
8
|
"filled",
|
|
@@ -377,7 +377,7 @@ Ke.cancel = (e) => {
|
|
|
377
377
|
return Ge(e), He(t);
|
|
378
378
|
};
|
|
379
379
|
//#endregion
|
|
380
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
380
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/omit.js
|
|
381
381
|
function qe(e, t) {
|
|
382
382
|
let n = { ...e };
|
|
383
383
|
return Array.isArray(t) && t.forEach((e) => {
|
|
@@ -385,7 +385,7 @@ function qe(e, t) {
|
|
|
385
385
|
}), n;
|
|
386
386
|
}
|
|
387
387
|
//#endregion
|
|
388
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
388
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/props-util/index.js
|
|
389
389
|
function Je(e) {
|
|
390
390
|
return e && (e.type === C || e.type === w && e.children.length === 0 || e.type === E && e.children.trim() === "");
|
|
391
391
|
}
|
|
@@ -433,7 +433,7 @@ function tt(e) {
|
|
|
433
433
|
return e;
|
|
434
434
|
}
|
|
435
435
|
//#endregion
|
|
436
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
436
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/RenderComponent.js
|
|
437
437
|
function nt(e) {
|
|
438
438
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? !0 : e == null;
|
|
439
439
|
}
|
|
@@ -451,7 +451,7 @@ N((e, { attrs: t }) => () => {
|
|
|
451
451
|
props: ["render"]
|
|
452
452
|
});
|
|
453
453
|
//#endregion
|
|
454
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
454
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/classnames.js
|
|
455
455
|
function rt(e) {
|
|
456
456
|
let t = "";
|
|
457
457
|
if (typeof e == "string" || typeof e == "number") t += e;
|
|
@@ -476,7 +476,7 @@ function Y(...e) {
|
|
|
476
476
|
}
|
|
477
477
|
var X = Y;
|
|
478
478
|
//#endregion
|
|
479
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
479
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/hooks/useId.js
|
|
480
480
|
function it() {
|
|
481
481
|
return _e;
|
|
482
482
|
}
|
|
@@ -489,7 +489,7 @@ function st(e, t) {
|
|
|
489
489
|
return `${e}-${String(t).replace(/[^a-zA-Z0-9_.:-]/g, "-")}`;
|
|
490
490
|
}
|
|
491
491
|
//#endregion
|
|
492
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
492
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/hooks/useMergedState.js
|
|
493
493
|
function ct(e, t) {
|
|
494
494
|
let { defaultValue: n, value: r = G() } = t || {}, i = typeof e == "function" ? e() : e;
|
|
495
495
|
r.value !== void 0 && (i = he(r)), n !== void 0 && (i = typeof n == "function" ? n() : n);
|
|
@@ -507,7 +507,7 @@ function ct(e, t) {
|
|
|
507
507
|
}), [o, s];
|
|
508
508
|
}
|
|
509
509
|
//#endregion
|
|
510
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
510
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/warning.js
|
|
511
511
|
var lt = {}, ut = [];
|
|
512
512
|
function dt(e) {
|
|
513
513
|
ut.push(e);
|
|
@@ -551,7 +551,7 @@ function bt(e, ...t) {
|
|
|
551
551
|
}
|
|
552
552
|
var xt = Y;
|
|
553
553
|
//#endregion
|
|
554
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
554
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/Dom/class.js
|
|
555
555
|
function St(e, t) {
|
|
556
556
|
return e.classList ? e.classList.contains(t) : ` ${e.className} `.includes(` ${t} `);
|
|
557
557
|
}
|
|
@@ -688,12 +688,12 @@ function Jt(e, t) {
|
|
|
688
688
|
}), n;
|
|
689
689
|
}
|
|
690
690
|
//#endregion
|
|
691
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
691
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/Dom/canUseDom.js
|
|
692
692
|
function Yt() {
|
|
693
693
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
694
694
|
}
|
|
695
695
|
//#endregion
|
|
696
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
696
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/Dom/findDOMNode.js
|
|
697
697
|
function Xt(e) {
|
|
698
698
|
return e instanceof HTMLElement || e instanceof SVGElement;
|
|
699
699
|
}
|
|
@@ -708,7 +708,7 @@ function Qt(e) {
|
|
|
708
708
|
return !Yt() || Xt(t) ? t : t && "$el" in t ? t.$el : null;
|
|
709
709
|
}
|
|
710
710
|
//#endregion
|
|
711
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
711
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/Dom/isVisible.js
|
|
712
712
|
var $t = (e) => {
|
|
713
713
|
if (!e) return !1;
|
|
714
714
|
if (e instanceof Element) {
|
|
@@ -955,7 +955,7 @@ function un(e, t, n, r, i) {
|
|
|
955
955
|
}, { flush: "post" });
|
|
956
956
|
}
|
|
957
957
|
//#endregion
|
|
958
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
958
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/Dom/shadow.js
|
|
959
959
|
function dn(e) {
|
|
960
960
|
return e?.getRootNode?.();
|
|
961
961
|
}
|
|
@@ -2049,7 +2049,7 @@ function Or() {
|
|
|
2049
2049
|
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
|
|
2050
2050
|
}
|
|
2051
2051
|
//#endregion
|
|
2052
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
2052
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/Dom/contains.js
|
|
2053
2053
|
function kr(e, t) {
|
|
2054
2054
|
if (!e) return !1;
|
|
2055
2055
|
if (e.contains) return e.contains(t);
|
|
@@ -2061,7 +2061,7 @@ function kr(e, t) {
|
|
|
2061
2061
|
return !1;
|
|
2062
2062
|
}
|
|
2063
2063
|
//#endregion
|
|
2064
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
2064
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/Dom/dynamicCSS.js
|
|
2065
2065
|
var Ar = "data-vc-order", jr = "data-vc-priority", Mr = "vc-util-key", Nr = /* @__PURE__ */ new Map();
|
|
2066
2066
|
function Pr({ mark: e } = {}) {
|
|
2067
2067
|
return e ? e.startsWith("data-") ? e : `data-${e}` : Mr;
|
|
@@ -2113,7 +2113,7 @@ function Hr(e, t, n = {}) {
|
|
|
2113
2113
|
return i.setAttribute(Pr(n), t), i;
|
|
2114
2114
|
}
|
|
2115
2115
|
//#endregion
|
|
2116
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
2116
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/getScrollBarSize.js
|
|
2117
2117
|
function Ur(e) {
|
|
2118
2118
|
let t = `vc-scrollbar-measure-${Math.random().toString(36).substring(7)}`, n = document.createElement("div");
|
|
2119
2119
|
n.id = t;
|
|
@@ -2361,7 +2361,7 @@ var Xr = /* @__PURE__ */ N((e, { slots: t, expose: n }) => {
|
|
|
2361
2361
|
default: void 0
|
|
2362
2362
|
} } });
|
|
2363
2363
|
//#endregion
|
|
2364
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
2364
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/vnode.js
|
|
2365
2365
|
function Qr(e) {
|
|
2366
2366
|
if (!e) return null;
|
|
2367
2367
|
if (Xt(e?.__$el)) return e.__$el;
|
|
@@ -2378,8 +2378,8 @@ function Qr(e) {
|
|
|
2378
2378
|
}
|
|
2379
2379
|
if (Xt(t?.$el)) return t.$el;
|
|
2380
2380
|
if (t.$el) {
|
|
2381
|
-
let e = t.$el;
|
|
2382
|
-
if (e && (
|
|
2381
|
+
let e = t.nativeElement != null || t.el != null || typeof t.getElement == "function", n = t.$el;
|
|
2382
|
+
if (!e && (n.nodeType === 3 || n.nodeType === 8) && n.nextElementSibling) return n.nextElementSibling;
|
|
2383
2383
|
}
|
|
2384
2384
|
return null;
|
|
2385
2385
|
}
|
|
@@ -11872,7 +11872,7 @@ function Qp(e, t, n = {}) {
|
|
|
11872
11872
|
};
|
|
11873
11873
|
}
|
|
11874
11874
|
//#endregion
|
|
11875
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
11875
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/pickAttrs.js
|
|
11876
11876
|
var $p = "accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError".split(/\s+/), em = "aria-", tm = "data-";
|
|
11877
11877
|
function nm(e, t) {
|
|
11878
11878
|
return e.indexOf(t) === 0;
|
|
@@ -11890,7 +11890,7 @@ function rm(e, t = !1) {
|
|
|
11890
11890
|
}), r;
|
|
11891
11891
|
}
|
|
11892
11892
|
//#endregion
|
|
11893
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
11893
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/Children/isFragment.js
|
|
11894
11894
|
function im(e) {
|
|
11895
11895
|
return R(e) && e.type === w;
|
|
11896
11896
|
}
|
|
@@ -11927,7 +11927,7 @@ var lm = (e) => {
|
|
|
11927
11927
|
} };
|
|
11928
11928
|
};
|
|
11929
11929
|
//#endregion
|
|
11930
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
11930
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/Children/toArray.js
|
|
11931
11931
|
function um(e, t = {}) {
|
|
11932
11932
|
let n = [];
|
|
11933
11933
|
Array.isArray(e) || (e = [e]);
|
|
@@ -14076,7 +14076,7 @@ function Zh(e, t, n, r) {
|
|
|
14076
14076
|
];
|
|
14077
14077
|
}
|
|
14078
14078
|
//#endregion
|
|
14079
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
14079
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/Dom/styleChecker.js
|
|
14080
14080
|
function Qh(e) {
|
|
14081
14081
|
if (Yt() && window.document.documentElement) {
|
|
14082
14082
|
let t = Array.isArray(e) ? e : [e], { documentElement: n } = window.document;
|
|
@@ -14096,7 +14096,7 @@ function eg(e, t) {
|
|
|
14096
14096
|
//#region ../../node_modules/.pnpm/antdv-next@1.2.0_vue@3.5.31_typescript@5.9.3_/node_modules/antdv-next/dist/_util/styleChecker.js
|
|
14097
14097
|
var tg = eg;
|
|
14098
14098
|
//#endregion
|
|
14099
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
14099
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/Dom/focus.js
|
|
14100
14100
|
function ng(e, t = !1) {
|
|
14101
14101
|
if ($t(e)) {
|
|
14102
14102
|
let n = e.nodeName.toLowerCase(), r = [
|
|
@@ -20622,7 +20622,7 @@ function Pb(e, t, n, r, i, a) {
|
|
|
20622
20622
|
return t && (o = Nb(t, s, i, a)), qy(o, n);
|
|
20623
20623
|
}
|
|
20624
20624
|
//#endregion
|
|
20625
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
20625
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/isEqual.js
|
|
20626
20626
|
function Fb(e, t, n = !1) {
|
|
20627
20627
|
let r = /* @__PURE__ */ new Set();
|
|
20628
20628
|
function i(e, t, a = 1) {
|
|
@@ -26521,7 +26521,7 @@ function FC(e, t) {
|
|
|
26521
26521
|
return e[String(t)];
|
|
26522
26522
|
}
|
|
26523
26523
|
//#endregion
|
|
26524
|
-
//#region ../../node_modules/.pnpm/@v-c+util@1.0.
|
|
26524
|
+
//#region ../../node_modules/.pnpm/@v-c+util@1.0.21_vue@3.5.31_typescript@5.9.3_/node_modules/@v-c/util/dist/utils/omit.js
|
|
26525
26525
|
function IC(e, t) {
|
|
26526
26526
|
let n = { ...e };
|
|
26527
26527
|
return t.forEach((e) => {
|
|
@@ -58181,18 +58181,26 @@ var vW = /* @__PURE__ */ N({
|
|
|
58181
58181
|
g.value = !1;
|
|
58182
58182
|
}
|
|
58183
58183
|
function k() {
|
|
58184
|
-
m.value = Math.min(m.value + .2, 3);
|
|
58184
|
+
v.value === hW.Image && (m.value = Math.min(m.value + .2, 3));
|
|
58185
58185
|
}
|
|
58186
58186
|
function j() {
|
|
58187
|
-
m.value = Math.max(m.value - .2, .5);
|
|
58187
|
+
v.value === hW.Image && (m.value = Math.max(m.value - .2, .5));
|
|
58188
58188
|
}
|
|
58189
58189
|
function N() {
|
|
58190
|
-
m.value = 1, h.value = {
|
|
58190
|
+
v.value === hW.Image && (m.value = 1, h.value = {
|
|
58191
58191
|
x: 0,
|
|
58192
58192
|
y: 0
|
|
58193
|
-
};
|
|
58193
|
+
});
|
|
58194
|
+
}
|
|
58195
|
+
async function P() {
|
|
58196
|
+
try {
|
|
58197
|
+
await navigator.clipboard.writeText(e.content);
|
|
58198
|
+
} catch (e) {
|
|
58199
|
+
aW(!1, "Mermaid", `Copy failed: ${String(e)}`);
|
|
58200
|
+
}
|
|
58194
58201
|
}
|
|
58195
|
-
function
|
|
58202
|
+
function F() {
|
|
58203
|
+
if (v.value !== hW.Image) return;
|
|
58196
58204
|
let e = l.value?.querySelector("svg");
|
|
58197
58205
|
if (!e) return;
|
|
58198
58206
|
let t = new XMLSerializer().serializeToString(e), n = document.createElement("canvas"), r = n.getContext("2d");
|
|
@@ -58206,7 +58214,7 @@ var vW = /* @__PURE__ */ N({
|
|
|
58206
58214
|
e.download = `${Date.now()}.png`, e.href = n.toDataURL("image/png", 1), e.click();
|
|
58207
58215
|
}, s.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`;
|
|
58208
58216
|
}
|
|
58209
|
-
let
|
|
58217
|
+
let I = A(() => {
|
|
58210
58218
|
let t = [];
|
|
58211
58219
|
return v.value === hW.Image && (y.value.enableZoom && t.push({
|
|
58212
58220
|
key: "zoomIn",
|
|
@@ -58229,14 +58237,22 @@ var vW = /* @__PURE__ */ N({
|
|
|
58229
58237
|
key: "download",
|
|
58230
58238
|
icon: M(af, null, null),
|
|
58231
58239
|
label: o.value.download,
|
|
58232
|
-
onItemClick:
|
|
58240
|
+
onItemClick: F
|
|
58233
58241
|
})), v.value === hW.Code && y.value.enableCopy && t.push({
|
|
58234
58242
|
key: "copy",
|
|
58235
58243
|
actionRender: () => M(BM.Copy, { text: e.content }, null)
|
|
58236
58244
|
}), [...t, ...y.value.customActions];
|
|
58237
58245
|
});
|
|
58238
|
-
function
|
|
58239
|
-
return e.header === null ? null : r.header ? r.header(
|
|
58246
|
+
function L() {
|
|
58247
|
+
return e.header === null ? null : r.header ? r.header({
|
|
58248
|
+
renderType: v.value,
|
|
58249
|
+
setRenderType: T,
|
|
58250
|
+
zoomIn: k,
|
|
58251
|
+
zoomOut: j,
|
|
58252
|
+
resetZoom: N,
|
|
58253
|
+
download: F,
|
|
58254
|
+
copy: P
|
|
58255
|
+
}) : e.header === void 0 ? M("div", {
|
|
58240
58256
|
class: [`${e.prefixCls}-header`, b.value.header],
|
|
58241
58257
|
style: x.value.header
|
|
58242
58258
|
}, [M(wT, {
|
|
@@ -58249,7 +58265,7 @@ var vW = /* @__PURE__ */ N({
|
|
|
58249
58265
|
}],
|
|
58250
58266
|
value: v.value,
|
|
58251
58267
|
onChange: (e) => T(e)
|
|
58252
|
-
}, null), M(BM, { items:
|
|
58268
|
+
}, null), M(BM, { items: I.value }, null)]) : e.header;
|
|
58253
58269
|
}
|
|
58254
58270
|
return q(() => e.renderType, (e) => {
|
|
58255
58271
|
e !== void 0 && (p.value = e);
|
|
@@ -58324,7 +58340,7 @@ var vW = /* @__PURE__ */ N({
|
|
|
58324
58340
|
e.style
|
|
58325
58341
|
]
|
|
58326
58342
|
}), [
|
|
58327
|
-
|
|
58343
|
+
L(),
|
|
58328
58344
|
M("div", {
|
|
58329
58345
|
ref: l,
|
|
58330
58346
|
class: [
|
|
@@ -59640,7 +59656,7 @@ var rG = (e) => {
|
|
|
59640
59656
|
[`${r}-motion-hidden`]: { display: "none" }
|
|
59641
59657
|
} };
|
|
59642
59658
|
}, iG = (e) => {
|
|
59643
|
-
let { componentCls: t, antCls: n, calc: r } = e, i = `${t}-slot`, a = `${n}-input`, o = `${n}-dropdown-trigger`,
|
|
59659
|
+
let { componentCls: t, antCls: n, calc: r } = e, i = `${t}-slot`, a = `${n}-input`, o = `${a}-borderless`, s = `${n}-dropdown-trigger`, c = `${t}-slot-input`, l = `${t}-slot-select`, u = `${t}-slot-tag`, d = `${t}-slot-content`, f = `${t}-skill`;
|
|
59644
59660
|
return { [t]: {
|
|
59645
59661
|
[`${t}-input-slot`]: {
|
|
59646
59662
|
outline: "none",
|
|
@@ -59655,7 +59671,7 @@ var rG = (e) => {
|
|
|
59655
59671
|
color: e.colorTextPlaceholder
|
|
59656
59672
|
}
|
|
59657
59673
|
},
|
|
59658
|
-
[`${i}:not(${
|
|
59674
|
+
[`${i}:not(${d})`]: {
|
|
59659
59675
|
display: "inline-block",
|
|
59660
59676
|
verticalAlign: "middle",
|
|
59661
59677
|
alignItems: "center",
|
|
@@ -59664,7 +59680,7 @@ var rG = (e) => {
|
|
|
59664
59680
|
wordBreak: "break-all",
|
|
59665
59681
|
marginInline: e.marginXXS
|
|
59666
59682
|
},
|
|
59667
|
-
[`${a}${
|
|
59683
|
+
[`${a}${c}`]: {
|
|
59668
59684
|
height: "100%",
|
|
59669
59685
|
background: e.colorBgSlot,
|
|
59670
59686
|
outline: "none",
|
|
@@ -59674,13 +59690,14 @@ var rG = (e) => {
|
|
|
59674
59690
|
fontSize: "inherit",
|
|
59675
59691
|
lineHeight: "inherit",
|
|
59676
59692
|
position: "relative",
|
|
59693
|
+
[`&${o}`]: { "&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)": { outline: "none" } },
|
|
59677
59694
|
"&::placeholder": {
|
|
59678
59695
|
color: e.colorTextSlotPlaceholder,
|
|
59679
59696
|
fontSize: "inherit",
|
|
59680
59697
|
lineHeight: "inherit"
|
|
59681
59698
|
}
|
|
59682
59699
|
},
|
|
59683
|
-
[
|
|
59700
|
+
[l]: {
|
|
59684
59701
|
fontSize: e.fontSize,
|
|
59685
59702
|
lineHeight: e.lineHeight,
|
|
59686
59703
|
paddingInline: e.paddingXXS,
|
|
@@ -59696,15 +59713,15 @@ var rG = (e) => {
|
|
|
59696
59713
|
color: e.colorTextSlot,
|
|
59697
59714
|
border: `1px solid ${e.colorBorderSlot}`,
|
|
59698
59715
|
"&.placeholder": { color: e.colorTextSlotPlaceholder },
|
|
59699
|
-
[`&${
|
|
59716
|
+
[`&${s}-open`]: { borderColor: e.colorBorderSlotHover }
|
|
59700
59717
|
},
|
|
59701
|
-
[`${
|
|
59718
|
+
[`${l}-value`]: {
|
|
59702
59719
|
flex: 1,
|
|
59703
59720
|
fontSize: e.fontSize,
|
|
59704
59721
|
lineHeight: e.lineHeight,
|
|
59705
59722
|
"&:empty::before": { content: "attr(data-placeholder)" }
|
|
59706
59723
|
},
|
|
59707
|
-
[`${
|
|
59724
|
+
[`${l}-arrow`]: {
|
|
59708
59725
|
marginInlineStart: e.marginXXS,
|
|
59709
59726
|
fontSize: e.fontSize,
|
|
59710
59727
|
lineHeight: e.lineHeight,
|
|
@@ -59712,7 +59729,7 @@ var rG = (e) => {
|
|
|
59712
59729
|
alignItems: "center",
|
|
59713
59730
|
justifyContent: "center"
|
|
59714
59731
|
},
|
|
59715
|
-
[
|
|
59732
|
+
[u]: {
|
|
59716
59733
|
background: e.colorBgSlot,
|
|
59717
59734
|
border: `1px solid ${e.colorBorderSlot}`,
|
|
59718
59735
|
outline: "none",
|
|
@@ -59726,7 +59743,7 @@ var rG = (e) => {
|
|
|
59726
59743
|
position: "relative",
|
|
59727
59744
|
cursor: "default"
|
|
59728
59745
|
},
|
|
59729
|
-
[
|
|
59746
|
+
[d]: {
|
|
59730
59747
|
height: r(e.fontSize).mul(e.lineHeight).add(2).equal(),
|
|
59731
59748
|
caretColor: e.colorPrimary,
|
|
59732
59749
|
background: e.colorBgSlot,
|
|
@@ -59758,7 +59775,7 @@ var rG = (e) => {
|
|
|
59758
59775
|
display: "inline-block",
|
|
59759
59776
|
lineHeight: "inherit"
|
|
59760
59777
|
},
|
|
59761
|
-
[
|
|
59778
|
+
[f]: {
|
|
59762
59779
|
display: "inline-block",
|
|
59763
59780
|
verticalAlign: "baseline",
|
|
59764
59781
|
alignItems: "center",
|
|
@@ -59769,7 +59786,7 @@ var rG = (e) => {
|
|
|
59769
59786
|
paddingInlineStart: 0,
|
|
59770
59787
|
marginInlineEnd: 0,
|
|
59771
59788
|
marginInlineStart: -1,
|
|
59772
|
-
[`&${
|
|
59789
|
+
[`&${f}-empty`]: { "&::after": {
|
|
59773
59790
|
display: "inline-block",
|
|
59774
59791
|
pointerEvents: "none",
|
|
59775
59792
|
height: "inherit",
|
|
@@ -59777,11 +59794,11 @@ var rG = (e) => {
|
|
|
59777
59794
|
color: e.colorTextPlaceholder
|
|
59778
59795
|
} }
|
|
59779
59796
|
},
|
|
59780
|
-
[`${
|
|
59797
|
+
[`${f}-wrapper`]: {
|
|
59781
59798
|
height: "100%",
|
|
59782
59799
|
display: "inline-flex"
|
|
59783
59800
|
},
|
|
59784
|
-
[`${
|
|
59801
|
+
[`${f}-tag`]: {
|
|
59785
59802
|
paddingInline: e.paddingXS,
|
|
59786
59803
|
height: "100%",
|
|
59787
59804
|
backgroundColor: e.colorBgSkill,
|
|
@@ -59795,20 +59812,20 @@ var rG = (e) => {
|
|
|
59795
59812
|
transition: `background-color ${e.motionDurationMid}`,
|
|
59796
59813
|
"&:hover": {
|
|
59797
59814
|
backgroundColor: e.colorBgSkillHover,
|
|
59798
|
-
[`${
|
|
59815
|
+
[`${f}-close:not(${f}-close-disabled)`]: { color: e.colorPrimaryHover }
|
|
59799
59816
|
}
|
|
59800
59817
|
},
|
|
59801
|
-
[`${
|
|
59818
|
+
[`${f}-close`]: {
|
|
59802
59819
|
fontSize: e.fontSizeSM,
|
|
59803
59820
|
display: "inline-flex",
|
|
59804
59821
|
transition: `color ${e.motionDurationMid}`,
|
|
59805
59822
|
color: e.colorPrimary
|
|
59806
59823
|
},
|
|
59807
|
-
[`${
|
|
59824
|
+
[`${f}-close-disabled`]: {
|
|
59808
59825
|
cursor: "not-allowed",
|
|
59809
59826
|
color: e.colorTextDisabled
|
|
59810
59827
|
},
|
|
59811
|
-
[`${
|
|
59828
|
+
[`${f}-holder`]: {
|
|
59812
59829
|
width: e.marginXS,
|
|
59813
59830
|
height: "100%"
|
|
59814
59831
|
}
|
|
@@ -59872,7 +59889,8 @@ var rG = (e) => {
|
|
|
59872
59889
|
flex: "auto",
|
|
59873
59890
|
alignSelf: "center",
|
|
59874
59891
|
caretColor: e.colorPrimary,
|
|
59875
|
-
fontSize: e.fontSize
|
|
59892
|
+
fontSize: e.fontSize,
|
|
59893
|
+
[`&${t}-input-borderless`]: { "&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)": { outline: "none" } }
|
|
59876
59894
|
},
|
|
59877
59895
|
[`${n}-actions-list`]: {
|
|
59878
59896
|
flex: "none",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antdv-next/x",
|
|
3
|
-
"version": "1.1.2",
|
|
3
|
+
"version": "1.1.3-beta.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@ant-design/fast-color": "^3.0.1",
|
|
54
54
|
"@antdv-next/cssinjs": "^1.0.4",
|
|
55
55
|
"@antdv-next/icons": "^1.0.6",
|
|
56
|
-
"@v-c/util": "^1.0.
|
|
56
|
+
"@v-c/util": "^1.0.21",
|
|
57
57
|
"@vueuse/core": "^14.2.1",
|
|
58
58
|
"antdv-next": "^1.2.0",
|
|
59
59
|
"dayjs": "^1.11.19",
|
|
@@ -61,6 +61,9 @@
|
|
|
61
61
|
"shiki": "^3.13.0",
|
|
62
62
|
"vue": "^3.5.29"
|
|
63
63
|
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"tsx": "^4.19.1"
|
|
66
|
+
},
|
|
64
67
|
"peerDependencies": {
|
|
65
68
|
"antdv-next": ">=1.0.0",
|
|
66
69
|
"vue": ">=3.5.0"
|
|
@@ -73,6 +76,9 @@
|
|
|
73
76
|
"build:comp": "vp build --config vite.build.config.ts",
|
|
74
77
|
"build:esm": "vp build --config vite.esm.config.ts",
|
|
75
78
|
"build:umd": "vp build --config vite.umd.config.ts",
|
|
79
|
+
"build:token-meta": "tsx ./scripts/token/generate-token-meta.ts",
|
|
80
|
+
"build:token-statistic": "vp run build:comp && tsx ./scripts/token/collect-token-statistic.ts",
|
|
81
|
+
"build:token": "run-p build:token-meta build:token-statistic",
|
|
76
82
|
"build": "vp run build:comp && vp run build:esm && vp run build:umd"
|
|
77
83
|
}
|
|
78
84
|
}
|