@unicom-cloud/ui 0.8.110 → 0.8.112
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/Affix.js +3 -3
- package/Alert.js +1 -1
- package/AutoComplete.js +1 -1
- package/BackTop.js +1 -1
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +1 -1
- package/Card.js +1 -1
- package/Carousel.js +2 -2
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/ColorPicker.js +1 -1
- package/Comment.js +1 -1
- package/ConfigProvider.js +1 -1
- package/Copy.js +2 -2
- package/Countdown.js +17 -17
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Details.js +19 -19
- package/Development.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Flex.js +18 -18
- package/Form.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/LiquidFill.js +19 -19
- package/List.js +1 -1
- package/Loading.js +18 -18
- package/Marquee.js +19 -19
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +18 -18
- package/Notification.js +1 -1
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +2 -2
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/QrCode.js +18 -18
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/RichText.js +13 -70
- package/Segmented.js +20 -20
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +18 -18
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Tour.js +19 -19
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +2 -2
- package/affix/index.js +3 -3
- package/alert/index.js +1 -1
- package/anchor/Anchor.js +1 -1
- package/anchor/Link.js +1 -1
- package/app/App.js +2 -2
- package/auto-complete/index.js +1 -1
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumb/index.js +2 -2
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +2 -2
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +1 -1
- package/carousel/Indicator.js +1 -1
- package/carousel/index.js +2 -2
- package/cascader/Cascader.js +3 -3
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{Y_GQsZUt.js → 0BhDjhcd.js} +1 -1
- package/chunk/{BDMqvmVH.js → BCmfDFV4.js} +28 -30
- package/chunk/{n1tirBXA.js → BfVlSL8A.js} +3 -3
- package/chunk/BiZSULcr.js +1872 -0
- package/chunk/{BcEZk8pT.js → C1vY8016.js} +14 -14
- package/chunk/{qsVvkBLU.js → C3kH2ES3.js} +1 -1
- package/chunk/{BGJspFG9.js → C5CbL5ku.js} +1 -1
- package/chunk/CAA93JLq.js +6 -0
- package/chunk/{B8W1N4er.js → CHQ8c547.js} +11 -10
- package/chunk/{Dbw0YUY1.js → CYssV-zz.js} +36 -36
- package/chunk/CrOzsnI0.js +51 -0
- package/chunk/{CFyN9Eio.js → CtCFA4ht.js} +4 -4
- package/chunk/{BnUWOu3_.js → Cx92e1S8.js} +3 -3
- package/chunk/{BeHcDey_.js → CylbdYce.js} +1 -1
- package/chunk/{BUNoUPLs.js → DMv8Hn4u.js} +1 -1
- package/chunk/{zFFM4RBT.js → DfUcAhyT.js} +703 -680
- package/chunk/{DSqW_efI.js → DfbO4QTS.js} +152 -156
- package/chunk/{CgN4U7Ou.js → DhAvt6tJ.js} +2 -2
- package/chunk/DsuIQH0F.js +200 -0
- package/chunk/{Lyh0cz3R.js → KPBMJlOB.js} +1 -1
- package/chunk/{B_c0gPsX.js → vP3qfmKM.js} +24 -23
- package/collapse/Collapse.js +1 -1
- package/collapse/Item.js +1 -1
- package/color-picker/ControlBar.js +1 -1
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +1 -1
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +2 -2
- package/countdown/index.js +17 -17
- package/date-picker/Picker.js +1 -1
- package/date-picker/RangePicker.js +2 -2
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +1 -1
- package/details/index.js +19 -19
- package/development/index.js +1 -1
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +1 -1
- package/empty/index.js +1 -1
- package/flex/index.js +18 -18
- package/form/Form.js +2 -2
- package/form/FormItem.js +1 -1
- package/form/index.js +1 -1
- package/grid/Grid.js +1 -1
- package/grid/Item.js +1 -1
- package/hooks/index.js +96 -97
- package/hooks/useId.js +1 -1
- package/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/hooks/useResizeObserver.js +58 -2
- package/hooks/useWindowSize.js +1 -1
- package/icon/index.js +1 -1
- package/icon-hover/index.js +1 -1
- package/icons/file.js +1 -1
- package/image/Image.js +2 -2
- package/image/ImagePreview.js +22 -22
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +691 -693
- package/input/Button.js +1 -1
- package/input/Group.js +1 -1
- package/input/Input.js +2 -2
- package/input/InputElement.js +2 -2
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +2 -2
- package/input-number/index.js +1 -1
- package/input-number/useSelectionRange.js +1 -1
- package/input-tag/InputTag.js +1 -1
- package/layout/Content.js +1 -1
- package/layout/Footer.js +1 -1
- package/layout/Header.js +1 -1
- package/layout/Sider.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/liquid-fill/index.js +24 -24
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +1 -1
- package/loading/index.js +18 -18
- package/marquee/index.js +22 -22
- package/marquee-/index.js +22 -22
- package/mentions/index.js +1 -1
- package/menu/Menu.js +3 -3
- package/menu/OverflowWrap.js +2 -2
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +2 -2
- package/notice/index.js +18 -18
- package/notification/index.js +1 -1
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +2 -2
- package/overflow-ellipsis/index.js +2 -2
- package/package.json +1 -1
- package/page-header/index.js +2 -2
- package/pagination/PageItem.js +1 -1
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/popconfirm/index.js +1 -1
- package/popover/index.js +1 -1
- package/progress/CircleProgress.js +1 -1
- package/progress/index.js +1 -1
- package/qr-code/index.js +18 -18
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +1 -1
- package/resize-box/ResizeTrigger.js +2 -2
- package/resize-box/Split.js +2 -2
- package/resize-box/SplitGroup.js +1 -1
- package/resize-box/index.js +1 -1
- package/result/index.js +1 -1
- package/rich-text/core.js +1 -1
- package/rich-text/index.js +65 -128
- package/rich-text/rich.js +406 -936
- package/row-col/Col-.js +1 -1
- package/row-col/Col.js +71 -74
- package/row-col/Row.js +1 -1
- package/segmented/index.js +23 -23
- package/select/Option.js +1 -1
- package/select/Select.js +4 -4
- package/select-view/Core.js +1 -1
- package/skeleton/index.js +1 -1
- package/slider/Button.js +1 -1
- package/slider/index.js +1 -1
- package/space/index.js +18 -18
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +1 -1
- package/splitter/Panel.js +1 -1
- package/splitter/SplitBar.js +2 -2
- package/splitter/Splitter.js +3 -3
- package/statistic/index.js +1 -1
- package/steps/index.js +1 -1
- package/style.css +1 -1
- package/switch/index.js +1 -1
- package/table/Table.js +61 -11
- package/table/index.js +4 -4
- package/tabs/Tab.js +3 -3
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +1 -1
- package/tabs/index.js +2 -2
- package/tag/index.js +1 -1
- package/time-picker/Picker.js +1 -1
- package/time-picker/TimePicker.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/tooltip/index.js +1 -1
- package/tour/index.js +27 -27
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +1 -1
- package/tree/Animation.js +2 -2
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/Select.js +3 -3
- package/tree-select/index.js +1 -1
- package/trigger/index.js +2 -2
- package/types/common/hooks/src/use-size/index.d.ts +1 -1
- package/types/common/hooks/src/use-theme/index.d.ts +2 -2
- package/types/common/hooks/src/utils/isBrowser.d.ts +1 -1
- package/types/common/hooks/useResizeObserver.d.ts +1 -5
- package/types/common/hooks/useWindowSize.d.ts +1 -1
- package/types/common/utils/emitter.d.ts +1 -0
- package/types/common/utils/index.d.ts +1 -1
- package/types/pc/index.d.ts +1 -1
- package/types/pc/menu/context.d.ts +1 -1
- package/types/pc/rich-text/blots/scroll.d.ts +2 -8
- package/types/pc/rich-text/core/emitter.d.ts +2 -3
- package/types/pc/rich-text/core/rich.d.ts +11 -44
- package/types/pc/rich-text/core/selection.d.ts +1 -8
- package/types/pc/rich-text/core/theme.d.ts +3 -0
- package/types/pc/rich-text/parchment/blot/abstract/parent.d.ts +2 -4
- package/types/pc/rich-text/themes/base.d.ts +3 -0
- package/types/pc/rich-text/themes/{snow.d.ts → pqb.d.ts} +2 -2
- package/types/pc/rich-text/ui/tooltip.d.ts +2 -0
- package/types/pc/utils/emitter.d.ts +1 -0
- package/types/pc/utils/index.d.ts +1 -1
- package/typography/Base.js +2 -2
- package/typography/Ellipsis.js +3 -3
- package/typography/Operations.js +2 -2
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/typography/useEllipsis.js +1 -1
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/emitter.js +5 -0
- package/utils/index.js +3 -3
- package/utils/resizeObserver.js +1 -1
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +2 -2
- package/watermark/Watermark.js +1 -1
- package/chunk/BDgzrqDN.js +0 -154
- package/chunk/COc48wzV.js +0 -64
- package/chunk/COsRZOz1.js +0 -1813
- package/chunk/CylJZkp8.js +0 -6
- package/chunk/Di5KBCVQ.js +0 -4
- package/chunk/cW_5U6dL.js +0 -28
- package/rich-text/eventemitter/index.d.ts +0 -135
- package/types/common/utils/mitt.d.ts +0 -1
- package/types/pc/rich-text/eventemitter/index.d.ts +0 -101
- package/types/pc/rich-text/themes/bubble.d.ts +0 -18
- package/types/pc/utils/mitt.d.ts +0 -1
- package/utils/mitt.js +0 -5
|
@@ -118,11 +118,9 @@ declare class Rich {
|
|
|
118
118
|
uploader: Uploader;
|
|
119
119
|
options: ExpandedRichOptions;
|
|
120
120
|
constructor(container: HTMLElement | string, options?: RichOptions);
|
|
121
|
-
addContainer(container: string, refNode?: Node | null): HTMLDivElement;
|
|
122
|
-
addContainer(container: HTMLElement, refNode?: Node | null): HTMLElement;
|
|
121
|
+
addContainer(container: string | HTMLElement, refNode?: Node | null, parentElement?: HTMLElement): HTMLDivElement | HTMLElement;
|
|
123
122
|
blur(): void;
|
|
124
|
-
deleteText(
|
|
125
|
-
deleteText(index: number, length: number, source?: EmitterSource): Delta;
|
|
123
|
+
deleteText(index: number | Range, length?: number | EmitterSource, source?: EmitterSource): Delta;
|
|
126
124
|
disable(): void;
|
|
127
125
|
editReadOnly<T>(modifier: () => T): T;
|
|
128
126
|
enable(enabled?: boolean): void;
|
|
@@ -130,11 +128,8 @@ declare class Rich {
|
|
|
130
128
|
preventScroll?: boolean;
|
|
131
129
|
}): void;
|
|
132
130
|
format(name: string, value: unknown, source?: EmitterSource): Delta;
|
|
133
|
-
formatLine(index: number, length: number,
|
|
134
|
-
|
|
135
|
-
formatText(range: Range, name: string, value: unknown, source?: EmitterSource): Delta;
|
|
136
|
-
formatText(index: number, length: number, name: string, value: unknown, source?: EmitterSource): Delta;
|
|
137
|
-
formatText(index: number, length: number, formats: Record<string, unknown>, source?: EmitterSource): Delta;
|
|
131
|
+
formatLine(index: number, length: number, name: string | Record<string, unknown>, value?: unknown | EmitterSource, source?: EmitterSource): Delta;
|
|
132
|
+
formatText(index: number | Range, length: number | string, name: string | unknown, value?: unknown | EmitterSource, source?: EmitterSource): Delta;
|
|
138
133
|
getBounds(index: number | Range, length?: number): Bounds | null;
|
|
139
134
|
getContents(index?: number, length?: number): Delta;
|
|
140
135
|
getFormat(index?: number, length?: number): {
|
|
@@ -147,36 +142,17 @@ declare class Rich {
|
|
|
147
142
|
getLength(): number;
|
|
148
143
|
getLeaf(index: number): [Parchment.LeafBlot | null, number];
|
|
149
144
|
getLine(index: number): [Block | BlockEmbed | null, number];
|
|
150
|
-
getLines(
|
|
151
|
-
getLines(index?: number, length?: number): (Block | BlockEmbed)[];
|
|
145
|
+
getLines(index?: Range | number, length?: number): (Block | BlockEmbed)[];
|
|
152
146
|
getModule(name: string): unknown;
|
|
153
|
-
getSelection(focus: true): Range;
|
|
154
147
|
getSelection(focus?: boolean): Range | null;
|
|
155
|
-
getSemanticHTML(
|
|
156
|
-
|
|
157
|
-
getText(range?: Range): string;
|
|
158
|
-
getText(index?: number, length?: number): string;
|
|
148
|
+
getSemanticHTML(index?: Range | number, length?: number): string;
|
|
149
|
+
getText(index?: Range | number, length?: number): string;
|
|
159
150
|
hasFocus(): boolean;
|
|
160
151
|
insertEmbed(index: number, embed: string, value: unknown, source?: EmitterSource): Delta;
|
|
161
|
-
insertText(index: number, text: string, source?: EmitterSource): Delta;
|
|
162
|
-
insertText(index: number, text: string, formats: Record<string, unknown>, source?: EmitterSource): Delta;
|
|
163
|
-
insertText(index: number, text: string, name: string, value: unknown, source?: EmitterSource): Delta;
|
|
152
|
+
insertText(index: number, text: string, name?: string | Record<string, unknown> | EmitterSource, value?: unknown, source?: EmitterSource): Delta;
|
|
164
153
|
isEnabled(): boolean;
|
|
165
154
|
off(...args: Parameters<(typeof Emitter)['prototype']['off']>): void;
|
|
166
|
-
on(
|
|
167
|
-
on(event: (typeof Emitter)['events']['SELECTION_CHANGE'], handler: (range: Range, oldRange: Range, source: EmitterSource) => void): Emitter;
|
|
168
|
-
on(event: (typeof Emitter)['events']['EDITOR_CHANGE'], handler: (...args: [
|
|
169
|
-
(typeof Emitter)['events']['TEXT_CHANGE'],
|
|
170
|
-
Delta,
|
|
171
|
-
Delta,
|
|
172
|
-
EmitterSource
|
|
173
|
-
] | [
|
|
174
|
-
(typeof Emitter)['events']['SELECTION_CHANGE'],
|
|
175
|
-
Range,
|
|
176
|
-
Range,
|
|
177
|
-
EmitterSource
|
|
178
|
-
]) => void): Emitter;
|
|
179
|
-
on(event: string, ...args: unknown[]): Emitter;
|
|
155
|
+
on(...args: Parameters<(typeof Emitter)['prototype']['on']>): Emitter;
|
|
180
156
|
once(...args: Parameters<(typeof Emitter)['prototype']['once']>): void;
|
|
181
157
|
removeFormat(index: number, length: number, source?: EmitterSource): Delta;
|
|
182
158
|
scrollRectIntoView(rect: Rect, options?: ScrollRectIntoViewOptions): void;
|
|
@@ -190,10 +166,7 @@ declare class Rich {
|
|
|
190
166
|
*/
|
|
191
167
|
scrollSelectionIntoView(options?: ScrollRectIntoViewOptions): void;
|
|
192
168
|
setContents(delta: Delta | Op[], source?: EmitterSource): Delta;
|
|
193
|
-
setSelection(
|
|
194
|
-
setSelection(index: number, source?: EmitterSource): void;
|
|
195
|
-
setSelection(index: number, length?: number, source?: EmitterSource): void;
|
|
196
|
-
setSelection(index: number, source?: EmitterSource): void;
|
|
169
|
+
setSelection(index: Range | null | number, length?: EmitterSource | number, source?: EmitterSource): void;
|
|
197
170
|
setText(text: string, source?: EmitterSource): Delta;
|
|
198
171
|
update(source?: EmitterSource): void;
|
|
199
172
|
updateContents(delta: Delta | Op[], source?: EmitterSource): Delta;
|
|
@@ -205,13 +178,7 @@ type NormalizedIndexLength = [
|
|
|
205
178
|
Record<string, unknown>,
|
|
206
179
|
EmitterSource
|
|
207
180
|
];
|
|
208
|
-
declare function overload(index: number, source?: EmitterSource): NormalizedIndexLength;
|
|
209
|
-
declare function overload(index: number, length: number, source?: EmitterSource): NormalizedIndexLength;
|
|
210
|
-
declare function overload(index: number, length: number, format: string, value: unknown, source?: EmitterSource): NormalizedIndexLength;
|
|
211
|
-
declare function overload(index: number, length: number, format: Record<string, unknown>, source?: EmitterSource): NormalizedIndexLength;
|
|
212
|
-
declare function overload(range: Range, source?: EmitterSource): NormalizedIndexLength;
|
|
213
|
-
declare function overload(range: Range, format: string, value: unknown, source?: EmitterSource): NormalizedIndexLength;
|
|
214
|
-
declare function overload(range: Range, format: Record<string, unknown>, source?: EmitterSource): NormalizedIndexLength;
|
|
181
|
+
declare function overload(index: Range | number, length?: number | string | Record<string, unknown> | EmitterSource, name?: string | unknown | Record<string, unknown> | EmitterSource, value?: unknown | EmitterSource, source?: EmitterSource): NormalizedIndexLength;
|
|
215
182
|
export { Parchment, Range };
|
|
216
183
|
export type { Bounds, DebugLevel, EmitterSource };
|
|
217
184
|
export { Rich as default, expandConfig, globalRegistry, overload };
|
|
@@ -42,14 +42,7 @@ declare class Selection {
|
|
|
42
42
|
handleDragging(): void;
|
|
43
43
|
focus(): void;
|
|
44
44
|
format(format: string, value: unknown): void;
|
|
45
|
-
getBounds(index: number, length?: number):
|
|
46
|
-
bottom: number;
|
|
47
|
-
height: number;
|
|
48
|
-
left: number;
|
|
49
|
-
right: number;
|
|
50
|
-
top: number;
|
|
51
|
-
width: number;
|
|
52
|
-
} | null;
|
|
45
|
+
getBounds(index: number, length?: number): Bounds | null;
|
|
53
46
|
getNativeRange(): NormalizedRange | null;
|
|
54
47
|
getRange(): [Range, NormalizedRange] | [null, null];
|
|
55
48
|
hasFocus(): boolean;
|
|
@@ -4,14 +4,17 @@ import type History from '../modules/history.js';
|
|
|
4
4
|
import type Keyboard from '../modules/keyboard.js';
|
|
5
5
|
import type { ToolbarProps } from '../modules/toolbar.js';
|
|
6
6
|
import type Uploader from '../modules/uploader.js';
|
|
7
|
+
import Tooltip from '../ui/tooltip.js';
|
|
7
8
|
export interface ThemeOptions {
|
|
8
9
|
modules: Record<string, unknown> & {
|
|
9
10
|
toolbar?: null | ToolbarProps;
|
|
10
11
|
};
|
|
12
|
+
bounds?: HTMLElement;
|
|
11
13
|
}
|
|
12
14
|
declare class Theme {
|
|
13
15
|
protected rich: Rich;
|
|
14
16
|
protected options: ThemeOptions;
|
|
17
|
+
tooltip?: Tooltip;
|
|
15
18
|
static DEFAULTS: ThemeOptions;
|
|
16
19
|
static themes: {
|
|
17
20
|
default: typeof Theme;
|
|
@@ -23,10 +23,8 @@ declare class ParentBlot extends ShadowBlot implements Parent {
|
|
|
23
23
|
*/
|
|
24
24
|
build(): void;
|
|
25
25
|
deleteAt(index: number, length: number): void;
|
|
26
|
-
descendant
|
|
27
|
-
|
|
28
|
-
descendants<T extends Blot>(criteria: new (...args: any[]) => T, index?: number, length?: number): T[];
|
|
29
|
-
descendants(criteria: (blot: Blot) => boolean, index?: number, length?: number): Blot[];
|
|
26
|
+
descendant(criteria: any, index?: number): [Blot | null, number];
|
|
27
|
+
descendants(criteria: any, index?: number, length?: number): Blot[];
|
|
30
28
|
detach(): void;
|
|
31
29
|
enforceAllowedChildren(): void;
|
|
32
30
|
formatAt(index: number, length: number, name: string, value: any): void;
|
|
@@ -6,6 +6,7 @@ import Theme from '../core/theme.js';
|
|
|
6
6
|
import type Clipboard from '../modules/clipboard.js';
|
|
7
7
|
import type History from '../modules/history.js';
|
|
8
8
|
import type Keyboard from '../modules/keyboard.js';
|
|
9
|
+
import type Toolbar from '../modules/toolbar.js';
|
|
9
10
|
import type Uploader from '../modules/uploader.js';
|
|
10
11
|
import Picker from '../ui/picker.js';
|
|
11
12
|
import Tooltip from '../ui/tooltip.js';
|
|
@@ -13,6 +14,7 @@ declare class BaseTheme extends Theme {
|
|
|
13
14
|
pickers: Picker[];
|
|
14
15
|
tooltip?: Tooltip;
|
|
15
16
|
constructor(rich: Rich, options: ThemeOptions);
|
|
17
|
+
extendToolbar(toolbar: Toolbar): void;
|
|
16
18
|
addModule(name: 'clipboard'): Clipboard;
|
|
17
19
|
addModule(name: 'keyboard'): Keyboard;
|
|
18
20
|
addModule(name: 'uploader'): Uploader;
|
|
@@ -25,6 +27,7 @@ declare class BaseTheme extends Theme {
|
|
|
25
27
|
declare class BaseTooltip extends Tooltip {
|
|
26
28
|
textbox: HTMLInputElement | null;
|
|
27
29
|
linkRange?: Range;
|
|
30
|
+
static TEMPLATE: string;
|
|
28
31
|
constructor(rich: Rich, boundsContainer?: HTMLElement);
|
|
29
32
|
listen(): void;
|
|
30
33
|
cancel(): void;
|
|
@@ -2,8 +2,8 @@ import Rich from '../core/rich.js';
|
|
|
2
2
|
import type { ThemeOptions } from '../core/theme.js';
|
|
3
3
|
import type Toolbar from '../modules/toolbar.js';
|
|
4
4
|
import BaseTheme from './base.js';
|
|
5
|
-
declare class
|
|
5
|
+
declare class PqbTheme extends BaseTheme {
|
|
6
6
|
constructor(rich: Rich, options: ThemeOptions);
|
|
7
7
|
extendToolbar(toolbar: Toolbar): void;
|
|
8
8
|
}
|
|
9
|
-
export default
|
|
9
|
+
export default PqbTheme;
|
|
@@ -4,9 +4,11 @@ declare class Tooltip {
|
|
|
4
4
|
rich: Rich;
|
|
5
5
|
boundsContainer: HTMLElement;
|
|
6
6
|
root: HTMLDivElement;
|
|
7
|
+
static TEMPLATE: string;
|
|
7
8
|
constructor(rich: Rich, boundsContainer?: HTMLElement);
|
|
8
9
|
hide(): void;
|
|
9
10
|
position(reference: Bounds): number;
|
|
10
11
|
show(): void;
|
|
12
|
+
edit(mode?: string, preview?: string | null): void;
|
|
11
13
|
}
|
|
12
14
|
export default Tooltip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, default as emitter } from '../../common/utils/emitter';
|
|
@@ -19,7 +19,7 @@ export * from './lodash';
|
|
|
19
19
|
export * from './math';
|
|
20
20
|
export * from './mergedToString';
|
|
21
21
|
export * from './mergeProps';
|
|
22
|
-
export * from './
|
|
22
|
+
export * from './emitter';
|
|
23
23
|
export * from './mutationObserver';
|
|
24
24
|
export * from './names';
|
|
25
25
|
export * from './omit';
|
package/typography/Base.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as p, jsxs as ne, Fragment as ie } from "react/jsx-runtime";
|
|
2
2
|
import re from "lodash/merge";
|
|
3
3
|
import _, { forwardRef as le, useContext as pe, useRef as ae, useState as W, useEffect as ce, useImperativeHandle as me } from "react";
|
|
4
|
-
import { a as de } from "../chunk/
|
|
4
|
+
import { a as de } from "../chunk/C1vY8016.js";
|
|
5
5
|
import { u as fe } from "../chunk/2vdCeheu.js";
|
|
6
6
|
import { u as ue } from "../chunk/DfChiMIE.js";
|
|
7
7
|
import he from "../popover/index.js";
|
|
@@ -10,7 +10,7 @@ import q from "@unicom-cloud/utils/class-name";
|
|
|
10
10
|
import "../chunk/DsaQZE4X.js";
|
|
11
11
|
import { m as ge } from "../chunk/B5RFT17G.js";
|
|
12
12
|
import { o as Ce } from "../chunk/BKKEev13.js";
|
|
13
|
-
import { r as xe } from "../chunk/
|
|
13
|
+
import { r as xe } from "../chunk/CHQ8c547.js";
|
|
14
14
|
import Te from "../utils/throttleByRaf.js";
|
|
15
15
|
import Se from "./EditContent.js";
|
|
16
16
|
import Ne from "./Operations.js";
|
package/typography/Ellipsis.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as g, Fragment as K, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as Q, useContext as U, useRef as v, useState as R, useMemo as V, useEffect as S, useCallback as X } from "react";
|
|
3
|
-
import { a as Y } from "../chunk/
|
|
3
|
+
import { a as Y } from "../chunk/C1vY8016.js";
|
|
4
4
|
import Z from "../copy/index.js";
|
|
5
5
|
import { u as tt } from "../chunk/FgWHhRFz.js";
|
|
6
6
|
import { u as et } from "../chunk/2vdCeheu.js";
|
|
@@ -37,11 +37,11 @@ import "lodash/uniq";
|
|
|
37
37
|
import "lodash/upperFirst";
|
|
38
38
|
import "@unicom-cloud/utils/math";
|
|
39
39
|
import { m as it } from "../chunk/B5RFT17G.js";
|
|
40
|
-
import "@unicom-cloud/utils/
|
|
40
|
+
import "@unicom-cloud/utils/emitter";
|
|
41
41
|
import "@unicom-cloud/utils/pinyin";
|
|
42
42
|
import "../chunk/BJ9_azwQ.js";
|
|
43
43
|
import "../chunk/CXrVhA6-.js";
|
|
44
|
-
import { r as nt } from "../chunk/
|
|
44
|
+
import { r as nt } from "../chunk/CHQ8c547.js";
|
|
45
45
|
import "../utils/responsiveObserve.js";
|
|
46
46
|
import "@unicom-cloud/utils/file/saveAs";
|
|
47
47
|
import "@unicom-cloud/utils/screenfull";
|
package/typography/Operations.js
CHANGED
|
@@ -10,7 +10,7 @@ import "@unicom-cloud/utils/date";
|
|
|
10
10
|
import "@unicom-cloud/utils/case-name";
|
|
11
11
|
import "@unicom-cloud/utils/class-name";
|
|
12
12
|
import "@unicom-cloud/utils/constant/ui";
|
|
13
|
-
import "../chunk/
|
|
13
|
+
import "../chunk/C1vY8016.js";
|
|
14
14
|
import "@unicom-cloud/utils/clipboard-copy";
|
|
15
15
|
import "../chunk/DS_deHpN.js";
|
|
16
16
|
import "../chunk/d1c9z8T1.js";
|
|
@@ -38,7 +38,7 @@ import "lodash/uniq";
|
|
|
38
38
|
import "lodash/upperFirst";
|
|
39
39
|
import "@unicom-cloud/utils/math";
|
|
40
40
|
import { m as g } from "../chunk/B5RFT17G.js";
|
|
41
|
-
import "@unicom-cloud/utils/
|
|
41
|
+
import "@unicom-cloud/utils/emitter";
|
|
42
42
|
import "@unicom-cloud/utils/pinyin";
|
|
43
43
|
import "../chunk/BJ9_azwQ.js";
|
|
44
44
|
import "../chunk/CXrVhA6-.js";
|
package/typography/Paragraph.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p, useContext as c } from "react";
|
|
3
|
-
import { a as f } from "../chunk/
|
|
3
|
+
import { a as f } from "../chunk/C1vY8016.js";
|
|
4
4
|
import i from "@unicom-cloud/utils/class-name";
|
|
5
5
|
import l from "./Base.js";
|
|
6
6
|
function g(a, s) {
|
package/typography/Typography.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as c, useContext as l } from "react";
|
|
3
|
-
import { a as f } from "../chunk/
|
|
3
|
+
import { a as f } from "../chunk/C1vY8016.js";
|
|
4
4
|
import i from "@unicom-cloud/utils/class-name";
|
|
5
5
|
function y(o, s) {
|
|
6
6
|
const { getPrefixCls: a } = l(f), t = a?.("typography"), { className: r, style: e, children: p } = o, m = i(t, r);
|
|
@@ -2,7 +2,7 @@ import { jsxs as F, jsx as y } from "react/jsx-runtime";
|
|
|
2
2
|
import $ from "lodash/isNumber";
|
|
3
3
|
import A from "lodash/isString";
|
|
4
4
|
import U, { useRef as b, useState as H, useMemo as P } from "react";
|
|
5
|
-
import { u as B } from "../chunk/
|
|
5
|
+
import { u as B } from "../chunk/CAA93JLq.js";
|
|
6
6
|
import { u as T } from "../chunk/DfChiMIE.js";
|
|
7
7
|
import ee from "../utils/throttleByRaf.js";
|
|
8
8
|
const te = "hxj";
|
package/upload/TriggerNode.js
CHANGED
|
@@ -3,7 +3,7 @@ import h from "@unicom-cloud/icons/IconUiPlus";
|
|
|
3
3
|
import w from "@unicom-cloud/icons/IconUiUpload";
|
|
4
4
|
import N, { forwardRef as F, useContext as P, useState as E, useEffect as j } from "react";
|
|
5
5
|
import A from "../button/index.js";
|
|
6
|
-
import { a as G } from "../chunk/
|
|
6
|
+
import { a as G } from "../chunk/C1vY8016.js";
|
|
7
7
|
import { u as K } from "../chunk/Bvxzb1wd.js";
|
|
8
8
|
import $ from "@unicom-cloud/utils/class-name";
|
|
9
9
|
import { loopDirectory as L, getFiles as O } from "./util.js";
|
package/upload/Upload.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as C, Fragment as F, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import P from "lodash/isFunction";
|
|
3
3
|
import ne from "lodash/isNumber";
|
|
4
4
|
import { useContext as S, forwardRef as A, useState as w, useEffect as L, isValidElement as re, useRef as B, useImperativeHandle as le } from "react";
|
|
5
|
-
import { a as D, I as se } from "../chunk/
|
|
5
|
+
import { a as D, I as se } from "../chunk/C1vY8016.js";
|
|
6
6
|
import { u as ae } from "../chunk/FgWHhRFz.js";
|
|
7
7
|
import W from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import { o as ce } from "../chunk/BKKEev13.js";
|
package/utils/contextHolder.js
CHANGED
package/utils/emitter.js
ADDED
package/utils/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export * from "@unicom-cloud/utils/date";
|
|
|
2
2
|
import { default as o } from "@unicom-cloud/utils/case-name";
|
|
3
3
|
import { default as m } from "@unicom-cloud/utils/class-name";
|
|
4
4
|
import { newArray as l, pickTriggerPropsFromRest as p } from "./constant.js";
|
|
5
|
-
import { e as d } from "../chunk/
|
|
5
|
+
import { e as d } from "../chunk/C1vY8016.js";
|
|
6
6
|
import { default as u, default as c } from "@unicom-cloud/utils/clipboard-copy";
|
|
7
7
|
import { d as y, f as S, h as R, g as h, e as C, j as b, c as T, i as E, l as N, k as A, n as P, m as D, t as I, b as k, a as M } from "../chunk/DS_deHpN.js";
|
|
8
8
|
import { c as v, g as B, i as V, a as j, o as w, b as F } from "../chunk/d1c9z8T1.js";
|
|
@@ -33,7 +33,7 @@ import { default as ke } from "lodash/upperFirst";
|
|
|
33
33
|
import { div as Oe, default as ve, minus as Be, plus as Ve, times as je } from "@unicom-cloud/utils/math";
|
|
34
34
|
import { m as Fe } from "../chunk/B5RFT17G.js";
|
|
35
35
|
import { m as We } from "../chunk/DH7HTOV_.js";
|
|
36
|
-
import { default as He } from "@unicom-cloud/utils/
|
|
36
|
+
import { default as He } from "@unicom-cloud/utils/emitter";
|
|
37
37
|
import { COMPONENT_NAMES as Ue } from "./names.js";
|
|
38
38
|
import { o as Ye } from "../chunk/BKKEev13.js";
|
|
39
39
|
import { padEnd as Ke, padStart as Je } from "./pad.js";
|
|
@@ -95,6 +95,7 @@ export {
|
|
|
95
95
|
fe as debounce,
|
|
96
96
|
Oe as div,
|
|
97
97
|
Qa as easing,
|
|
98
|
+
He as emitter,
|
|
98
99
|
W as fileToURL,
|
|
99
100
|
H as fillNBSP,
|
|
100
101
|
oa as findDOMNode_,
|
|
@@ -211,7 +212,6 @@ export {
|
|
|
211
212
|
Fe as mergedToString,
|
|
212
213
|
D as methods,
|
|
213
214
|
Be as minus,
|
|
214
|
-
He as mitt,
|
|
215
215
|
l as newArray,
|
|
216
216
|
w as off,
|
|
217
217
|
Ye as omit,
|
package/utils/resizeObserver.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as I, jsxs as N } from "react/jsx-runtime";
|
|
2
2
|
import R, { forwardRef as b, useContext as w, useRef as F, createElement as j } from "react";
|
|
3
|
-
import { a as z } from "../chunk/
|
|
3
|
+
import { a as z } from "../chunk/C1vY8016.js";
|
|
4
4
|
import { u as D } from "../chunk/FgWHhRFz.js";
|
|
5
5
|
import E from "../input/InputElement.js";
|
|
6
6
|
import p from "@unicom-cloud/utils/class-name";
|
package/version/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import Tt from "lodash/isNumber";
|
|
|
4
4
|
import rt, { useRef as R, useState as kt, useMemo as Ft, useEffect as A, useImperativeHandle as Ut } from "react";
|
|
5
5
|
import { u as Vt } from "../chunk/BJeTDXdz.js";
|
|
6
6
|
import { u as Dt } from "../chunk/oopARUrq.js";
|
|
7
|
-
import { u as Kt } from "../chunk/
|
|
7
|
+
import { u as Kt } from "../chunk/CAA93JLq.js";
|
|
8
8
|
import { u as jt } from "../chunk/8w-ItYb1.js";
|
|
9
9
|
import { u as Bt } from "../chunk/BG6j6Ct7.js";
|
|
10
|
-
import { r as Yt } from "../chunk/
|
|
10
|
+
import { r as Yt } from "../chunk/CHQ8c547.js";
|
|
11
11
|
import xt from "./Filler.js";
|
|
12
12
|
import { g as qt } from "../chunk/DKHXj8Kf.js";
|
|
13
13
|
import { f as Gt } from "../chunk/CXrVhA6-.js";
|
package/watermark/Watermark.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as l, useContext as p, useRef as u, useCallback as g, useEffect as d } from "react";
|
|
3
|
-
import { a as C } from "../chunk/
|
|
3
|
+
import { a as C } from "../chunk/C1vY8016.js";
|
|
4
4
|
import { useWatermark as h } from "../hooks/useWatermark.js";
|
|
5
5
|
import { u as x } from "../chunk/FgWHhRFz.js";
|
|
6
6
|
import k from "@unicom-cloud/utils/class-name";
|
package/chunk/BDgzrqDN.js
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { useRef as f, useEffect as b, useState as L } from "react";
|
|
2
|
-
import { u as h } from "./DfChiMIE.js";
|
|
3
|
-
import { i as d } from "./Di5KBCVQ.js";
|
|
4
|
-
import "./DsaQZE4X.js";
|
|
5
|
-
import { isFunction as E } from "@unicom-cloud/utils/is";
|
|
6
|
-
import { i as x } from "./CdXR6dj7.js";
|
|
7
|
-
import { d as p } from "./CN7NKv_2.js";
|
|
8
|
-
function A(e) {
|
|
9
|
-
const t = f(e);
|
|
10
|
-
return t.current = e, t;
|
|
11
|
-
}
|
|
12
|
-
function R(e, t) {
|
|
13
|
-
if (!d)
|
|
14
|
-
return;
|
|
15
|
-
if (!e)
|
|
16
|
-
return t;
|
|
17
|
-
let n;
|
|
18
|
-
return E(e) ? n = e() : "current" in e ? n = e.current : n = e, n;
|
|
19
|
-
}
|
|
20
|
-
const T = (e) => {
|
|
21
|
-
x && (E(e) || console.error(
|
|
22
|
-
`useUnmount expected parameter is a function, got ${typeof e}`
|
|
23
|
-
));
|
|
24
|
-
const t = A(e);
|
|
25
|
-
b(
|
|
26
|
-
() => () => {
|
|
27
|
-
t.current();
|
|
28
|
-
},
|
|
29
|
-
[]
|
|
30
|
-
);
|
|
31
|
-
}, y = (e) => (n, s, u) => {
|
|
32
|
-
const i = f(!1), r = f([]), c = f([]), o = f(void 0);
|
|
33
|
-
e(() => {
|
|
34
|
-
const l = (Array.isArray(u) ? u : [u]).map((N) => R(N));
|
|
35
|
-
if (!i.current) {
|
|
36
|
-
i.current = !0, r.current = l, c.current = s, o.current = n();
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
(l.length !== r.current.length || !p(r.current, l) || !p(c.current, s)) && (o.current?.(), r.current = l, c.current = s, o.current = n());
|
|
40
|
-
}), T(() => {
|
|
41
|
-
o.current?.(), i.current = !1;
|
|
42
|
-
});
|
|
43
|
-
}, W = y(b), B = (e, {
|
|
44
|
-
manual: t,
|
|
45
|
-
ready: n = !0,
|
|
46
|
-
defaultParams: s = [],
|
|
47
|
-
refreshDeps: u = [],
|
|
48
|
-
refreshDepsAction: i
|
|
49
|
-
}) => {
|
|
50
|
-
const r = f(!1);
|
|
51
|
-
return r.current = !1, h(() => {
|
|
52
|
-
!t && n && (r.current = !0, e.run(...s));
|
|
53
|
-
}, [n]), h(() => {
|
|
54
|
-
r.current || t || (r.current = !0, i ? i() : e.refresh());
|
|
55
|
-
}, [...u]), {
|
|
56
|
-
onBefore: () => {
|
|
57
|
-
if (!n)
|
|
58
|
-
return {
|
|
59
|
-
stopNow: !0
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
B.onInit = ({ ready: e = !0, manual: t }) => ({
|
|
65
|
-
loading: !t && e
|
|
66
|
-
});
|
|
67
|
-
function S() {
|
|
68
|
-
return d ? document.visibilityState !== "hidden" : !0;
|
|
69
|
-
}
|
|
70
|
-
const m = /* @__PURE__ */ new Set();
|
|
71
|
-
function P(e) {
|
|
72
|
-
return m.add(e), function() {
|
|
73
|
-
m.has(e) && m.delete(e);
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
if (d) {
|
|
77
|
-
const e = () => {
|
|
78
|
-
S() && m.forEach((t) => t());
|
|
79
|
-
};
|
|
80
|
-
window.addEventListener("visibilitychange", e, !1);
|
|
81
|
-
}
|
|
82
|
-
const O = () => d && typeof navigator.onLine < "u" ? navigator.onLine : !0, g = /* @__PURE__ */ new Set();
|
|
83
|
-
function V(e) {
|
|
84
|
-
return g.add(e), function() {
|
|
85
|
-
g.has(e) && g.delete(e);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
if (d) {
|
|
89
|
-
const e = () => {
|
|
90
|
-
!S() || !O() || g.forEach((t) => t());
|
|
91
|
-
};
|
|
92
|
-
window.addEventListener("visibilitychange", e, !1), window.addEventListener("focus", e, !1);
|
|
93
|
-
}
|
|
94
|
-
const w = {
|
|
95
|
-
top: NaN,
|
|
96
|
-
left: NaN,
|
|
97
|
-
bottom: NaN,
|
|
98
|
-
right: NaN,
|
|
99
|
-
height: NaN,
|
|
100
|
-
width: NaN
|
|
101
|
-
}, v = {
|
|
102
|
-
text: "",
|
|
103
|
-
...w
|
|
104
|
-
};
|
|
105
|
-
function U(e) {
|
|
106
|
-
if (!e || e.rangeCount < 1)
|
|
107
|
-
return w;
|
|
108
|
-
const t = e.getRangeAt(0), { height: n, width: s, top: u, left: i, right: r, bottom: c } = t.getBoundingClientRect();
|
|
109
|
-
return {
|
|
110
|
-
height: n,
|
|
111
|
-
width: s,
|
|
112
|
-
top: u,
|
|
113
|
-
left: i,
|
|
114
|
-
right: r,
|
|
115
|
-
bottom: c
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function k(e) {
|
|
119
|
-
const [t, n] = L(v), s = f(t), u = f(!1);
|
|
120
|
-
return s.current = t, W(
|
|
121
|
-
() => {
|
|
122
|
-
const i = R(e, document);
|
|
123
|
-
if (!i)
|
|
124
|
-
return;
|
|
125
|
-
const r = () => {
|
|
126
|
-
let o = null, a = "", l = w;
|
|
127
|
-
window.getSelection && (o = window.getSelection(), a = o ? o.toString() : "", a && u.current && (l = U(o), n({ ...t, text: a, ...l })));
|
|
128
|
-
}, c = (o) => {
|
|
129
|
-
if (o.button === 2 || !window.getSelection)
|
|
130
|
-
return;
|
|
131
|
-
s.current.text && n({ ...v }), u.current = !1;
|
|
132
|
-
const a = window.getSelection();
|
|
133
|
-
a && (a.removeAllRanges(), u.current = i.contains(o.target));
|
|
134
|
-
};
|
|
135
|
-
return i.addEventListener("mouseup", r), document.addEventListener("mousedown", c), () => {
|
|
136
|
-
i.removeEventListener("mouseup", r), document.removeEventListener("mousedown", c);
|
|
137
|
-
};
|
|
138
|
-
},
|
|
139
|
-
[],
|
|
140
|
-
e
|
|
141
|
-
), t;
|
|
142
|
-
}
|
|
143
|
-
export {
|
|
144
|
-
k as a,
|
|
145
|
-
T as b,
|
|
146
|
-
W as c,
|
|
147
|
-
V as d,
|
|
148
|
-
B as e,
|
|
149
|
-
y as f,
|
|
150
|
-
R as g,
|
|
151
|
-
S as i,
|
|
152
|
-
P as s,
|
|
153
|
-
A as u
|
|
154
|
-
};
|
package/chunk/COc48wzV.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { useState as i, useRef as l, useEffect as f } from "react";
|
|
2
|
-
const a = {}, y = (t, s = {}) => {
|
|
3
|
-
const n = document.querySelector(`script[src="${t}"]`);
|
|
4
|
-
if (!n) {
|
|
5
|
-
const e = document.createElement("script");
|
|
6
|
-
return e.src = t, Object.keys(s).forEach((r) => {
|
|
7
|
-
e[r] = s[r];
|
|
8
|
-
}), e.setAttribute("data-status", "loading"), document.body.appendChild(e), {
|
|
9
|
-
ref: e,
|
|
10
|
-
status: "loading"
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
return {
|
|
14
|
-
ref: n,
|
|
15
|
-
status: n.getAttribute("data-status") || "ready"
|
|
16
|
-
};
|
|
17
|
-
}, E = (t, s = {}) => {
|
|
18
|
-
const n = document.querySelector(`link[href="${t}"]`);
|
|
19
|
-
if (!n) {
|
|
20
|
-
const e = document.createElement("link");
|
|
21
|
-
return e.rel = "stylesheet", e.href = t, Object.keys(s).forEach((u) => {
|
|
22
|
-
e[u] = s[u];
|
|
23
|
-
}), "hideFocus" in e && e.relList && (e.rel = "preload", e.as = "style"), e.setAttribute("data-status", "loading"), document.head.appendChild(e), {
|
|
24
|
-
ref: e,
|
|
25
|
-
status: "loading"
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
ref: n,
|
|
30
|
-
status: n.getAttribute("data-status") || "ready"
|
|
31
|
-
};
|
|
32
|
-
}, v = (t, s) => {
|
|
33
|
-
const [n, e] = i(t ? "loading" : "unset"), r = l(void 0);
|
|
34
|
-
return f(() => {
|
|
35
|
-
if (!t) {
|
|
36
|
-
e("unset");
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const u = t.replace(/[|#].*$/, "");
|
|
40
|
-
if (s?.type === "css" || !s?.type && /(^css!|\.css$)/.test(u)) {
|
|
41
|
-
const c = E(t, s?.css);
|
|
42
|
-
r.current = c.ref, e(c.status);
|
|
43
|
-
} else if (s?.type === "js" || !s?.type && /(^js!|\.js$)/.test(u)) {
|
|
44
|
-
const c = y(t, s?.js);
|
|
45
|
-
r.current = c.ref, e(c.status);
|
|
46
|
-
} else
|
|
47
|
-
console.error(
|
|
48
|
-
"Cannot infer the type of external resource, and please provide a type ('js' | 'css'). "
|
|
49
|
-
);
|
|
50
|
-
if (!r.current)
|
|
51
|
-
return;
|
|
52
|
-
a[t] === void 0 ? a[t] = 1 : a[t] += 1;
|
|
53
|
-
const o = (c) => {
|
|
54
|
-
const d = c.type === "load" ? "ready" : "error";
|
|
55
|
-
r.current?.setAttribute("data-status", d), e(d);
|
|
56
|
-
};
|
|
57
|
-
return r.current.addEventListener("load", o), r.current.addEventListener("error", o), () => {
|
|
58
|
-
r.current?.removeEventListener("load", o), r.current?.removeEventListener("error", o), a[t] -= 1, a[t] === 0 && !s?.keepWhenUnused && r.current?.remove(), r.current = void 0;
|
|
59
|
-
};
|
|
60
|
-
}, [t]), n;
|
|
61
|
-
};
|
|
62
|
-
export {
|
|
63
|
-
v as u
|
|
64
|
-
};
|