@haklex/rich-renderer-banner 0.0.80 → 0.0.82

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,176 @@
1
+ import { Info, Lightbulb, MessageSquareWarning, OctagonAlert, TriangleAlert } from "lucide-react";
2
+ import { jsx } 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-banner",
94
+ inner: "rich-banner-inner",
95
+ icon: "rich-banner-icon",
96
+ content: "rich-banner-content",
97
+ contentEditable: "rich-banner-content-editable"
98
+ };
99
+ var semanticTypeClassNames = {
100
+ root: {
101
+ note: "rich-banner-note",
102
+ tip: "rich-banner-tip",
103
+ important: "rich-banner-important",
104
+ warning: "rich-banner-warning",
105
+ caution: "rich-banner-caution"
106
+ },
107
+ icon: {
108
+ note: "rich-banner-icon-note",
109
+ tip: "rich-banner-icon-tip",
110
+ important: "rich-banner-icon-important",
111
+ warning: "rich-banner-icon-warning",
112
+ caution: "rich-banner-icon-caution"
113
+ }
114
+ };
115
+ var bannerIcon = "_1gu0svs2";
116
+ createRuntimeFn({
117
+ defaultClassName: "_1gu0svs5",
118
+ variantClassNames: { type: {
119
+ note: "_1gu0svs6",
120
+ tip: "_1gu0svs7",
121
+ important: "_1gu0svs8",
122
+ warning: "_1gu0svs9",
123
+ caution: "_1gu0svsa"
124
+ } },
125
+ defaultVariants: {},
126
+ compoundVariants: []
127
+ });
128
+ var bannerIconType = createRuntimeFn({
129
+ defaultClassName: "_1gu0svsb",
130
+ variantClassNames: { type: {
131
+ note: "_1gu0svsc",
132
+ tip: "_1gu0svsd",
133
+ important: "_1gu0svse",
134
+ warning: "_1gu0svsf",
135
+ caution: "_1gu0svsg"
136
+ } },
137
+ defaultVariants: {},
138
+ compoundVariants: []
139
+ });
140
+ var bannerTrigger = "_1gu0svsh";
141
+ var bannerMenuIcon = "_1gu0svsi";
142
+ //#endregion
143
+ //#region src/BannerRenderer.tsx
144
+ var BANNER_ICONS = {
145
+ note: Info,
146
+ tip: Lightbulb,
147
+ important: MessageSquareWarning,
148
+ warning: TriangleAlert,
149
+ caution: OctagonAlert
150
+ };
151
+ var BANNER_LABELS = {
152
+ note: "Note",
153
+ tip: "Tip",
154
+ important: "Important",
155
+ warning: "Warning",
156
+ caution: "Caution"
157
+ };
158
+ var ALL_TYPES = [
159
+ "note",
160
+ "tip",
161
+ "important",
162
+ "warning",
163
+ "caution"
164
+ ];
165
+ var BannerRenderer = ({ type }) => {
166
+ const Icon = BANNER_ICONS[type];
167
+ return /* @__PURE__ */ jsx("span", {
168
+ className: `${bannerIcon} ${bannerIconType({ type })} ${semanticClassNames.icon} ${semanticTypeClassNames.icon[type]}`,
169
+ children: /* @__PURE__ */ jsx(Icon, {
170
+ height: "1em",
171
+ width: "1em"
172
+ })
173
+ });
174
+ };
175
+ //#endregion
176
+ export { bannerIcon as a, bannerTrigger as c, BannerRenderer as i, semanticClassNames as l, BANNER_ICONS as n, bannerIconType as o, BANNER_LABELS as r, bannerMenuIcon as s, ALL_TYPES as t, semanticTypeClassNames as u };
package/dist/index.mjs CHANGED
@@ -1,30 +1,27 @@
1
+ import { a as bannerIcon, c as bannerTrigger, i as BannerRenderer, l as semanticClassNames, n as BANNER_ICONS, o as bannerIconType, r as BANNER_LABELS, s as bannerMenuIcon, t as ALL_TYPES, u as semanticTypeClassNames } from "./BannerRenderer-CviVKBmS.js";
2
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@haklex/rich-editor-ui";
1
3
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from "@haklex/rich-editor-ui";
3
- import { B as BannerRenderer, b as bannerTrigger, a as bannerIcon, s as semanticClassNames, c as semanticTypeClassNames, d as BANNER_ICONS, e as bannerIconType, A as ALL_TYPES, f as bannerMenuIcon, g as BANNER_LABELS } from "./BannerRenderer-CQJ0QF0E.js";
4
- const BannerEditRenderer = ({ type, editable, onTypeChange }) => {
5
- if (!editable || !onTypeChange) {
6
- return /* @__PURE__ */ jsx(BannerRenderer, { type });
7
- }
8
- const Icon = BANNER_ICONS[type];
9
- return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
10
- /* @__PURE__ */ jsx(
11
- DropdownMenuTrigger,
12
- {
13
- className: `${bannerTrigger} ${bannerIcon} ${bannerIconType({ type })} ${semanticClassNames.icon} ${semanticTypeClassNames.icon[type]}`,
14
- children: /* @__PURE__ */ jsx(Icon, { height: "1em", width: "1em" })
15
- }
16
- ),
17
- /* @__PURE__ */ jsx(DropdownMenuContent, { align: "start", sideOffset: 6, children: ALL_TYPES.map((t) => {
18
- const ItemIcon = BANNER_ICONS[t];
19
- return /* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => onTypeChange(t), children: [
20
- /* @__PURE__ */ jsx(ItemIcon, { className: `${bannerMenuIcon} ${bannerIconType({ type: t })}` }),
21
- /* @__PURE__ */ jsx("span", { children: BANNER_LABELS[t] })
22
- ] }, t);
23
- }) })
24
- ] });
25
- };
26
- export {
27
- BannerEditRenderer,
28
- BannerRenderer,
29
- BannerRenderer as default
4
+ //#region src/BannerEditRenderer.tsx
5
+ var BannerEditRenderer = ({ type, editable, onTypeChange }) => {
6
+ if (!editable || !onTypeChange) return /* @__PURE__ */ jsx(BannerRenderer, { type });
7
+ const Icon = BANNER_ICONS[type];
8
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
9
+ className: `${bannerTrigger} ${bannerIcon} ${bannerIconType({ type })} ${semanticClassNames.icon} ${semanticTypeClassNames.icon[type]}`,
10
+ children: /* @__PURE__ */ jsx(Icon, {
11
+ height: "1em",
12
+ width: "1em"
13
+ })
14
+ }), /* @__PURE__ */ jsx(DropdownMenuContent, {
15
+ align: "start",
16
+ sideOffset: 6,
17
+ children: ALL_TYPES.map((t) => {
18
+ const ItemIcon = BANNER_ICONS[t];
19
+ return /* @__PURE__ */ jsxs(DropdownMenuItem, {
20
+ onClick: () => onTypeChange(t),
21
+ children: [/* @__PURE__ */ jsx(ItemIcon, { className: `${bannerMenuIcon} ${bannerIconType({ type: t })}` }), /* @__PURE__ */ jsx("span", { children: BANNER_LABELS[t] })]
22
+ }, t);
23
+ })
24
+ })] });
30
25
  };
