@haklex/rich-renderer-alert 0.0.80 → 0.0.81
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/AlertRenderer-ZKu71Yp4.js +169 -0
- package/dist/index.mjs +34 -34
- package/dist/rich-renderer-alert.css +2 -1
- package/dist/static.mjs +2 -5
- package/package.json +4 -4
- package/dist/AlertRenderer-D578-dJz.js +0 -159
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { Info, Lightbulb, MessageSquareWarning, OctagonAlert, TriangleAlert } from "lucide-react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@vanilla-extract+recipes@0.5.7_@vanilla-extract+css@1.18.0/node_modules/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js
|
|
4
|
+
function toPrimitive(t, r) {
|
|
5
|
+
if ("object" != typeof t || !t) return t;
|
|
6
|
+
var e = t[Symbol.toPrimitive];
|
|
7
|
+
if (void 0 !== e) {
|
|
8
|
+
var i = e.call(t, r || "default");
|
|
9
|
+
if ("object" != typeof i) return i;
|
|
10
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
11
|
+
}
|
|
12
|
+
return ("string" === r ? String : Number)(t);
|
|
13
|
+
}
|
|
14
|
+
function toPropertyKey(t) {
|
|
15
|
+
var i = toPrimitive(t, "string");
|
|
16
|
+
return "symbol" == typeof i ? i : String(i);
|
|
17
|
+
}
|
|
18
|
+
function _defineProperty(obj, key, value) {
|
|
19
|
+
key = toPropertyKey(key);
|
|
20
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
21
|
+
value,
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true
|
|
25
|
+
});
|
|
26
|
+
else obj[key] = value;
|
|
27
|
+
return obj;
|
|
28
|
+
}
|
|
29
|
+
function ownKeys(e, r) {
|
|
30
|
+
var t = Object.keys(e);
|
|
31
|
+
if (Object.getOwnPropertySymbols) {
|
|
32
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
33
|
+
r && (o = o.filter(function(r) {
|
|
34
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
35
|
+
})), t.push.apply(t, o);
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
}
|
|
39
|
+
function _objectSpread2(e) {
|
|
40
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
41
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
42
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
43
|
+
_defineProperty(e, r, t[r]);
|
|
44
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
45
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return e;
|
|
49
|
+
}
|
|
50
|
+
function mapValues(input, fn) {
|
|
51
|
+
var result = {};
|
|
52
|
+
for (var _key in input) result[_key] = fn(input[_key], _key);
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
var shouldApplyCompound = (compoundCheck, selections, defaultVariants) => {
|
|
56
|
+
for (var key of Object.keys(compoundCheck)) {
|
|
57
|
+
var _selections$key;
|
|
58
|
+
if (compoundCheck[key] !== ((_selections$key = selections[key]) !== null && _selections$key !== void 0 ? _selections$key : defaultVariants[key])) return false;
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
};
|
|
62
|
+
var createRuntimeFn = (config) => {
|
|
63
|
+
var runtimeFn = (options) => {
|
|
64
|
+
var className = config.defaultClassName;
|
|
65
|
+
var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
|
|
66
|
+
for (var variantName in selections) {
|
|
67
|
+
var _selections$variantNa;
|
|
68
|
+
var variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];
|
|
69
|
+
if (variantSelection != null) {
|
|
70
|
+
var selection = variantSelection;
|
|
71
|
+
if (typeof selection === "boolean") selection = selection === true ? "true" : "false";
|
|
72
|
+
var selectionClassName = config.variantClassNames[variantName][selection];
|
|
73
|
+
if (selectionClassName) className += " " + selectionClassName;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
for (var [compoundCheck, compoundClassName] of config.compoundVariants) if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) className += " " + compoundClassName;
|
|
77
|
+
return className;
|
|
78
|
+
};
|
|
79
|
+
runtimeFn.variants = () => Object.keys(config.variantClassNames);
|
|
80
|
+
runtimeFn.classNames = {
|
|
81
|
+
get base() {
|
|
82
|
+
return config.defaultClassName.split(" ")[0];
|
|
83
|
+
},
|
|
84
|
+
get variants() {
|
|
85
|
+
return mapValues(config.variantClassNames, (classNames) => mapValues(classNames, (className) => className.split(" ")[0]));
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
return runtimeFn;
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/styles.css.ts
|
|
92
|
+
var semanticClassNames = {
|
|
93
|
+
root: "rich-alert",
|
|
94
|
+
header: "rich-alert-header",
|
|
95
|
+
icon: "rich-alert-icon",
|
|
96
|
+
label: "rich-alert-label",
|
|
97
|
+
content: "rich-alert-content",
|
|
98
|
+
contentEditable: "rich-alert-content-editable"
|
|
99
|
+
};
|
|
100
|
+
var semanticTypeClassNames = {
|
|
101
|
+
root: {
|
|
102
|
+
note: "rich-alert-note",
|
|
103
|
+
tip: "rich-alert-tip",
|
|
104
|
+
important: "rich-alert-important",
|
|
105
|
+
warning: "rich-alert-warning",
|
|
106
|
+
caution: "rich-alert-caution"
|
|
107
|
+
},
|
|
108
|
+
header: {
|
|
109
|
+
note: "rich-alert-header-note",
|
|
110
|
+
tip: "rich-alert-header-tip",
|
|
111
|
+
important: "rich-alert-header-important",
|
|
112
|
+
warning: "rich-alert-header-warning",
|
|
113
|
+
caution: "rich-alert-header-caution"
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
var alertType = createRuntimeFn({
|
|
117
|
+
defaultClassName: "pq4lod1",
|
|
118
|
+
variantClassNames: { type: {
|
|
119
|
+
note: "pq4lod2",
|
|
120
|
+
tip: "pq4lod3",
|
|
121
|
+
important: "pq4lod4",
|
|
122
|
+
warning: "pq4lod5",
|
|
123
|
+
caution: "pq4lod6"
|
|
124
|
+
} },
|
|
125
|
+
defaultVariants: {},
|
|
126
|
+
compoundVariants: []
|
|
127
|
+
});
|
|
128
|
+
var alertHeader = "pq4lod7";
|
|
129
|
+
var alertTrigger = "pq4lod8";
|
|
130
|
+
var alertChevron = "pq4lod9";
|
|
131
|
+
var alertIcon = "pq4loda";
|
|
132
|
+
var alertLabel = "pq4lodb";
|
|
133
|
+
var alertMenuIcon = "pq4lodc";
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/AlertRenderer.tsx
|
|
136
|
+
var ALERT_ICONS = {
|
|
137
|
+
note: Info,
|
|
138
|
+
tip: Lightbulb,
|
|
139
|
+
important: MessageSquareWarning,
|
|
140
|
+
warning: TriangleAlert,
|
|
141
|
+
caution: OctagonAlert
|
|
142
|
+
};
|
|
143
|
+
var ALERT_LABELS = {
|
|
144
|
+
note: "Note",
|
|
145
|
+
tip: "Tip",
|
|
146
|
+
important: "Important",
|
|
147
|
+
warning: "Warning",
|
|
148
|
+
caution: "Caution"
|
|
149
|
+
};
|
|
150
|
+
var ALL_TYPES = [
|
|
151
|
+
"note",
|
|
152
|
+
"tip",
|
|
153
|
+
"important",
|
|
154
|
+
"warning",
|
|
155
|
+
"caution"
|
|
156
|
+
];
|
|
157
|
+
var AlertRenderer = ({ type }) => {
|
|
158
|
+
const Icon = ALERT_ICONS[type];
|
|
159
|
+
const label = ALERT_LABELS[type];
|
|
160
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
161
|
+
className: `${alertHeader} ${alertType({ type })} ${semanticClassNames.header} ${semanticTypeClassNames.header[type]}`,
|
|
162
|
+
children: [/* @__PURE__ */ jsx(Icon, { className: `${alertIcon} ${semanticClassNames.icon}` }), /* @__PURE__ */ jsx("span", {
|
|
163
|
+
className: `${alertLabel} ${semanticClassNames.label}`,
|
|
164
|
+
children: label
|
|
165
|
+
})]
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
//#endregion
|
|
169
|
+
export { alertChevron as a, alertLabel as c, alertType as d, semanticClassNames as f, AlertRenderer as i, alertMenuIcon as l, ALERT_LABELS as n, alertHeader as o, semanticTypeClassNames as p, ALL_TYPES as r, alertIcon as s, ALERT_ICONS as t, alertTrigger as u };
|
package/dist/index.mjs
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DropdownMenu,
|
|
1
|
+
import { a as alertChevron, c as alertLabel, d as alertType, f as semanticClassNames, i as AlertRenderer, l as alertMenuIcon, n as ALERT_LABELS, o as alertHeader, p as semanticTypeClassNames, r as ALL_TYPES, s as alertIcon, t as ALERT_ICONS, u as alertTrigger } from "./AlertRenderer-ZKu71Yp4.js";
|
|
2
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@haklex/rich-editor-ui";
|
|
3
3
|
import { ChevronDown } from "lucide-react";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
AlertRenderer,
|
|
35
|
-
AlertRenderer as default
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/AlertEditRenderer.tsx
|
|
6
|
+
var AlertEditRenderer = ({ type, editable, onTypeChange }) => {
|
|
7
|
+
if (!editable || !onTypeChange) return /* @__PURE__ */ jsx(AlertRenderer, { type });
|
|
8
|
+
const Icon = ALERT_ICONS[type];
|
|
9
|
+
const label = ALERT_LABELS[type];
|
|
10
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
className: `${alertHeader} ${alertType({ type })} ${semanticClassNames.header} ${semanticTypeClassNames.header[type]}`,
|
|
12
|
+
children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsxs(DropdownMenuTrigger, {
|
|
13
|
+
className: alertTrigger,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsx(Icon, { className: `${alertIcon} ${semanticClassNames.icon}` }),
|
|
16
|
+
/* @__PURE__ */ jsx("span", {
|
|
17
|
+
className: `${alertLabel} ${semanticClassNames.label}`,
|
|
18
|
+
children: label
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: alertChevron })
|
|
21
|
+
]
|
|
22
|
+
}), /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
23
|
+
align: "start",
|
|
24
|
+
sideOffset: 6,
|
|
25
|
+
children: ALL_TYPES.map((t) => {
|
|
26
|
+
const ItemIcon = ALERT_ICONS[t];
|
|
27
|
+
return /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
28
|
+
onClick: () => onTypeChange(t),
|
|
29
|
+
children: [/* @__PURE__ */ jsx(ItemIcon, { className: `${alertMenuIcon} ${alertType({ type: t })}` }), /* @__PURE__ */ jsx("span", { children: ALERT_LABELS[t] })]
|
|
30
|
+
}, t);
|
|
31
|
+
})
|
|
32
|
+
})] })
|
|
33
|
+
});
|
|
36
34
|
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { AlertEditRenderer, AlertRenderer, AlertRenderer as default };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
:root{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.7;--rc-line-height-tight: 1.4;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}:root.dark{--rc-text: #fafafa;--rc-text-secondary: #a1a1aa;--rc-text-tertiary: #71717a;--rc-text-quaternary: #52525b;--rc-bg: #09090b;--rc-bg-secondary: #18181b;--rc-bg-tertiary: #27272a;--rc-fill: #2a2a2f;--rc-fill-secondary: #222226;--rc-fill-tertiary: #1b1b1f;--rc-fill-quaternary: #131316;--rc-border: #27272a;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #e4e4e7;--rc-code-bg: #27272a;--rc-hr-border: #27272a;--rc-quote-border: #60a5fa;--rc-quote-bg: #1e3a5f;--rc-alert-info: #7db9e5;--rc-alert-warning: #da864a;--rc-alert-tip: #54da48;--rc-alert-caution: #e16973;--rc-alert-important: #9966e0;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.35);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.4);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.7;--rc-line-height-tight: 1.4;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}._1abhp9o0{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.7;--rc-line-height-tight: 1.4;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}._1abhp9o1{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #2563eb;--rc-quote-bg: #eff6ff;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: 700px;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 4px;--rc-space-sm: 8px;--rc-space-md: 16px;--rc-space-lg: 24px;--rc-space-xl: 32px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 16px;--rc-font-size-small: 14px;--rc-line-height: 1.8;--rc-line-height-tight: 1.4;--rc-font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-radius-sm: 4px;--rc-radius-md: 8px;--rc-radius-lg: 12px}._1abhp9o2{--rc-text: #000;--rc-text-secondary: #27272a;--rc-text-tertiary: #71717a;--rc-text-quaternary: #a1a1aa;--rc-bg: #ffffff;--rc-bg-secondary: #fafafa;--rc-bg-tertiary: #f4f4f5;--rc-fill: #e8e8ec;--rc-fill-secondary: #eeeeef;--rc-fill-tertiary: #f4f4f6;--rc-fill-quaternary: #f9f9fa;--rc-border: #f4f4f5;--rc-accent: #2563eb;--rc-accent-light: #2563eb20;--rc-link: #2563eb;--rc-code-text: #3f3f46;--rc-code-bg: #f4f4f5;--rc-hr-border: #e4e4e7;--rc-quote-border: #a1a1aa;--rc-quote-bg: #fafafa;--rc-alert-info: #006bb7;--rc-alert-warning: #cc5500;--rc-alert-tip: #11cc00;--rc-alert-caution: #cc0011;--rc-alert-important: #5500cc;--rc-max-width: none;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);--rc-space-xs: 2px;--rc-space-sm: 4px;--rc-space-md: 10px;--rc-space-lg: 16px;--rc-space-xl: 20px;--rc-font-family-sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono: "SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs: .625em;--rc-font-size-xs: .75em;--rc-font-size-sm: .8125em;--rc-font-size-md: .875em;--rc-font-size-lg: 1.25em;--rc-font-size-base: 14px;--rc-font-size-small: 12px;--rc-line-height: 1.5;--rc-line-height-tight: 1.3;--rc-font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm: 3px;--rc-radius-md: 6px;--rc-radius-lg: 12px}.dark ._1abhp9o0,[data-theme=dark] ._1abhp9o0,.dark._1abhp9o0,[data-theme=dark]._1abhp9o0,.dark ._1abhp9o1,[data-theme=dark] ._1abhp9o1,.dark._1abhp9o1,[data-theme=dark]._1abhp9o1,.dark ._1abhp9o2,[data-theme=dark] ._1abhp9o2,.dark._1abhp9o2,[data-theme=dark]._1abhp9o2{--rc-text: #fafafa;--rc-text-secondary: #a1a1aa;--rc-text-tertiary: #71717a;--rc-text-quaternary: #52525b;--rc-bg: #09090b;--rc-bg-secondary: #18181b;--rc-bg-tertiary: #27272a;--rc-fill: #2a2a2f;--rc-fill-secondary: #222226;--rc-fill-tertiary: #1b1b1f;--rc-fill-quaternary: #131316;--rc-border: #27272a;--rc-accent: #60a5fa;--rc-accent-light: #60a5fa20;--rc-link: #60a5fa;--rc-code-text: #e4e4e7;--rc-code-bg: #27272a;--rc-hr-border: #27272a;--rc-quote-border: #60a5fa;--rc-quote-bg: #1e3a5f;--rc-alert-info: #7db9e5;--rc-alert-warning: #da864a;--rc-alert-tip: #54da48;--rc-alert-caution: #e16973;--rc-alert-important: #9966e0;--rc-shadow-top-bar: 0 8px 30px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);--rc-shadow-modal: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.35);--rc-shadow-menu: 0 1px 4px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.4)}.pq4lod2{--pq4lod0: var(--rc-alert-info)}.pq4lod3{--pq4lod0: var(--rc-alert-tip)}.pq4lod4{--pq4lod0: var(--rc-alert-important)}.pq4lod5{--pq4lod0: var(--rc-alert-warning)}.pq4lod6{--pq4lod0: var(--rc-alert-caution)}.pq4lod7{display:flex;align-items:center;gap:8px;font-weight:600;text-transform:uppercase;letter-spacing:.02em;font-size:var(--rc-font-size-md);line-height:1;margin-bottom:6px}.pq4lod8{display:inline-flex;align-items:center;gap:6px;cursor:pointer;padding:2px 6px;border-radius:4px;margin-inline:-6px;border:none;background:none;font:inherit;font-weight:600;text-transform:uppercase;letter-spacing:.02em;font-size:var(--rc-font-size-md);line-height:1;transition:background-color .15s}.pq4lod8:hover{background-color:color-mix(in srgb,var(--rc-text) 5%,transparent)}.pq4lod9{opacity:0;transition:opacity .15s;width:14px;height:14px;flex-shrink:0}.pq4lod8:hover .pq4lod9{opacity:.6}.pq4lod8[data-popup-open] .pq4lod9{opacity:.8}.pq4loda{width:16px;height:16px;flex-shrink:0;color:var(--pq4lod0)}.pq4lodb{color:var(--pq4lod0)}.pq4lodc{width:16px;height:16px;flex-shrink:0;color:var(--pq4lod0)}.rich-alert{position:relative;padding:var(--rc-space-md);padding-left:calc(var(--rc-space-md) + 4px);border-radius:0 var(--rc-radius-sm) var(--rc-radius-sm) 0;margin:var(--rc-space-md) 0;background-color:var(--rc-bg-secondary)}.rich-alert:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;border-radius:var(--rc-radius-sm)}.rich-alert-header{position:relative;display:flex;align-items:center;gap:var(--rc-space-sm);font-weight:600;margin-bottom:var(--rc-space-xs);font-size:var(--rc-font-size-md);text-transform:uppercase;letter-spacing:.02em;line-height:1}.rich-alert-icon{display:inline-flex;width:16px;height:16px;flex-shrink:0}.rich-alert-content{min-height:1em}.rich-alert-content-editable{outline:none}.rich-alert-content>.rich-paragraph:first-child{margin-top:0}.rich-alert-content>.rich-paragraph:last-child{margin-bottom:0}.rich-alert-content .rich-paragraph{margin:0 0 .5em}.rich-alert-content .rich-paragraph:last-child{margin-bottom:0}.rich-alert-note:before{background-color:var(--rc-alert-info)}.rich-alert-header-note{color:var(--rc-alert-info)}.rich-alert-tip:before{background-color:var(--rc-alert-tip)}.rich-alert-header-tip{color:var(--rc-alert-tip)}.rich-alert-important:before{background-color:var(--rc-alert-important)}.rich-alert-header-important{color:var(--rc-alert-important)}.rich-alert-warning:before{background-color:var(--rc-alert-warning)}.rich-alert-header-warning{color:var(--rc-alert-warning)}.rich-alert-caution:before{background-color:var(--rc-alert-caution)}.rich-alert-header-caution{color:var(--rc-alert-caution)}
|
|
1
|
+
:root{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#2563eb;--rc-quote-bg:#eff6ff;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}:root.dark{--rc-text:#fafafa;--rc-text-secondary:#a1a1aa;--rc-text-tertiary:#71717a;--rc-text-quaternary:#52525b;--rc-bg:#09090b;--rc-bg-secondary:#18181b;--rc-bg-tertiary:#27272a;--rc-fill:#2a2a2f;--rc-fill-secondary:#222226;--rc-fill-tertiary:#1b1b1f;--rc-fill-quaternary:#131316;--rc-border:#27272a;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#e4e4e7;--rc-code-bg:#27272a;--rc-hr-border:#27272a;--rc-quote-border:#60a5fa;--rc-quote-bg:#1e3a5f;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1abhp9o0{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#2563eb;--rc-quote-bg:#eff6ff;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.7;--rc-line-height-tight:1.4;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1abhp9o1{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#2563eb;--rc-quote-bg:#eff6ff;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:700px;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:4px;--rc-space-sm:8px;--rc-space-md:16px;--rc-space-lg:24px;--rc-space-xl:32px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:16px;--rc-font-size-small:14px;--rc-line-height:1.8;--rc-line-height-tight:1.4;--rc-font-family:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-radius-sm:4px;--rc-radius-md:8px;--rc-radius-lg:12px}._1abhp9o2{--rc-text:#000;--rc-text-secondary:#27272a;--rc-text-tertiary:#71717a;--rc-text-quaternary:#a1a1aa;--rc-bg:#fff;--rc-bg-secondary:#fafafa;--rc-bg-tertiary:#f4f4f5;--rc-fill:#e8e8ec;--rc-fill-secondary:#eeeeef;--rc-fill-tertiary:#f4f4f6;--rc-fill-quaternary:#f9f9fa;--rc-border:#f4f4f5;--rc-accent:#2563eb;--rc-accent-light:#2563eb20;--rc-link:#2563eb;--rc-code-text:#3f3f46;--rc-code-bg:#f4f4f5;--rc-hr-border:#e4e4e7;--rc-quote-border:#a1a1aa;--rc-quote-bg:#fafafa;--rc-alert-info:#006bb7;--rc-alert-warning:#c50;--rc-alert-tip:#1c0;--rc-alert-caution:#c01;--rc-alert-important:#50c;--rc-max-width:none;--rc-shadow-top-bar:0 8px 30px #0000001f, 0 2px 8px #0000000f;--rc-shadow-modal:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--rc-shadow-menu:0 1px 4px #0000000a, 0 4px 16px #00000014;--rc-space-xs:2px;--rc-space-sm:4px;--rc-space-md:10px;--rc-space-lg:16px;--rc-space-xl:20px;--rc-font-family-sans:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-font-family-serif:"Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", "source-han-serif-sc", "Songti SC", STSong, "华文宋体", serif;--rc-font-mono:"SF Mono", SFMono-Regular, ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;--rc-font-size-2xs:.625em;--rc-font-size-xs:.75em;--rc-font-size-sm:.8125em;--rc-font-size-md:.875em;--rc-font-size-lg:1.25em;--rc-font-size-base:14px;--rc-font-size-small:12px;--rc-line-height:1.5;--rc-line-height-tight:1.3;--rc-font-family:"PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, "noto sans sc", "hiragino sans gb", -apple-system, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Not Color Emoji;--rc-radius-sm:3px;--rc-radius-md:6px;--rc-radius-lg:12px}.dark ._1abhp9o0,[data-theme=dark] ._1abhp9o0,.dark._1abhp9o0,[data-theme=dark]._1abhp9o0,.dark ._1abhp9o1,[data-theme=dark] ._1abhp9o1,.dark._1abhp9o1,[data-theme=dark]._1abhp9o1,.dark ._1abhp9o2,[data-theme=dark] ._1abhp9o2,.dark._1abhp9o2,[data-theme=dark]._1abhp9o2{--rc-text:#fafafa;--rc-text-secondary:#a1a1aa;--rc-text-tertiary:#71717a;--rc-text-quaternary:#52525b;--rc-bg:#09090b;--rc-bg-secondary:#18181b;--rc-bg-tertiary:#27272a;--rc-fill:#2a2a2f;--rc-fill-secondary:#222226;--rc-fill-tertiary:#1b1b1f;--rc-fill-quaternary:#131316;--rc-border:#27272a;--rc-accent:#60a5fa;--rc-accent-light:#60a5fa20;--rc-link:#60a5fa;--rc-code-text:#e4e4e7;--rc-code-bg:#27272a;--rc-hr-border:#27272a;--rc-quote-border:#60a5fa;--rc-quote-bg:#1e3a5f;--rc-alert-info:#7db9e5;--rc-alert-warning:#da864a;--rc-alert-tip:#54da48;--rc-alert-caution:#e16973;--rc-alert-important:#9966e0;--rc-shadow-top-bar:0 8px 30px #00000073, 0 2px 8px #0000004d;--rc-shadow-modal:0 10px 15px -3px #0006, 0 4px 6px -4px #00000059;--rc-shadow-menu:0 1px 4px #00000040, 0 4px 16px #0006}.pq4lod2{--pq4lod0:var(--rc-alert-info)}.pq4lod3{--pq4lod0:var(--rc-alert-tip)}.pq4lod4{--pq4lod0:var(--rc-alert-important)}.pq4lod5{--pq4lod0:var(--rc-alert-warning)}.pq4lod6{--pq4lod0:var(--rc-alert-caution)}.pq4lod7{text-transform:uppercase;letter-spacing:.02em;font-weight:600;font-size:var(--rc-font-size-md);align-items:center;gap:8px;margin-bottom:6px;line-height:1;display:flex}.pq4lod8{cursor:pointer;font:inherit;text-transform:uppercase;letter-spacing:.02em;font-weight:600;font-size:var(--rc-font-size-md);background:0 0;border:none;border-radius:4px;align-items:center;gap:6px;margin-inline-start:-6px;margin-inline-end:-6px;padding:2px 6px;line-height:1;transition:background-color .15s;display:inline-flex}.pq4lod8:hover{background-color:color-mix(in srgb, var(--rc-text) 5%, transparent)}.pq4lod9{opacity:0;flex-shrink:0;width:14px;height:14px;transition:opacity .15s}.pq4lod8:hover .pq4lod9{opacity:.6}.pq4lod8[data-popup-open] .pq4lod9{opacity:.8}.pq4loda{width:16px;height:16px;color:var(--pq4lod0);flex-shrink:0}.pq4lodb{color:var(--pq4lod0)}.pq4lodc{width:16px;height:16px;color:var(--pq4lod0);flex-shrink:0}.rich-alert{padding:var(--rc-space-md);padding-left:calc(var(--rc-space-md) + 4px);border-radius:0 var(--rc-radius-sm) var(--rc-radius-sm) 0;margin:var(--rc-space-md) 0;background-color:var(--rc-bg-secondary);position:relative}.rich-alert:before{content:"";border-radius:var(--rc-radius-sm);width:4px;position:absolute;top:0;bottom:0;left:0}.rich-alert-header{align-items:center;gap:var(--rc-space-sm);margin-bottom:var(--rc-space-xs);font-weight:600;font-size:var(--rc-font-size-md);text-transform:uppercase;letter-spacing:.02em;line-height:1;display:flex;position:relative}.rich-alert-icon{flex-shrink:0;width:16px;height:16px;display:inline-flex}.rich-alert-content{min-height:1em}.rich-alert-content-editable{outline:none}.rich-alert-content>.rich-paragraph:first-child{margin-top:0}.rich-alert-content>.rich-paragraph:last-child{margin-bottom:0}.rich-alert-content .rich-paragraph{margin:0 0 .5em}.rich-alert-content .rich-paragraph:last-child{margin-bottom:0}.rich-alert-note:before{background-color:var(--rc-alert-info)}.rich-alert-header-note{color:var(--rc-alert-info)}.rich-alert-tip:before{background-color:var(--rc-alert-tip)}.rich-alert-header-tip{color:var(--rc-alert-tip)}.rich-alert-important:before{background-color:var(--rc-alert-important)}.rich-alert-header-important{color:var(--rc-alert-important)}.rich-alert-warning:before{background-color:var(--rc-alert-warning)}.rich-alert-header-warning{color:var(--rc-alert-warning)}.rich-alert-caution:before{background-color:var(--rc-alert-caution)}.rich-alert-header-caution{color:var(--rc-alert-caution)}
|
|
2
|
+
/*$vite$:1*/
|
package/dist/static.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-renderer-alert",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.81",
|
|
4
4
|
"description": "Alert renderer for haklex rich editor",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"lucide-react": "^0.577.0",
|
|
29
|
-
"@haklex/rich-editor": "0.0.
|
|
30
|
-
"@haklex/rich-editor-ui": "0.0.
|
|
31
|
-
"@haklex/rich-style-token": "0.0.
|
|
29
|
+
"@haklex/rich-editor": "0.0.81",
|
|
30
|
+
"@haklex/rich-editor-ui": "0.0.81",
|
|
31
|
+
"@haklex/rich-style-token": "0.0.81"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/react": "^19.2.14",
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { OctagonAlert, TriangleAlert, MessageSquareWarning, Lightbulb, Info } from "lucide-react";
|
|
3
|
-
function toPrimitive(t, r) {
|
|
4
|
-
if ("object" != typeof t || !t) return t;
|
|
5
|
-
var e = t[Symbol.toPrimitive];
|
|
6
|
-
if (void 0 !== e) {
|
|
7
|
-
var i = e.call(t, r);
|
|
8
|
-
if ("object" != typeof i) return i;
|
|
9
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
10
|
-
}
|
|
11
|
-
return ("string" === r ? String : Number)(t);
|
|
12
|
-
}
|
|
13
|
-
function toPropertyKey(t) {
|
|
14
|
-
var i = toPrimitive(t, "string");
|
|
15
|
-
return "symbol" == typeof i ? i : String(i);
|
|
16
|
-
}
|
|
17
|
-
function _defineProperty(obj, key, value) {
|
|
18
|
-
key = toPropertyKey(key);
|
|
19
|
-
if (key in obj) {
|
|
20
|
-
Object.defineProperty(obj, key, {
|
|
21
|
-
value,
|
|
22
|
-
enumerable: true,
|
|
23
|
-
configurable: true,
|
|
24
|
-
writable: true
|
|
25
|
-
});
|
|
26
|
-
} else {
|
|
27
|
-
obj[key] = value;
|
|
28
|
-
}
|
|
29
|
-
return obj;
|
|
30
|
-
}
|
|
31
|
-
function ownKeys(e, r) {
|
|
32
|
-
var t = Object.keys(e);
|
|
33
|
-
if (Object.getOwnPropertySymbols) {
|
|
34
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
35
|
-
r && (o = o.filter(function(r2) {
|
|
36
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
37
|
-
})), t.push.apply(t, o);
|
|
38
|
-
}
|
|
39
|
-
return t;
|
|
40
|
-
}
|
|
41
|
-
function _objectSpread2(e) {
|
|
42
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
43
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
44
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
45
|
-
_defineProperty(e, r2, t[r2]);
|
|
46
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
47
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
return e;
|
|
51
|
-
}
|
|
52
|
-
function mapValues(input, fn) {
|
|
53
|
-
var result = {};
|
|
54
|
-
for (var _key in input) {
|
|
55
|
-
result[_key] = fn(input[_key], _key);
|
|
56
|
-
}
|
|
57
|
-
return result;
|
|
58
|
-
}
|
|
59
|
-
var shouldApplyCompound = (compoundCheck, selections, defaultVariants) => {
|
|
60
|
-
for (var key of Object.keys(compoundCheck)) {
|
|
61
|
-
var _selections$key;
|
|
62
|
-
if (compoundCheck[key] !== ((_selections$key = selections[key]) !== null && _selections$key !== void 0 ? _selections$key : defaultVariants[key])) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return true;
|
|
67
|
-
};
|
|
68
|
-
var createRuntimeFn = (config) => {
|
|
69
|
-
var runtimeFn = (options) => {
|
|
70
|
-
var className = config.defaultClassName;
|
|
71
|
-
var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
|
|
72
|
-
for (var variantName in selections) {
|
|
73
|
-
var _selections$variantNa;
|
|
74
|
-
var variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];
|
|
75
|
-
if (variantSelection != null) {
|
|
76
|
-
var selection = variantSelection;
|
|
77
|
-
if (typeof selection === "boolean") {
|
|
78
|
-
selection = selection === true ? "true" : "false";
|
|
79
|
-
}
|
|
80
|
-
var selectionClassName = (
|
|
81
|
-
// @ts-expect-error
|
|
82
|
-
config.variantClassNames[variantName][selection]
|
|
83
|
-
);
|
|
84
|
-
if (selectionClassName) {
|
|
85
|
-
className += " " + selectionClassName;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
for (var [compoundCheck, compoundClassName] of config.compoundVariants) {
|
|
90
|
-
if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) {
|
|
91
|
-
className += " " + compoundClassName;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return className;
|
|
95
|
-
};
|
|
96
|
-
runtimeFn.variants = () => Object.keys(config.variantClassNames);
|
|
97
|
-
runtimeFn.classNames = {
|
|
98
|
-
get base() {
|
|
99
|
-
return config.defaultClassName.split(" ")[0];
|
|
100
|
-
},
|
|
101
|
-
get variants() {
|
|
102
|
-
return mapValues(config.variantClassNames, (classNames) => mapValues(classNames, (className) => className.split(" ")[0]));
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return runtimeFn;
|
|
106
|
-
};
|
|
107
|
-
var semanticClassNames = { header: "rich-alert-header", icon: "rich-alert-icon", label: "rich-alert-label" };
|
|
108
|
-
var semanticTypeClassNames = { header: { note: "rich-alert-header-note", tip: "rich-alert-header-tip", important: "rich-alert-header-important", warning: "rich-alert-header-warning", caution: "rich-alert-header-caution" } };
|
|
109
|
-
var alertType = createRuntimeFn({ defaultClassName: "pq4lod1", variantClassNames: { type: { note: "pq4lod2", tip: "pq4lod3", important: "pq4lod4", warning: "pq4lod5", caution: "pq4lod6" } }, defaultVariants: {}, compoundVariants: [] });
|
|
110
|
-
var alertHeader = "pq4lod7";
|
|
111
|
-
var alertTrigger = "pq4lod8";
|
|
112
|
-
var alertChevron = "pq4lod9";
|
|
113
|
-
var alertIcon = "pq4loda";
|
|
114
|
-
var alertLabel = "pq4lodb";
|
|
115
|
-
var alertMenuIcon = "pq4lodc";
|
|
116
|
-
const ALERT_ICONS = {
|
|
117
|
-
note: Info,
|
|
118
|
-
tip: Lightbulb,
|
|
119
|
-
important: MessageSquareWarning,
|
|
120
|
-
warning: TriangleAlert,
|
|
121
|
-
caution: OctagonAlert
|
|
122
|
-
};
|
|
123
|
-
const ALERT_LABELS = {
|
|
124
|
-
note: "Note",
|
|
125
|
-
tip: "Tip",
|
|
126
|
-
important: "Important",
|
|
127
|
-
warning: "Warning",
|
|
128
|
-
caution: "Caution"
|
|
129
|
-
};
|
|
130
|
-
const ALL_TYPES = ["note", "tip", "important", "warning", "caution"];
|
|
131
|
-
const AlertRenderer = ({ type }) => {
|
|
132
|
-
const Icon = ALERT_ICONS[type];
|
|
133
|
-
const label = ALERT_LABELS[type];
|
|
134
|
-
return /* @__PURE__ */ jsxs(
|
|
135
|
-
"div",
|
|
136
|
-
{
|
|
137
|
-
className: `${alertHeader} ${alertType({ type })} ${semanticClassNames.header} ${semanticTypeClassNames.header[type]}`,
|
|
138
|
-
children: [
|
|
139
|
-
/* @__PURE__ */ jsx(Icon, { className: `${alertIcon} ${semanticClassNames.icon}` }),
|
|
140
|
-
/* @__PURE__ */ jsx("span", { className: `${alertLabel} ${semanticClassNames.label}`, children: label })
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
};
|
|
145
|
-
export {
|
|
146
|
-
AlertRenderer as A,
|
|
147
|
-
alertHeader as a,
|
|
148
|
-
semanticTypeClassNames as b,
|
|
149
|
-
alertTrigger as c,
|
|
150
|
-
ALERT_ICONS as d,
|
|
151
|
-
alertIcon as e,
|
|
152
|
-
ALERT_LABELS as f,
|
|
153
|
-
alertLabel as g,
|
|
154
|
-
alertChevron as h,
|
|
155
|
-
ALL_TYPES as i,
|
|
156
|
-
alertMenuIcon as j,
|
|
157
|
-
alertType as k,
|
|
158
|
-
semanticClassNames as s
|
|
159
|
-
};
|