@gpustack/core-ui 1.0.33 → 1.0.35
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/charts.d.ts +7 -0
- package/dist/charts.es.js +859 -0
- package/dist/{useIntl-ClqxSZNY.js → classnames-fDEzIsab.js} +4 -35
- package/dist/{editor-wrap-BYfIcvle.js → editor-wrap-CwTlkQeF.js} +1 -1
- package/dist/{excel-reader-Bgm6Gd2H.js → excel-reader-fp4wfcR5.js} +2 -2
- package/dist/excel.es.js +1 -1
- package/dist/file-readers.es.js +3 -3
- package/dist/{highlight-code-DrKwSNa-.js → highlight-code-D8pDWkNV.js} +79 -75
- package/dist/index.css +1 -1
- package/dist/index.es.js +10415 -19095
- package/dist/lib/components/form/wrapper/index.d.ts +5 -5
- package/dist/lib/components/index.d.ts +0 -9
- package/dist/lib/components/table/components/layout.d.ts +5 -5
- package/dist/lib-pzRljAkJ.js +2 -0
- package/dist/{mammoth-3bu5V8Au.js → mammoth-CCaoEfUd.js} +1 -1
- package/dist/markdown.es.js +8 -8
- package/dist/query-string-D_RrDOJF.js +325 -0
- package/dist/resize-panel-D5BF2EHO.js +529 -0
- package/dist/terminal.d.ts +5 -0
- package/dist/terminal.es.js +7333 -0
- package/dist/useCoreUIContext-_TAsecw_.js +29 -0
- package/dist/useIntl-CBh5liUu.js +12 -0
- package/dist/{utils-KsqXE63M.js → utils-CHekcXoK.js} +121 -440
- package/dist/utils.es.js +4 -4
- package/dist/{word-reader-CSmNlWcx.js → word-reader-Dy0F38kq.js} +4 -4
- package/dist/yaml-editor.es.js +19 -19
- package/package.json +9 -1
- package/dist/lib-EFH8CfCi.js +0 -2
- /package/dist/{epubjs-DKV8rhQU.js → epubjs-CCPXKy-j.js} +0 -0
- /package/dist/{jszip-1lXK4oQn.js → jszip-D49X9-jp.js} +0 -0
- /package/dist/{lodash-i3XVVuwG.js → lodash-CFrt21kh.js} +0 -0
- /package/dist/{pdfjs-dist-DwiA-2_8.js → pdfjs-dist-D4wgLSOe.js} +0 -0
- /package/dist/{xlsx-DLkyLHwb.js → xlsx-C7SIkCvo.js} +0 -0
|
@@ -17,16 +17,16 @@ interface WrapperProps {
|
|
|
17
17
|
labelExtra?: React.ReactNode;
|
|
18
18
|
onClick?: () => void;
|
|
19
19
|
}
|
|
20
|
-
export declare const Label: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | keyof React.HTMLAttributes<HTMLDivElement
|
|
21
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) |
|
|
20
|
+
export declare const Label: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
21
|
+
ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
|
|
22
22
|
}, "$isFocus" | "$hasPrefix"> & {
|
|
23
23
|
$isFocus?: boolean;
|
|
24
24
|
$hasPrefix?: boolean;
|
|
25
|
-
}, "
|
|
26
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) |
|
|
25
|
+
}, "color" | "id" | "title" | "ref" | "key" | "children" | "className" | "style" | "hidden" | "results" | "slot" | "dir" | "aria-label" | "aria-labelledby" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "$isFocus" | "$hasPrefix"> & Partial<Pick<import('styled-components').FastOmit<import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
26
|
+
ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
|
|
27
27
|
}, "$isFocus" | "$hasPrefix"> & {
|
|
28
28
|
$isFocus?: boolean;
|
|
29
29
|
$hasPrefix?: boolean;
|
|
30
|
-
}, "
|
|
30
|
+
}, "color" | "id" | "title" | "ref" | "key" | "children" | "className" | "style" | "hidden" | "results" | "slot" | "dir" | "aria-label" | "aria-labelledby" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "$isFocus" | "$hasPrefix">>> & string;
|
|
31
31
|
declare const Wrapper: FC<WrapperProps>;
|
|
32
32
|
export default Wrapper;
|
|
@@ -31,13 +31,6 @@ export { default as DynamicForm } from './dynamic-form';
|
|
|
31
31
|
export { default as ListMap } from './dynamic-form/components/list-map';
|
|
32
32
|
export { type FieldSchema, type statusType } from './dynamic-form/config/types';
|
|
33
33
|
export { default as useValidateFields } from './dynamic-form/hooks/use-validate-fields';
|
|
34
|
-
export { default as BarChart } from './echarts/bar-chart';
|
|
35
|
-
export { default as Chart } from './echarts/chart';
|
|
36
|
-
export { default as GaugeChart } from './echarts/gauge';
|
|
37
|
-
export { default as HBarChart } from './echarts/h-bar';
|
|
38
|
-
export { default as LineChart } from './echarts/line-chart';
|
|
39
|
-
export { default as MixLineBarChart } from './echarts/mix-line-bar';
|
|
40
|
-
export { default as ScatterChart } from './echarts/scatter';
|
|
41
34
|
export { default as EditorWrap } from './editor-wrap';
|
|
42
35
|
export { default as ErrorMessage } from './error-message-content';
|
|
43
36
|
export { default as FilterForm } from './filter-form';
|
|
@@ -118,7 +111,6 @@ export { default as ThemeTag } from './tags-wrapper/theme-tag';
|
|
|
118
111
|
export { default as TemplateCard } from './templates/card';
|
|
119
112
|
export { default as TemplateCardList } from './templates/card-list';
|
|
120
113
|
export { default as TemplateCardSkeleton } from './templates/card-skeleton';
|
|
121
|
-
export { default as TerminalTabs } from './terminal-tabs';
|
|
122
114
|
export { default as ResizePanel } from './terminal-tabs/resize-panel';
|
|
123
115
|
export { default as ThumbImage } from './thumb-image';
|
|
124
116
|
export { default as TooltipList } from './tooltip-list';
|
|
@@ -128,4 +120,3 @@ export { default as UploadAudio } from './upload-audio';
|
|
|
128
120
|
export { default as UploadImage } from './upload-image';
|
|
129
121
|
export { default as UploadImageButton, type UploadImageButtonProps } from './upload-image-button';
|
|
130
122
|
export { default as ViewerEditor } from './viewer-editor';
|
|
131
|
-
export { default as XTerminal } from './x-terminal';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
declare const Row: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | keyof import('react').HTMLAttributes<HTMLDivElement
|
|
2
|
-
ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) |
|
|
1
|
+
declare const Row: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "key" | keyof import('react').HTMLAttributes<HTMLDivElement>> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: import('react').RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
|
|
3
3
|
}, "className"> & {
|
|
4
4
|
className?: string;
|
|
5
|
-
}, "
|
|
6
|
-
ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) |
|
|
5
|
+
}, "color" | "id" | "title" | "ref" | "key" | "children" | "className" | "style" | "hidden" | "results" | "slot" | "dir" | "aria-label" | "aria-labelledby" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & Partial<Pick<import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "key" | keyof import('react').HTMLAttributes<HTMLDivElement>> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
+
ref?: import('react').RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
|
|
7
7
|
}, "className"> & {
|
|
8
8
|
className?: string;
|
|
9
|
-
}, "
|
|
9
|
+
}, "color" | "id" | "title" | "ref" | "key" | "children" | "className" | "style" | "hidden" | "results" | "slot" | "dir" | "aria-label" | "aria-labelledby" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">>> & string;
|
|
10
10
|
declare const Col: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$width" | "$align" | "$flexBasis" | "$maxWidth"> & {
|
|
11
11
|
$width?: string | number;
|
|
12
12
|
$align?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, n as t, r as n, t as r } from "./rolldown-runtime-BETGA6I9.js";
|
|
2
|
-
import { t as i } from "./jszip-
|
|
2
|
+
import { t as i } from "./jszip-D49X9-jp.js";
|
|
3
3
|
//#region node_modules/.pnpm/underscore@1.13.8/node_modules/underscore/modules/_setup.js
|
|
4
4
|
var a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T = t((() => {
|
|
5
5
|
a = "1.13.8", o = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || Function("return this")() || {}, s = Array.prototype, c = Object.prototype, l = typeof Symbol < "u" ? Symbol.prototype : null, u = s.push, d = s.slice, f = c.toString, p = c.hasOwnProperty, m = typeof ArrayBuffer < "u", h = typeof DataView < "u", g = Array.isArray, _ = Object.keys, v = Object.create, y = m && ArrayBuffer.isView, b = isNaN, x = isFinite, S = !{ toString: null }.propertyIsEnumerable("toString"), C = [
|
package/dist/markdown.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as e, r as t, t as n } from "./rolldown-runtime-BETGA6I9.js";
|
|
2
|
-
import { t as r } from "./lodash-
|
|
3
|
-
import { t as i } from "./highlight-code-
|
|
2
|
+
import { t as r } from "./lodash-CFrt21kh.js";
|
|
3
|
+
import { t as i } from "./highlight-code-D8pDWkNV.js";
|
|
4
4
|
import a, { Fragment as o, useCallback as s, useEffect as c, useMemo as l } from "react";
|
|
5
5
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Checkbox as p, Image as m, Typography as h } from "antd";
|
|
7
|
+
import { EyeOutlined as g } from "@ant-design/icons";
|
|
8
8
|
import _ from "styled-components";
|
|
9
9
|
//#region node_modules/.pnpm/@braintree+sanitize-url@7.1.2/node_modules/@braintree/sanitize-url/dist/constants.js
|
|
10
10
|
var v = /* @__PURE__ */ n(((e) => {
|
|
@@ -1852,7 +1852,7 @@ k.options = k.setOptions = function(e) {
|
|
|
1852
1852
|
}, k.parseInline = fn.parseInline, k.Parser = un, k.parser = un.parse, k.Renderer = cn, k.TextRenderer = ln, k.Lexer = sn, k.lexer = sn.lex, k.Tokenizer = ht, k.Hooks = dn, k.parse = k, k.options, k.setOptions, k.use, k.walkTokens, k.parseInline, un.parse, sn.lex;
|
|
1853
1853
|
//#endregion
|
|
1854
1854
|
//#region src/lib/components/markdown-viewer/index.tsx
|
|
1855
|
-
var { Text: pn, Link: mn, Paragraph: hn } =
|
|
1855
|
+
var { Text: pn, Link: mn, Paragraph: hn } = h, gn = {
|
|
1856
1856
|
FORBID_TAGS: [
|
|
1857
1857
|
"meta",
|
|
1858
1858
|
"style",
|
|
@@ -1895,17 +1895,17 @@ var { Text: pn, Link: mn, Paragraph: hn } = g, gn = {
|
|
|
1895
1895
|
let n = null, r = null;
|
|
1896
1896
|
e.tokens?.length && (r = t?.(e.tokens, t));
|
|
1897
1897
|
let o = r || (0, Xe.unescape)(e.text);
|
|
1898
|
-
return e.type === "escape" && (n = o), e.type === "html" && (n = /* @__PURE__ */ d("div", { dangerouslySetInnerHTML: { __html: _n(e.text) } })), e.type === "list" && (n = e.order ? /* @__PURE__ */ d("ol", { children: t?.(e.items, t) }) : /* @__PURE__ */ d("ul", { children: t?.(e.items, t) })), e.type === "list_item" && (n = /* @__PURE__ */ d("li", { children: o })), e.type === "del" && (n = /* @__PURE__ */ d("del", { children: o })), e.type === "blockquote" && (n = /* @__PURE__ */ d("blockquote", { children: o })), e.type === "checkbox" && (n = /* @__PURE__ */ d(
|
|
1898
|
+
return e.type === "escape" && (n = o), e.type === "html" && (n = /* @__PURE__ */ d("div", { dangerouslySetInnerHTML: { __html: _n(e.text) } })), e.type === "list" && (n = e.order ? /* @__PURE__ */ d("ol", { children: t?.(e.items, t) }) : /* @__PURE__ */ d("ul", { children: t?.(e.items, t) })), e.type === "list_item" && (n = /* @__PURE__ */ d("li", { children: o })), e.type === "del" && (n = /* @__PURE__ */ d("del", { children: o })), e.type === "blockquote" && (n = /* @__PURE__ */ d("blockquote", { children: o })), e.type === "checkbox" && (n = /* @__PURE__ */ d(p, { value: e.checked })), e.type === "br" && (n = /* @__PURE__ */ d("br", {})), e.type === "em" && (n = /* @__PURE__ */ d("em", { children: o })), e.type === "image" && (n = /* @__PURE__ */ d(m, {
|
|
1899
1899
|
src: b(e.href),
|
|
1900
1900
|
alt: e.text,
|
|
1901
|
-
preview: { mask: /* @__PURE__ */ d(
|
|
1901
|
+
preview: { mask: /* @__PURE__ */ d(g, {}) }
|
|
1902
1902
|
})), e.type === "text" && (n = o), e.type === "codespan" && (n = /* @__PURE__ */ d(pn, {
|
|
1903
1903
|
code: !0,
|
|
1904
1904
|
children: o
|
|
1905
1905
|
})), e.type === "strong" && (n = /* @__PURE__ */ d(pn, {
|
|
1906
1906
|
strong: !0,
|
|
1907
1907
|
children: o
|
|
1908
|
-
})), e.type === "heading" && (n = /* @__PURE__ */ d(
|
|
1908
|
+
})), e.type === "heading" && (n = /* @__PURE__ */ d(h.Title, {
|
|
1909
1909
|
level: 4,
|
|
1910
1910
|
children: o
|
|
1911
1911
|
})), e.type === "paragraph" && (n = /* @__PURE__ */ f(hn, { children: [" ", o] })), e.type === "code" && (n = /* @__PURE__ */ d(i, {
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { r as e } from "./rolldown-runtime-BETGA6I9.js";
|
|
2
|
+
//#region node_modules/.pnpm/decode-uri-component@0.4.1/node_modules/decode-uri-component/index.js
|
|
3
|
+
var t = "%[a-f0-9]{2}", n = RegExp("(" + t + ")|([^%]+?)", "gi"), r = RegExp("(" + t + ")+", "gi");
|
|
4
|
+
function i(e, t) {
|
|
5
|
+
try {
|
|
6
|
+
return [decodeURIComponent(e.join(""))];
|
|
7
|
+
} catch {}
|
|
8
|
+
if (e.length === 1) return e;
|
|
9
|
+
t ||= 1;
|
|
10
|
+
let n = e.slice(0, t), r = e.slice(t);
|
|
11
|
+
return Array.prototype.concat.call([], i(n), i(r));
|
|
12
|
+
}
|
|
13
|
+
function a(e) {
|
|
14
|
+
try {
|
|
15
|
+
return decodeURIComponent(e);
|
|
16
|
+
} catch {
|
|
17
|
+
let t = e.match(n) || [];
|
|
18
|
+
for (let r = 1; r < t.length; r++) e = i(t, r).join(""), t = e.match(n) || [];
|
|
19
|
+
return e;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function o(e) {
|
|
23
|
+
let t = {
|
|
24
|
+
"%FE%FF": "��",
|
|
25
|
+
"%FF%FE": "��"
|
|
26
|
+
}, n = r.exec(e);
|
|
27
|
+
for (; n;) {
|
|
28
|
+
try {
|
|
29
|
+
t[n[0]] = decodeURIComponent(n[0]);
|
|
30
|
+
} catch {
|
|
31
|
+
let e = a(n[0]);
|
|
32
|
+
e !== n[0] && (t[n[0]] = e);
|
|
33
|
+
}
|
|
34
|
+
n = r.exec(e);
|
|
35
|
+
}
|
|
36
|
+
t["%C2"] = "�";
|
|
37
|
+
let i = Object.keys(t);
|
|
38
|
+
for (let n of i) e = e.replace(new RegExp(n, "g"), t[n]);
|
|
39
|
+
return e;
|
|
40
|
+
}
|
|
41
|
+
function s(e) {
|
|
42
|
+
if (typeof e != "string") throw TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof e + "`");
|
|
43
|
+
try {
|
|
44
|
+
return decodeURIComponent(e);
|
|
45
|
+
} catch {
|
|
46
|
+
return o(e);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region node_modules/.pnpm/filter-obj@5.1.0/node_modules/filter-obj/index.js
|
|
51
|
+
function c(e, t) {
|
|
52
|
+
let n = {};
|
|
53
|
+
if (Array.isArray(t)) for (let r of t) {
|
|
54
|
+
let t = Object.getOwnPropertyDescriptor(e, r);
|
|
55
|
+
t?.enumerable && Object.defineProperty(n, r, t);
|
|
56
|
+
}
|
|
57
|
+
else for (let r of Reflect.ownKeys(e)) {
|
|
58
|
+
let i = Object.getOwnPropertyDescriptor(e, r);
|
|
59
|
+
if (i.enumerable) {
|
|
60
|
+
let a = e[r];
|
|
61
|
+
t(r, a, e) && Object.defineProperty(n, r, i);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return n;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region node_modules/.pnpm/split-on-first@3.0.0/node_modules/split-on-first/index.js
|
|
68
|
+
function l(e, t) {
|
|
69
|
+
if (!(typeof e == "string" && typeof t == "string")) throw TypeError("Expected the arguments to be of type `string`");
|
|
70
|
+
if (e === "" || t === "") return [];
|
|
71
|
+
let n = e.indexOf(t);
|
|
72
|
+
return n === -1 ? [] : [e.slice(0, n), e.slice(n + t.length)];
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region node_modules/.pnpm/query-string@9.3.1/node_modules/query-string/base.js
|
|
76
|
+
var u = /* @__PURE__ */ e({
|
|
77
|
+
exclude: () => k,
|
|
78
|
+
extract: () => C,
|
|
79
|
+
parse: () => w,
|
|
80
|
+
parseUrl: () => E,
|
|
81
|
+
pick: () => O,
|
|
82
|
+
stringify: () => T,
|
|
83
|
+
stringifyUrl: () => D
|
|
84
|
+
}), d = (e) => e == null, f = (e) => encodeURIComponent(e).replaceAll(/[!'()*]/g, (e) => `%${e.charCodeAt(0).toString(16).toUpperCase()}`), p = Symbol("encodeFragmentIdentifier");
|
|
85
|
+
function m(e) {
|
|
86
|
+
switch (e.arrayFormat) {
|
|
87
|
+
case "index": return (t) => (n, r) => {
|
|
88
|
+
let i = n.length;
|
|
89
|
+
return r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, [
|
|
90
|
+
_(t, e),
|
|
91
|
+
"[",
|
|
92
|
+
i,
|
|
93
|
+
"]"
|
|
94
|
+
].join("")] : [...n, [
|
|
95
|
+
_(t, e),
|
|
96
|
+
"[",
|
|
97
|
+
_(i, e),
|
|
98
|
+
"]=",
|
|
99
|
+
_(r, e)
|
|
100
|
+
].join("")];
|
|
101
|
+
};
|
|
102
|
+
case "bracket": return (t) => (n, r) => r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, [_(t, e), "[]"].join("")] : [...n, [
|
|
103
|
+
_(t, e),
|
|
104
|
+
"[]=",
|
|
105
|
+
_(r, e)
|
|
106
|
+
].join("")];
|
|
107
|
+
case "colon-list-separator": return (t) => (n, r) => r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, [_(t, e), ":list="].join("")] : [...n, [
|
|
108
|
+
_(t, e),
|
|
109
|
+
":list=",
|
|
110
|
+
_(r, e)
|
|
111
|
+
].join("")];
|
|
112
|
+
case "comma":
|
|
113
|
+
case "separator":
|
|
114
|
+
case "bracket-separator": {
|
|
115
|
+
let t = e.arrayFormat === "bracket-separator" ? "[]=" : "=";
|
|
116
|
+
return (n) => (r, i) => i === void 0 || e.skipNull && i === null || e.skipEmptyString && i === "" ? r : (i = i === null ? "" : i, r.length === 0 ? [[
|
|
117
|
+
_(n, e),
|
|
118
|
+
t,
|
|
119
|
+
_(i, e)
|
|
120
|
+
].join("")] : [[r, _(i, e)].join(e.arrayFormatSeparator)]);
|
|
121
|
+
}
|
|
122
|
+
default: return (t) => (n, r) => r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, _(t, e)] : [...n, [
|
|
123
|
+
_(t, e),
|
|
124
|
+
"=",
|
|
125
|
+
_(r, e)
|
|
126
|
+
].join("")];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function h(e) {
|
|
130
|
+
let t;
|
|
131
|
+
switch (e.arrayFormat) {
|
|
132
|
+
case "index": return (e, n, r) => {
|
|
133
|
+
if (t = /\[(\d*)]$/.exec(e), e = e.replace(/\[\d*]$/, ""), !t) {
|
|
134
|
+
r[e] = n;
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
r[e] === void 0 && (r[e] = {}), r[e][t[1]] = n;
|
|
138
|
+
};
|
|
139
|
+
case "bracket": return (e, n, r) => {
|
|
140
|
+
if (t = /(\[])$/.exec(e), e = e.replace(/\[]$/, ""), !t) {
|
|
141
|
+
r[e] = n;
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (r[e] === void 0) {
|
|
145
|
+
r[e] = [n];
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
r[e] = [...r[e], n];
|
|
149
|
+
};
|
|
150
|
+
case "colon-list-separator": return (e, n, r) => {
|
|
151
|
+
if (t = /(:list)$/.exec(e), e = e.replace(/:list$/, ""), !t) {
|
|
152
|
+
r[e] = n;
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (r[e] === void 0) {
|
|
156
|
+
r[e] = [n];
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
r[e] = [...r[e], n];
|
|
160
|
+
};
|
|
161
|
+
case "comma":
|
|
162
|
+
case "separator": return (t, n, r) => {
|
|
163
|
+
r[t] = typeof n == "string" && n.includes(e.arrayFormatSeparator) ? n.split(e.arrayFormatSeparator).map((t) => v(t, e)) : n === null ? n : v(n, e);
|
|
164
|
+
};
|
|
165
|
+
case "bracket-separator": return (t, n, r) => {
|
|
166
|
+
let i = /(\[])$/.test(t);
|
|
167
|
+
if (t = t.replace(/\[]$/, ""), !i) {
|
|
168
|
+
r[t] = n && v(n, e);
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
let a = n === null ? [] : v(n, e).split(e.arrayFormatSeparator);
|
|
172
|
+
if (r[t] === void 0) {
|
|
173
|
+
r[t] = a;
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
r[t] = [...r[t], ...a];
|
|
177
|
+
};
|
|
178
|
+
default: return (e, t, n) => {
|
|
179
|
+
if (n[e] === void 0) {
|
|
180
|
+
n[e] = t;
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
n[e] = [...[n[e]].flat(), t];
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
function g(e) {
|
|
188
|
+
if (typeof e != "string" || e.length !== 1) throw TypeError("arrayFormatSeparator must be single character string");
|
|
189
|
+
}
|
|
190
|
+
function _(e, t) {
|
|
191
|
+
return t.encode ? t.strict ? f(e) : encodeURIComponent(e) : e;
|
|
192
|
+
}
|
|
193
|
+
function v(e, t) {
|
|
194
|
+
return t.decode ? s(e) : e;
|
|
195
|
+
}
|
|
196
|
+
function y(e) {
|
|
197
|
+
return Array.isArray(e) ? e.sort() : typeof e == "object" ? y(Object.keys(e)).sort((e, t) => Number(e) - Number(t)).map((t) => e[t]) : e;
|
|
198
|
+
}
|
|
199
|
+
function b(e) {
|
|
200
|
+
let t = e.indexOf("#");
|
|
201
|
+
return t !== -1 && (e = e.slice(0, t)), e;
|
|
202
|
+
}
|
|
203
|
+
function x(e) {
|
|
204
|
+
let t = "", n = e.indexOf("#");
|
|
205
|
+
return n !== -1 && (t = e.slice(n)), t;
|
|
206
|
+
}
|
|
207
|
+
function S(e, t, n) {
|
|
208
|
+
return n === "string" && typeof e == "string" ? e : typeof n == "function" && typeof e == "string" ? n(e) : n === "boolean" && e === null ? !0 : n === "boolean" && e !== null && (e.toLowerCase() === "true" || e.toLowerCase() === "false") ? e.toLowerCase() === "true" : n === "boolean" && e !== null && (e.toLowerCase() === "1" || e.toLowerCase() === "0") ? e.toLowerCase() === "1" : n === "string[]" && t.arrayFormat !== "none" && typeof e == "string" ? [e] : n === "number[]" && t.arrayFormat !== "none" && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? [Number(e)] : n === "number" && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? Number(e) : t.parseBooleans && e !== null && (e.toLowerCase() === "true" || e.toLowerCase() === "false") ? e.toLowerCase() === "true" : t.parseNumbers && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? Number(e) : e;
|
|
209
|
+
}
|
|
210
|
+
function C(e) {
|
|
211
|
+
e = b(e);
|
|
212
|
+
let t = e.indexOf("?");
|
|
213
|
+
return t === -1 ? "" : e.slice(t + 1);
|
|
214
|
+
}
|
|
215
|
+
function w(e, t) {
|
|
216
|
+
t = {
|
|
217
|
+
decode: !0,
|
|
218
|
+
sort: !0,
|
|
219
|
+
arrayFormat: "none",
|
|
220
|
+
arrayFormatSeparator: ",",
|
|
221
|
+
parseNumbers: !1,
|
|
222
|
+
parseBooleans: !1,
|
|
223
|
+
types: Object.create(null),
|
|
224
|
+
...t
|
|
225
|
+
}, g(t.arrayFormatSeparator);
|
|
226
|
+
let n = h(t), r = Object.create(null);
|
|
227
|
+
if (typeof e != "string" || (e = e.trim().replace(/^[?#&]/, ""), !e)) return r;
|
|
228
|
+
for (let i of e.split("&")) {
|
|
229
|
+
if (i === "") continue;
|
|
230
|
+
let e = t.decode ? i.replaceAll("+", " ") : i, [a, o] = l(e, "=");
|
|
231
|
+
a === void 0 && (a = e), o = o === void 0 ? null : [
|
|
232
|
+
"comma",
|
|
233
|
+
"separator",
|
|
234
|
+
"bracket-separator"
|
|
235
|
+
].includes(t.arrayFormat) ? o : v(o, t), n(v(a, t), o, r);
|
|
236
|
+
}
|
|
237
|
+
for (let [e, n] of Object.entries(r)) if (typeof n == "object" && n && t.types[e] !== "string") for (let [r, i] of Object.entries(n)) {
|
|
238
|
+
let a = t.types[e], o = typeof a == "function" ? a : a ? a.replace("[]", "") : void 0;
|
|
239
|
+
n[r] = S(i, t, o);
|
|
240
|
+
}
|
|
241
|
+
else typeof n == "object" && n && t.types[e] === "string" ? r[e] = Object.values(n).join(t.arrayFormatSeparator) : r[e] = S(n, t, t.types[e]);
|
|
242
|
+
return t.sort === !1 ? r : (t.sort === !0 ? Object.keys(r).sort() : Object.keys(r).sort(t.sort)).reduce((e, t) => {
|
|
243
|
+
let n = r[t];
|
|
244
|
+
return e[t] = n && typeof n == "object" && !Array.isArray(n) ? y(n) : n, e;
|
|
245
|
+
}, Object.create(null));
|
|
246
|
+
}
|
|
247
|
+
function T(e, t) {
|
|
248
|
+
if (!e) return "";
|
|
249
|
+
t = {
|
|
250
|
+
encode: !0,
|
|
251
|
+
strict: !0,
|
|
252
|
+
arrayFormat: "none",
|
|
253
|
+
arrayFormatSeparator: ",",
|
|
254
|
+
...t
|
|
255
|
+
}, g(t.arrayFormatSeparator);
|
|
256
|
+
let n = (n) => t.skipNull && d(e[n]) || t.skipEmptyString && e[n] === "", r = m(t), i = {};
|
|
257
|
+
for (let [t, r] of Object.entries(e)) n(t) || (i[t] = r);
|
|
258
|
+
let a = Object.keys(i);
|
|
259
|
+
return t.sort !== !1 && a.sort(t.sort), a.map((n) => {
|
|
260
|
+
let i = e[n];
|
|
261
|
+
if (t.replacer && (i = t.replacer(n, i), i === void 0) || i === void 0) return "";
|
|
262
|
+
if (i === null) return _(n, t);
|
|
263
|
+
if (Array.isArray(i)) {
|
|
264
|
+
if (i.length === 0 && t.arrayFormat === "bracket-separator") return _(n, t) + "[]";
|
|
265
|
+
let e = i;
|
|
266
|
+
return t.replacer && (e = i.map((e, r) => t.replacer(`${n}[${r}]`, e)).filter((e) => e !== void 0)), e.reduce(r(n), []).join("&");
|
|
267
|
+
}
|
|
268
|
+
return _(n, t) + "=" + _(i, t);
|
|
269
|
+
}).filter((e) => e.length > 0).join("&");
|
|
270
|
+
}
|
|
271
|
+
function E(e, t) {
|
|
272
|
+
t = {
|
|
273
|
+
decode: !0,
|
|
274
|
+
...t
|
|
275
|
+
};
|
|
276
|
+
let [n, r] = l(e, "#");
|
|
277
|
+
return n === void 0 && (n = e), {
|
|
278
|
+
url: n?.split("?")?.[0] ?? "",
|
|
279
|
+
query: w(C(e), t),
|
|
280
|
+
...t && t.parseFragmentIdentifier && r ? { fragmentIdentifier: v(r, t) } : {}
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function D(e, t) {
|
|
284
|
+
t = {
|
|
285
|
+
encode: !0,
|
|
286
|
+
strict: !0,
|
|
287
|
+
[p]: !0,
|
|
288
|
+
...t
|
|
289
|
+
};
|
|
290
|
+
let n = b(e.url).split("?")[0] || "", r = T({
|
|
291
|
+
...w(C(e.url), {
|
|
292
|
+
sort: !1,
|
|
293
|
+
...t
|
|
294
|
+
}),
|
|
295
|
+
...e.query
|
|
296
|
+
}, t);
|
|
297
|
+
r &&= `?${r}`;
|
|
298
|
+
let i = x(e.url);
|
|
299
|
+
if (typeof e.fragmentIdentifier == "string") {
|
|
300
|
+
let r = new URL(n);
|
|
301
|
+
r.hash = e.fragmentIdentifier, i = t[p] ? r.hash : `#${e.fragmentIdentifier}`;
|
|
302
|
+
}
|
|
303
|
+
return `${n}${r}${i}`;
|
|
304
|
+
}
|
|
305
|
+
function O(e, t, n) {
|
|
306
|
+
n = {
|
|
307
|
+
parseFragmentIdentifier: !0,
|
|
308
|
+
[p]: !1,
|
|
309
|
+
...n
|
|
310
|
+
};
|
|
311
|
+
let { url: r, query: i, fragmentIdentifier: a } = E(e, n);
|
|
312
|
+
return D({
|
|
313
|
+
url: r,
|
|
314
|
+
query: c(i, t),
|
|
315
|
+
fragmentIdentifier: a
|
|
316
|
+
}, n);
|
|
317
|
+
}
|
|
318
|
+
function k(e, t, n) {
|
|
319
|
+
return O(e, Array.isArray(t) ? (e) => !t.includes(e) : (e, n) => !t(e, n), n);
|
|
320
|
+
}
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region node_modules/.pnpm/query-string@9.3.1/node_modules/query-string/index.js
|
|
323
|
+
var A = u;
|
|
324
|
+
//#endregion
|
|
325
|
+
export { A as t };
|