26
+ //#endregion
27
+ export { BannerEditRenderer, BannerRenderer, BannerRenderer 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}._1cbiugx0{--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}._1cbiugx1{--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}._1cbiugx2{--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 ._1cbiugx0,[data-theme=dark] ._1cbiugx0,.dark._1cbiugx0,[data-theme=dark]._1cbiugx0,.dark ._1cbiugx1,[data-theme=dark] ._1cbiugx1,.dark._1cbiugx1,[data-theme=dark]._1cbiugx1,.dark ._1cbiugx2,[data-theme=dark] ._1cbiugx2,.dark._1cbiugx2,[data-theme=dark]._1cbiugx2{--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)}._1gu0svs0{border-radius:var(--rc-radius-md);border:1px solid;padding:var(--rc-space-lg);margin:var(--rc-space-md) 0;color:var(--rc-text);line-height:1.8}._1gu0svs1{display:flex;flex-direction:row;align-items:center;gap:var(--rc-space-md)}._1gu0svs2{display:inline-flex;flex-shrink:0;font-size:1.5em;align-self:flex-start}._1gu0svs3{flex:1;min-width:0;min-height:1em}._1gu0svs4{outline:none}._1gu0svs6{background-color:color-mix(in srgb,var(--rc-alert-info) 8%,transparent);border-color:color-mix(in srgb,var(--rc-alert-info) 30%,transparent)}._1gu0svs7{background-color:color-mix(in srgb,var(--rc-alert-tip) 8%,transparent);border-color:color-mix(in srgb,var(--rc-alert-tip) 30%,transparent)}._1gu0svs8{background-color:color-mix(in srgb,var(--rc-alert-important) 8%,transparent);border-color:color-mix(in srgb,var(--rc-alert-important) 30%,transparent)}._1gu0svs9{background-color:color-mix(in srgb,var(--rc-alert-warning) 8%,transparent);border-color:color-mix(in srgb,var(--rc-alert-warning) 30%,transparent)}._1gu0svsa{background-color:color-mix(in srgb,var(--rc-alert-caution) 8%,transparent);border-color:color-mix(in srgb,var(--rc-alert-caution) 30%,transparent)}._1gu0svsc{color:var(--rc-alert-info)}._1gu0svsd{color:var(--rc-alert-tip)}._1gu0svse{color:var(--rc-alert-important)}._1gu0svsf{color:var(--rc-alert-warning)}._1gu0svsg{color:var(--rc-alert-caution)}._1gu0svsh{cursor:pointer;border-radius:4px;border:none;background:none;padding:2px;margin:-2px;transition:background-color .15s}._1gu0svsh:hover{background-color:color-mix(in srgb,var(--rc-text) 8%,transparent)}._1gu0svsi{width:16px;height:16px;flex-shrink:0}.rich-banner{border-radius:var(--rc-radius-md);border:1px solid;padding:var(--rc-space-lg);margin:var(--rc-space-md) 0;color:var(--rc-text);line-height:1.8}.rich-banner-inner{display:flex;flex-direction:row;align-items:center;gap:var(--rc-space-md)}.rich-banner-icon{display:inline-flex;flex-shrink:0;font-size:1.5em;align-self:flex-start}.rich-banner-content{flex:1;min-width:0;min-height:1em}.rich-banner-content-editable{outline:none}.rich-banner-content>.rich-paragraph:first-child{margin-top:0}.rich-banner-content>.rich-paragraph:last-child{margin-bottom:0}.rich-banner-content .rich-paragraph{margin:0 0 .5em}.rich-banner-content .rich-paragraph:last-child{margin-bottom:0}.rich-banner-icon-note{color:var(--rc-alert-info)}.rich-banner-note{background-color:color-mix(in srgb,var(--rc-alert-info) 8%,transparent);border-color:color-mix(in srgb,var(--rc-alert-info) 30%,transparent)}.rich-banner-icon-tip{color:var(--rc-alert-tip)}.rich-banner-tip{background-color:color-mix(in srgb,var(--rc-alert-tip) 8%,transparent);border-color:color-mix(in srgb,var(--rc-alert-tip) 30%,transparent)}.rich-banner-icon-important{color:var(--rc-alert-important)}.rich-banner-important{background-color:color-mix(in srgb,var(--rc-alert-important) 8%,transparent);border-color:color-mix(in srgb,var(--rc-alert-important) 30%,transparent)}.rich-banner-icon-warning{color:var(--rc-alert-warning)}.rich-banner-warning{background-color:color-mix(in srgb,var(--rc-alert-warning) 8%,transparent);border-color:color-mix(in srgb,var(--rc-alert-warning) 30%,transparent)}.rich-banner-icon-caution{color:var(--rc-alert-caution)}.rich-banner-caution{background-color:color-mix(in srgb,var(--rc-alert-caution) 8%,transparent);border-color:color-mix(in srgb,var(--rc-alert-caution) 30%,transparent)}
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}._1cbiugx0{--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}._1cbiugx1{--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}._1cbiugx2{--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 ._1cbiugx0,[data-theme=dark] ._1cbiugx0,.dark._1cbiugx0,[data-theme=dark]._1cbiugx0,.dark ._1cbiugx1,[data-theme=dark] ._1cbiugx1,.dark._1cbiugx1,[data-theme=dark]._1cbiugx1,.dark ._1cbiugx2,[data-theme=dark] ._1cbiugx2,.dark._1cbiugx2,[data-theme=dark]._1cbiugx2{--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}._1gu0svs0{border-radius:var(--rc-radius-md);padding:var(--rc-space-lg);margin:var(--rc-space-md) 0;color:var(--rc-text);border:1px solid;line-height:1.8}._1gu0svs1{align-items:center;gap:var(--rc-space-md);flex-direction:row;display:flex}._1gu0svs2{flex-shrink:0;align-self:flex-start;font-size:1.5em;display:inline-flex}._1gu0svs3{flex:1;min-width:0;min-height:1em}._1gu0svs4{outline:none}._1gu0svs6{background-color:color-mix(in srgb, var(--rc-alert-info) 8%, transparent);border-color:color-mix(in srgb, var(--rc-alert-info) 30%, transparent)}._1gu0svs7{background-color:color-mix(in srgb, var(--rc-alert-tip) 8%, transparent);border-color:color-mix(in srgb, var(--rc-alert-tip) 30%, transparent)}._1gu0svs8{background-color:color-mix(in srgb, var(--rc-alert-important) 8%, transparent);border-color:color-mix(in srgb, var(--rc-alert-important) 30%, transparent)}._1gu0svs9{background-color:color-mix(in srgb, var(--rc-alert-warning) 8%, transparent);border-color:color-mix(in srgb, var(--rc-alert-warning) 30%, transparent)}._1gu0svsa{background-color:color-mix(in srgb, var(--rc-alert-caution) 8%, transparent);border-color:color-mix(in srgb, var(--rc-alert-caution) 30%, transparent)}._1gu0svsc{color:var(--rc-alert-info)}._1gu0svsd{color:var(--rc-alert-tip)}._1gu0svse{color:var(--rc-alert-important)}._1gu0svsf{color:var(--rc-alert-warning)}._1gu0svsg{color:var(--rc-alert-caution)}._1gu0svsh{cursor:pointer;background:0 0;border:none;border-radius:4px;margin:-2px;padding:2px;transition:background-color .15s}._1gu0svsh:hover{background-color:color-mix(in srgb, var(--rc-text) 8%, transparent)}._1gu0svsi{flex-shrink:0;width:16px;height:16px}.rich-banner{border-radius:var(--rc-radius-md);padding:var(--rc-space-lg);margin:var(--rc-space-md) 0;color:var(--rc-text);border:1px solid;line-height:1.8}.rich-banner-inner{align-items:center;gap:var(--rc-space-md);flex-direction:row;display:flex}.rich-banner-icon{flex-shrink:0;align-self:flex-start;font-size:1.5em;display:inline-flex}.rich-banner-content{flex:1;min-width:0;min-height:1em}.rich-banner-content-editable{outline:none}.rich-banner-content>.rich-paragraph:first-child{margin-top:0}.rich-banner-content>.rich-paragraph:last-child{margin-bottom:0}.rich-banner-content .rich-paragraph{margin:0 0 .5em}.rich-banner-content .rich-paragraph:last-child{margin-bottom:0}.rich-banner-icon-note{color:var(--rc-alert-info)}.rich-banner-note{background-color:color-mix(in srgb, var(--rc-alert-info) 8%, transparent);border-color:color-mix(in srgb, var(--rc-alert-info) 30%, transparent)}.rich-banner-icon-tip{color:var(--rc-alert-tip)}.rich-banner-tip{background-color:color-mix(in srgb, var(--rc-alert-tip) 8%, transparent);border-color:color-mix(in srgb, var(--rc-alert-tip) 30%, transparent)}.rich-banner-icon-important{color:var(--rc-alert-important)}.rich-banner-important{background-color:color-mix(in srgb, var(--rc-alert-important) 8%, transparent);border-color:color-mix(in srgb, var(--rc-alert-important) 30%, transparent)}.rich-banner-icon-warning{color:var(--rc-alert-warning)}.rich-banner-warning{background-color:color-mix(in srgb, var(--rc-alert-warning) 8%, transparent);border-color:color-mix(in srgb, var(--rc-alert-warning) 30%, transparent)}.rich-banner-icon-caution{color:var(--rc-alert-caution)}.rich-banner-caution{background-color:color-mix(in srgb, var(--rc-alert-caution) 8%, transparent);border-color:color-mix(in srgb, var(--rc-alert-caution) 30%, transparent)}
2
+ /*$vite$:1*/
package/dist/static.mjs CHANGED
@@ -1,5 +1,2 @@
1
- import { B, B as B2 } from "./BannerRenderer-CQJ0QF0E.js";
2
- export {
3
- B as BannerRenderer,
4
- B2 as default
5
- };
1
+ import { i as BannerRenderer } from "./BannerRenderer-CviVKBmS.js";
2
+ export { BannerRenderer, BannerRenderer as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-renderer-banner",
3
- "version": "0.0.80",
3
+ "version": "0.0.82",
4
4
  "description": "Banner 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.80",
30
- "@haklex/rich-editor-ui": "0.0.80",
31
- "@haklex/rich-style-token": "0.0.80"
29
+ "@haklex/rich-editor": "0.0.82",
30
+ "@haklex/rich-style-token": "0.0.82",
31
+ "@haklex/rich-editor-ui": "0.0.82"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/react": "^19.2.14",
@@ -1,150 +0,0 @@
1
- import { 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 = { icon: "rich-banner-icon" };
108
- var semanticTypeClassNames = { icon: { note: "rich-banner-icon-note", tip: "rich-banner-icon-tip", important: "rich-banner-icon-important", warning: "rich-banner-icon-warning", caution: "rich-banner-icon-caution" } };
109
- var bannerIcon = "_1gu0svs2";
110
- createRuntimeFn({ defaultClassName: "_1gu0svs5", variantClassNames: { type: { note: "_1gu0svs6", tip: "_1gu0svs7", important: "_1gu0svs8", warning: "_1gu0svs9", caution: "_1gu0svsa" } }, defaultVariants: {}, compoundVariants: [] });
111
- var bannerIconType = createRuntimeFn({ defaultClassName: "_1gu0svsb", variantClassNames: { type: { note: "_1gu0svsc", tip: "_1gu0svsd", important: "_1gu0svse", warning: "_1gu0svsf", caution: "_1gu0svsg" } }, defaultVariants: {}, compoundVariants: [] });
112
- var bannerTrigger = "_1gu0svsh";
113
- var bannerMenuIcon = "_1gu0svsi";
114
- const BANNER_ICONS = {
115
- note: Info,
116
- tip: Lightbulb,
117
- important: MessageSquareWarning,
118
- warning: TriangleAlert,
119
- caution: OctagonAlert
120
- };
121
- const BANNER_LABELS = {
122
- note: "Note",
123
- tip: "Tip",
124
- important: "Important",
125
- warning: "Warning",
126
- caution: "Caution"
127
- };
128
- const ALL_TYPES = ["note", "tip", "important", "warning", "caution"];
129
- const BannerRenderer = ({ type }) => {
130
- const Icon = BANNER_ICONS[type];
131
- return /* @__PURE__ */ jsx(
132
- "span",
133
- {
134
- className: `${bannerIcon} ${bannerIconType({ type })} ${semanticClassNames.icon} ${semanticTypeClassNames.icon[type]}`,
135
- children: /* @__PURE__ */ jsx(Icon, { height: "1em", width: "1em" })
136
- }
137
- );
138
- };
139
- export {
140
- ALL_TYPES as A,
141
- BannerRenderer as B,
142
- bannerIcon as a,
143
- bannerTrigger as b,
144
- semanticTypeClassNames as c,
145
- BANNER_ICONS as d,
146
- bannerIconType as e,
147
- bannerMenuIcon as f,
148
- BANNER_LABELS as g,
149
- semanticClassNames as s
150
- };