@mxmweb/zui-layouts 1.2.2 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/style.css +1 -1
- package/index.js +348 -323
- package/lib_enter.d.ts +1 -1
- package/package.json +1 -1
package/assets/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-ease:initial}}:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-gray-50:oklch(98.5% .002 247.839);--spacing:.25rem;--ease-out:cubic-bezier(0,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.isolate{isolation:isolate}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mb-4{margin-bottom:calc(var(--spacing)*4)}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.list-item{display:list-item}.table{display:table}.table-cell{display:table-cell}.table-row{display:table-row}.flex-shrink,.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.border{border-style:var(--tw-border-style);border-width:1px}.italic{font-style:italic}.underline{text-decoration-line:underline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}*{margin:0;padding:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
|
1
|
+
/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-ease:initial}}:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ease-out:cubic-bezier(0,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.visible{visibility:visible}.fixed{position:fixed}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.block{display:block}.contents{display:contents}.flex{display:flex}.inline{display:inline}.flex-shrink{flex-shrink:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.flex-wrap{flex-wrap:wrap}.border{border-style:var(--tw-border-style);border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}*{margin:0;padding:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as e, jsxs as f, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import x, { forwardRef as
|
|
1
|
+
import { jsx as e, jsxs as f, Fragment as Ie } from "react/jsx-runtime";
|
|
2
|
+
import * as R from "react";
|
|
3
|
+
import x, { forwardRef as me, createElement as xe } from "react";
|
|
4
4
|
import l from "styled-components";
|
|
5
|
-
import { useTheme as
|
|
6
|
-
import { GoogleNavbar as
|
|
5
|
+
import { useTheme as be, deepMergeTheme as E, defaultTheme as M, ThemeProvider as Se } from "@mxmweb/zui-theme";
|
|
6
|
+
import { GoogleNavbar as Te, CustomDock as Ae } from "@mxmweb/zui-components";
|
|
7
7
|
/**
|
|
8
8
|
* React Router v6.30.1
|
|
9
9
|
*
|
|
@@ -14,33 +14,33 @@ import { GoogleNavbar as Se, CustomDock as Ie } from "@mxmweb/zui-components";
|
|
|
14
14
|
*
|
|
15
15
|
* @license MIT
|
|
16
16
|
*/
|
|
17
|
-
const
|
|
18
|
-
process.env.NODE_ENV !== "production" && (
|
|
19
|
-
const
|
|
20
|
-
process.env.NODE_ENV !== "production" && (
|
|
21
|
-
const
|
|
22
|
-
process.env.NODE_ENV !== "production" && (
|
|
23
|
-
const
|
|
24
|
-
process.env.NODE_ENV !== "production" && (
|
|
25
|
-
const
|
|
26
|
-
process.env.NODE_ENV !== "production" && (
|
|
27
|
-
const
|
|
17
|
+
const Ne = /* @__PURE__ */ R.createContext(null);
|
|
18
|
+
process.env.NODE_ENV !== "production" && (Ne.displayName = "DataRouter");
|
|
19
|
+
const Re = /* @__PURE__ */ R.createContext(null);
|
|
20
|
+
process.env.NODE_ENV !== "production" && (Re.displayName = "DataRouterState");
|
|
21
|
+
const Me = /* @__PURE__ */ R.createContext(null);
|
|
22
|
+
process.env.NODE_ENV !== "production" && (Me.displayName = "Await");
|
|
23
|
+
const ze = /* @__PURE__ */ R.createContext(null);
|
|
24
|
+
process.env.NODE_ENV !== "production" && (ze.displayName = "Navigation");
|
|
25
|
+
const Fe = /* @__PURE__ */ R.createContext(null);
|
|
26
|
+
process.env.NODE_ENV !== "production" && (Fe.displayName = "Location");
|
|
27
|
+
const Ce = /* @__PURE__ */ R.createContext({
|
|
28
28
|
outlet: null,
|
|
29
29
|
matches: [],
|
|
30
30
|
isDataRoute: !1
|
|
31
31
|
});
|
|
32
|
-
process.env.NODE_ENV !== "production" && (
|
|
33
|
-
const
|
|
34
|
-
process.env.NODE_ENV !== "production" && (
|
|
35
|
-
const
|
|
36
|
-
function
|
|
37
|
-
let
|
|
38
|
-
return
|
|
32
|
+
process.env.NODE_ENV !== "production" && (Ce.displayName = "Route");
|
|
33
|
+
const We = /* @__PURE__ */ R.createContext(null);
|
|
34
|
+
process.env.NODE_ENV !== "production" && (We.displayName = "RouteError");
|
|
35
|
+
const Oe = /* @__PURE__ */ R.createContext(null);
|
|
36
|
+
function Le(t) {
|
|
37
|
+
let c = R.useContext(Ce).outlet;
|
|
38
|
+
return c && /* @__PURE__ */ R.createElement(Oe.Provider, {
|
|
39
39
|
value: t
|
|
40
|
-
},
|
|
40
|
+
}, c);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
42
|
+
function je(t) {
|
|
43
|
+
return Le(t.context);
|
|
44
44
|
}
|
|
45
45
|
new Promise(() => {
|
|
46
46
|
});
|
|
@@ -50,14 +50,14 @@ new Promise(() => {
|
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
|
-
const
|
|
53
|
+
const Ve = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), $e = (...t) => t.filter((c, w, b) => !!c && c.trim() !== "" && b.indexOf(c) === w).join(" ").trim();
|
|
54
54
|
/**
|
|
55
55
|
* @license lucide-react v0.456.0 - ISC
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
59
|
*/
|
|
60
|
-
var
|
|
60
|
+
var Pe = {
|
|
61
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
62
62
|
width: 24,
|
|
63
63
|
height: 24,
|
|
@@ -74,31 +74,31 @@ var je = {
|
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
76
|
*/
|
|
77
|
-
const
|
|
77
|
+
const He = me(
|
|
78
78
|
({
|
|
79
79
|
color: t = "currentColor",
|
|
80
|
-
size:
|
|
80
|
+
size: c = 24,
|
|
81
81
|
strokeWidth: w = 2,
|
|
82
82
|
absoluteStrokeWidth: b,
|
|
83
83
|
className: i = "",
|
|
84
|
-
children:
|
|
85
|
-
iconNode:
|
|
86
|
-
...
|
|
87
|
-
},
|
|
84
|
+
children: $,
|
|
85
|
+
iconNode: O,
|
|
86
|
+
...z
|
|
87
|
+
}, P) => xe(
|
|
88
88
|
"svg",
|
|
89
89
|
{
|
|
90
|
-
ref:
|
|
91
|
-
...
|
|
92
|
-
width:
|
|
93
|
-
height:
|
|
90
|
+
ref: P,
|
|
91
|
+
...Pe,
|
|
92
|
+
width: c,
|
|
93
|
+
height: c,
|
|
94
94
|
stroke: t,
|
|
95
|
-
strokeWidth: b ? Number(w) * 24 / Number(
|
|
96
|
-
className:
|
|
97
|
-
...
|
|
95
|
+
strokeWidth: b ? Number(w) * 24 / Number(c) : w,
|
|
96
|
+
className: $e("lucide", i),
|
|
97
|
+
...z
|
|
98
98
|
},
|
|
99
99
|
[
|
|
100
|
-
...
|
|
101
|
-
...Array.isArray(
|
|
100
|
+
...O.map(([u, d]) => xe(u, d)),
|
|
101
|
+
...Array.isArray($) ? $ : [$]
|
|
102
102
|
]
|
|
103
103
|
)
|
|
104
104
|
);
|
|
@@ -108,12 +108,12 @@ const Ve = ve(
|
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
109
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
110
|
*/
|
|
111
|
-
const
|
|
112
|
-
const w =
|
|
113
|
-
({ className: b, ...i },
|
|
114
|
-
ref:
|
|
115
|
-
iconNode:
|
|
116
|
-
className:
|
|
111
|
+
const Be = (t, c) => {
|
|
112
|
+
const w = me(
|
|
113
|
+
({ className: b, ...i }, $) => xe(He, {
|
|
114
|
+
ref: $,
|
|
115
|
+
iconNode: c,
|
|
116
|
+
className: $e(`lucide-${Ve(t)}`, b),
|
|
117
117
|
...i
|
|
118
118
|
})
|
|
119
119
|
);
|
|
@@ -125,7 +125,7 @@ const $e = (t, s) => {
|
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
127
|
*/
|
|
128
|
-
const
|
|
128
|
+
const _e = Be("ArrowLeft", [
|
|
129
129
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
130
130
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
131
131
|
]);
|
|
@@ -135,9 +135,9 @@ const Pe = $e("ArrowLeft", [
|
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
137
|
*/
|
|
138
|
-
const
|
|
138
|
+
const se = Be("ChevronRight", [
|
|
139
139
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
140
|
-
]),
|
|
140
|
+
]), Ge = l.div`
|
|
141
141
|
display: flex;
|
|
142
142
|
justify-content: flex-start;
|
|
143
143
|
align-items: flex-start;
|
|
@@ -147,7 +147,7 @@ const le = $e("ChevronRight", [
|
|
|
147
147
|
width: 100%;
|
|
148
148
|
max-width: 98%;
|
|
149
149
|
position: relative;
|
|
150
|
-
`,
|
|
150
|
+
`, Ke = l.div`
|
|
151
151
|
display: flex;
|
|
152
152
|
height: 38px;
|
|
153
153
|
z-index: 10;
|
|
@@ -158,7 +158,7 @@ const le = $e("ChevronRight", [
|
|
|
158
158
|
justify-content: flex-start;
|
|
159
159
|
width: 100%;
|
|
160
160
|
min-width: 0; /* 确保 flex 子元素可以收缩 */
|
|
161
|
-
`,
|
|
161
|
+
`, Ye = l.button`
|
|
162
162
|
display: flex;
|
|
163
163
|
align-items: center;
|
|
164
164
|
justify-content: center;
|
|
@@ -184,7 +184,7 @@ const le = $e("ChevronRight", [
|
|
|
184
184
|
&:active svg {
|
|
185
185
|
transform: translateY(0);
|
|
186
186
|
}
|
|
187
|
-
`,
|
|
187
|
+
`, Ee = l.div`
|
|
188
188
|
line-height: 1.4;
|
|
189
189
|
cursor: pointer;
|
|
190
190
|
transition: color 0.2s ease;
|
|
@@ -197,7 +197,7 @@ const le = $e("ChevronRight", [
|
|
|
197
197
|
&:hover {
|
|
198
198
|
color: #007bff;
|
|
199
199
|
}
|
|
200
|
-
`,
|
|
200
|
+
`, qe = l.div`
|
|
201
201
|
line-height: 1.4;
|
|
202
202
|
white-space: nowrap;
|
|
203
203
|
overflow: hidden;
|
|
@@ -212,7 +212,7 @@ const le = $e("ChevronRight", [
|
|
|
212
212
|
max-width: 50%;
|
|
213
213
|
min-width: 0;
|
|
214
214
|
overflow: hidden;
|
|
215
|
-
`,
|
|
215
|
+
`, ce = l.div`
|
|
216
216
|
display: flex;
|
|
217
217
|
align-items: center;
|
|
218
218
|
gap: 4px;
|
|
@@ -229,12 +229,12 @@ const le = $e("ChevronRight", [
|
|
|
229
229
|
&:hover {
|
|
230
230
|
color: ${(t) => t.$isLast ? "#007bff" : "inherit"};
|
|
231
231
|
}
|
|
232
|
-
`,
|
|
232
|
+
`, de = l.div`
|
|
233
233
|
display: flex;
|
|
234
234
|
align-items: center;
|
|
235
235
|
color: #6c757d;
|
|
236
236
|
margin: 0 2px;
|
|
237
|
-
`,
|
|
237
|
+
`, Xe = l.div`
|
|
238
238
|
display: flex;
|
|
239
239
|
flex-direction: column;
|
|
240
240
|
width: 100%;
|
|
@@ -249,69 +249,69 @@ l.div`
|
|
|
249
249
|
transform: translateX(-50%);
|
|
250
250
|
z-index: 1000;
|
|
251
251
|
`;
|
|
252
|
-
const
|
|
252
|
+
const $t = ({
|
|
253
253
|
children: t,
|
|
254
|
-
goBack:
|
|
254
|
+
goBack: c,
|
|
255
255
|
title: w,
|
|
256
256
|
description: b,
|
|
257
257
|
breadcrumbs: i,
|
|
258
|
-
dockItems:
|
|
259
|
-
dockActiveMode:
|
|
260
|
-
defaultDockActiveId:
|
|
261
|
-
defaultDockActiveIds:
|
|
258
|
+
dockItems: $,
|
|
259
|
+
dockActiveMode: O = "single",
|
|
260
|
+
defaultDockActiveId: z,
|
|
261
|
+
defaultDockActiveIds: P,
|
|
262
262
|
styles: u,
|
|
263
|
-
eventsEmit:
|
|
263
|
+
eventsEmit: d
|
|
264
264
|
}) => {
|
|
265
|
-
var
|
|
266
|
-
const
|
|
265
|
+
var H, o, _, ie, U, pe, re, V;
|
|
266
|
+
const L = be(), S = E(
|
|
267
267
|
// 基础:默认主题 + useTheme的配置
|
|
268
|
-
|
|
268
|
+
E({ theme: M, mode: "light" }, L),
|
|
269
269
|
// 最高层:用户手动传入的styles
|
|
270
270
|
u
|
|
271
|
-
), r = (
|
|
272
|
-
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
},
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
},
|
|
271
|
+
), r = (S == null ? void 0 : S.theme) || M, q = x.useRef(null), T = () => {
|
|
272
|
+
d != null && d.onGoBack ? d.onGoBack() : c && c();
|
|
273
|
+
}, j = () => {
|
|
274
|
+
d != null && d.onTitleClick && d.onTitleClick();
|
|
275
|
+
}, A = (k, G) => {
|
|
276
|
+
d != null && d.onBreadcrumbClick ? d.onBreadcrumbClick(k, G) : k.onClick && k.onClick();
|
|
277
|
+
}, I = (k, G) => {
|
|
278
|
+
d != null && d.onDockItemClick && d.onDockItemClick(k, G);
|
|
279
|
+
}, F = () => {
|
|
280
280
|
if (!i || i.length === 0) return null;
|
|
281
|
-
const k = x.useRef(null), [
|
|
281
|
+
const k = x.useRef(null), [G, X] = x.useState({ start: 0, end: i.length, showEllipsis: !1 }), Z = x.useCallback(() => {
|
|
282
282
|
if (!k.current || i.length <= 3) {
|
|
283
|
-
|
|
283
|
+
X({ start: 0, end: i.length, showEllipsis: !1 });
|
|
284
284
|
return;
|
|
285
285
|
}
|
|
286
286
|
const v = k.current.offsetWidth * 0.5;
|
|
287
|
-
let
|
|
288
|
-
if (
|
|
289
|
-
|
|
287
|
+
let K = Math.floor((v - 30) / (120 + 20));
|
|
288
|
+
if (K < 2 && (K = 2), K >= i.length) {
|
|
289
|
+
X({ start: 0, end: i.length, showEllipsis: !1 });
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
start:
|
|
295
|
-
end:
|
|
296
|
-
showEllipsis:
|
|
292
|
+
const ae = 0, te = Math.min(K - 1, i.length);
|
|
293
|
+
X({
|
|
294
|
+
start: ae,
|
|
295
|
+
end: te,
|
|
296
|
+
showEllipsis: te < i.length - 1
|
|
297
297
|
});
|
|
298
298
|
}, [i.length]);
|
|
299
299
|
if (x.useEffect(() => {
|
|
300
|
-
|
|
300
|
+
Z();
|
|
301
301
|
const g = new ResizeObserver(() => {
|
|
302
|
-
|
|
302
|
+
Z();
|
|
303
303
|
});
|
|
304
304
|
return k.current && g.observe(k.current), () => {
|
|
305
305
|
g.disconnect();
|
|
306
306
|
};
|
|
307
|
-
}, [
|
|
307
|
+
}, [Z]), i.length <= 3)
|
|
308
308
|
return /* @__PURE__ */ e(ye, { children: i.map((g, v) => /* @__PURE__ */ f(x.Fragment, { children: [
|
|
309
309
|
/* @__PURE__ */ e(
|
|
310
|
-
|
|
310
|
+
ce,
|
|
311
311
|
{
|
|
312
312
|
$isLast: v === i.length - 1,
|
|
313
313
|
$isClickable: !!(v < i.length - 1 || g.onClick),
|
|
314
|
-
onClick: () =>
|
|
314
|
+
onClick: () => A(g, v),
|
|
315
315
|
style: {
|
|
316
316
|
color: v === i.length - 1 ? r.colors.text : r.colors.textSecondary || r.colors.disabledText
|
|
317
317
|
},
|
|
@@ -319,30 +319,30 @@ const mt = ({
|
|
|
319
319
|
children: g.label
|
|
320
320
|
}
|
|
321
321
|
),
|
|
322
|
-
v < i.length - 1 && /* @__PURE__ */ e(
|
|
322
|
+
v < i.length - 1 && /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(se, { size: 14 }) })
|
|
323
323
|
] }, g.id)) });
|
|
324
|
-
const { start:
|
|
324
|
+
const { start: N, end: D, showEllipsis: ee } = G;
|
|
325
325
|
return /* @__PURE__ */ f(ye, { children: [
|
|
326
|
-
i.slice(
|
|
326
|
+
i.slice(N, D).map((g, v) => /* @__PURE__ */ f(x.Fragment, { children: [
|
|
327
327
|
/* @__PURE__ */ e(
|
|
328
|
-
|
|
328
|
+
ce,
|
|
329
329
|
{
|
|
330
|
-
$isLast: v ===
|
|
331
|
-
$isClickable: !!(v <
|
|
332
|
-
onClick: () =>
|
|
330
|
+
$isLast: v === D - N - 1 && !ee,
|
|
331
|
+
$isClickable: !!(v < D - N - 1 || g.onClick),
|
|
332
|
+
onClick: () => A(g, N + v),
|
|
333
333
|
style: {
|
|
334
|
-
color: v ===
|
|
334
|
+
color: v === D - N - 1 && !ee ? r.colors.text : r.colors.textSecondary || r.colors.disabledText
|
|
335
335
|
},
|
|
336
336
|
title: g.label,
|
|
337
337
|
children: g.label
|
|
338
338
|
}
|
|
339
339
|
),
|
|
340
|
-
v <
|
|
340
|
+
v < D - N - 1 && /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(se, { size: 14 }) })
|
|
341
341
|
] }, g.id)),
|
|
342
|
-
|
|
343
|
-
/* @__PURE__ */ e(
|
|
342
|
+
ee && /* @__PURE__ */ f(Ie, { children: [
|
|
343
|
+
/* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(se, { size: 14 }) }),
|
|
344
344
|
/* @__PURE__ */ e(
|
|
345
|
-
|
|
345
|
+
ce,
|
|
346
346
|
{
|
|
347
347
|
$isLast: !1,
|
|
348
348
|
$isClickable: !1,
|
|
@@ -351,17 +351,17 @@ const mt = ({
|
|
|
351
351
|
cursor: "default",
|
|
352
352
|
maxWidth: "auto"
|
|
353
353
|
},
|
|
354
|
-
title: `${i.slice(
|
|
354
|
+
title: `${i.slice(D, -1).map((g) => g.label).join(" > ")}`,
|
|
355
355
|
children: "..."
|
|
356
356
|
}
|
|
357
357
|
),
|
|
358
|
-
/* @__PURE__ */ e(
|
|
358
|
+
/* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(se, { size: 14 }) }),
|
|
359
359
|
/* @__PURE__ */ e(
|
|
360
|
-
|
|
360
|
+
ce,
|
|
361
361
|
{
|
|
362
362
|
$isLast: !0,
|
|
363
363
|
$isClickable: !!i[i.length - 1].onClick,
|
|
364
|
-
onClick: () =>
|
|
364
|
+
onClick: () => A(i[i.length - 1], i.length - 1),
|
|
365
365
|
style: {
|
|
366
366
|
color: r.colors.text
|
|
367
367
|
},
|
|
@@ -371,58 +371,58 @@ const mt = ({
|
|
|
371
371
|
)
|
|
372
372
|
] })
|
|
373
373
|
] });
|
|
374
|
-
}, [
|
|
374
|
+
}, [ne, he] = x.useState(!0);
|
|
375
375
|
return /* @__PURE__ */ e(
|
|
376
|
-
|
|
376
|
+
Ge,
|
|
377
377
|
{
|
|
378
378
|
style: {
|
|
379
379
|
background: r.colors.appBackground,
|
|
380
380
|
color: r.colors.text,
|
|
381
|
-
fontFamily: ((o = (
|
|
381
|
+
fontFamily: ((o = (H = r.fonts) == null ? void 0 : H.body) == null ? void 0 : o.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
382
382
|
},
|
|
383
383
|
children: /* @__PURE__ */ f("div", { style: { height: "100%", display: "flex", width: "100%", gap: 12 }, children: [
|
|
384
|
-
|
|
385
|
-
|
|
384
|
+
$ && $.length > 0 && /* @__PURE__ */ e("div", { style: { flex: `0 0 ${ne ? 72 : 28}px`, transition: "flex-basis .2s ease" }, children: /* @__PURE__ */ e(
|
|
385
|
+
Te,
|
|
386
386
|
{
|
|
387
|
-
items:
|
|
388
|
-
open:
|
|
389
|
-
onOpenChange:
|
|
390
|
-
onItemClick: (k) =>
|
|
387
|
+
items: $,
|
|
388
|
+
open: ne,
|
|
389
|
+
onOpenChange: he,
|
|
390
|
+
onItemClick: (k) => I({ id: String(k.key), label: k.name }, 0),
|
|
391
391
|
defaultOpen: !0
|
|
392
392
|
}
|
|
393
393
|
) }),
|
|
394
394
|
/* @__PURE__ */ f("div", { style: { display: "flex", flexDirection: "column", flex: 1, minWidth: 0 }, children: [
|
|
395
|
-
(w || b ||
|
|
396
|
-
|
|
397
|
-
|
|
395
|
+
(w || b || c || i) && /* @__PURE__ */ f(Ke, { ref: q, children: [
|
|
396
|
+
c && /* @__PURE__ */ e(
|
|
397
|
+
Ye,
|
|
398
398
|
{
|
|
399
|
-
onClick:
|
|
399
|
+
onClick: T,
|
|
400
400
|
style: { color: r.colors.primary, borderRadius: r.space.radius || "6px" },
|
|
401
401
|
title: "\u8FD4\u56DE",
|
|
402
|
-
children: /* @__PURE__ */ e(
|
|
402
|
+
children: /* @__PURE__ */ e(_e, { size: 18 })
|
|
403
403
|
}
|
|
404
404
|
),
|
|
405
|
-
|
|
405
|
+
F(),
|
|
406
406
|
w && /* @__PURE__ */ e(
|
|
407
|
-
|
|
407
|
+
Ee,
|
|
408
408
|
{
|
|
409
|
-
onClick:
|
|
409
|
+
onClick: j,
|
|
410
410
|
style: {
|
|
411
411
|
color: r.colors.text,
|
|
412
|
-
fontSize: ((
|
|
413
|
-
fontWeight: ((
|
|
412
|
+
fontSize: ((ie = (_ = r.fonts) == null ? void 0 : _.heading) == null ? void 0 : ie.size) || "16px",
|
|
413
|
+
fontWeight: ((pe = (U = r.fonts) == null ? void 0 : U.heading) == null ? void 0 : pe.weight) || "600"
|
|
414
414
|
},
|
|
415
415
|
title: w,
|
|
416
416
|
children: w
|
|
417
417
|
}
|
|
418
418
|
),
|
|
419
419
|
b && /* @__PURE__ */ e(
|
|
420
|
-
|
|
420
|
+
qe,
|
|
421
421
|
{
|
|
422
422
|
style: {
|
|
423
423
|
color: r.colors.textSecondary || r.colors.disabledText,
|
|
424
424
|
opacity: 0.7,
|
|
425
|
-
fontSize: ((
|
|
425
|
+
fontSize: ((V = (re = r.fonts) == null ? void 0 : re.body) == null ? void 0 : V.size) || "12px"
|
|
426
426
|
},
|
|
427
427
|
title: b,
|
|
428
428
|
children: b
|
|
@@ -430,7 +430,7 @@ const mt = ({
|
|
|
430
430
|
)
|
|
431
431
|
] }),
|
|
432
432
|
/* @__PURE__ */ e(
|
|
433
|
-
|
|
433
|
+
Xe,
|
|
434
434
|
{
|
|
435
435
|
style: {
|
|
436
436
|
background: r.colors.dashboardBackground || "transparent",
|
|
@@ -438,14 +438,14 @@ const mt = ({
|
|
|
438
438
|
borderRadius: r.space.radius || void 0,
|
|
439
439
|
boxShadow: r.colors.shadow || void 0
|
|
440
440
|
},
|
|
441
|
-
children: t || /* @__PURE__ */ e(
|
|
441
|
+
children: t || /* @__PURE__ */ e(je, {})
|
|
442
442
|
}
|
|
443
443
|
)
|
|
444
444
|
] })
|
|
445
445
|
] })
|
|
446
446
|
}
|
|
447
447
|
);
|
|
448
|
-
},
|
|
448
|
+
}, Ze = l.div.withConfig({
|
|
449
449
|
shouldForwardProp: (t) => !["backgroundImage", "backgroundColor"].includes(t)
|
|
450
450
|
})`
|
|
451
451
|
position: fixed;
|
|
@@ -458,7 +458,7 @@ const mt = ({
|
|
|
458
458
|
flex-direction: column;
|
|
459
459
|
overflow: hidden;
|
|
460
460
|
z-index: 1;
|
|
461
|
-
`,
|
|
461
|
+
`, Je = l.div`
|
|
462
462
|
height: 48px;
|
|
463
463
|
width: 100%;
|
|
464
464
|
display: flex;
|
|
@@ -467,7 +467,7 @@ const mt = ({
|
|
|
467
467
|
background: transparent;
|
|
468
468
|
z-index: 10;
|
|
469
469
|
flex-shrink: 0;
|
|
470
|
-
`,
|
|
470
|
+
`, Qe = l.div`
|
|
471
471
|
flex: 1;
|
|
472
472
|
width: 100%;
|
|
473
473
|
overflow-y: auto;
|
|
@@ -494,7 +494,7 @@ const mt = ({
|
|
|
494
494
|
&::-webkit-scrollbar-thumb:hover {
|
|
495
495
|
background: rgba(255, 255, 255, 0.5);
|
|
496
496
|
}
|
|
497
|
-
`,
|
|
497
|
+
`, Ue = l.div`
|
|
498
498
|
height: 80px;
|
|
499
499
|
width: 100%;
|
|
500
500
|
display: flex;
|
|
@@ -504,68 +504,68 @@ const mt = ({
|
|
|
504
504
|
background: transparent;
|
|
505
505
|
z-index: 10;
|
|
506
506
|
flex-shrink: 0;
|
|
507
|
-
`,
|
|
507
|
+
`, Bt = ({
|
|
508
508
|
children: t,
|
|
509
|
-
backgroundImage:
|
|
509
|
+
backgroundImage: c,
|
|
510
510
|
backgroundColor: w,
|
|
511
511
|
header: b,
|
|
512
512
|
dockItems: i,
|
|
513
|
-
dockActiveMode:
|
|
514
|
-
defaultDockActiveId:
|
|
515
|
-
defaultDockActiveIds:
|
|
516
|
-
styles:
|
|
513
|
+
dockActiveMode: $ = "single",
|
|
514
|
+
defaultDockActiveId: O,
|
|
515
|
+
defaultDockActiveIds: z,
|
|
516
|
+
styles: P,
|
|
517
517
|
eventsEmit: u
|
|
518
518
|
}) => {
|
|
519
|
-
var
|
|
520
|
-
const
|
|
519
|
+
var j, A;
|
|
520
|
+
const d = be(), L = E(
|
|
521
521
|
// 基础:默认主题 + useTheme的配置
|
|
522
|
-
|
|
522
|
+
E({ theme: M, mode: "light" }, d),
|
|
523
523
|
// 最高层:用户手动传入的styles
|
|
524
|
-
|
|
525
|
-
),
|
|
526
|
-
u != null && u.onDockItemClick ? u.onDockItemClick(
|
|
527
|
-
},
|
|
528
|
-
u != null && u.onDockActiveChange && u.onDockActiveChange(
|
|
529
|
-
},
|
|
530
|
-
u != null && u.onDockActiveChangeMultiple && u.onDockActiveChangeMultiple(
|
|
524
|
+
P
|
|
525
|
+
), S = (L == null ? void 0 : L.theme) || M, r = (I, F) => {
|
|
526
|
+
u != null && u.onDockItemClick ? u.onDockItemClick(I, F) : I.onClick && I.onClick();
|
|
527
|
+
}, q = (I, F) => {
|
|
528
|
+
u != null && u.onDockActiveChange && u.onDockActiveChange(I, F);
|
|
529
|
+
}, T = (I, F) => {
|
|
530
|
+
u != null && u.onDockActiveChangeMultiple && u.onDockActiveChangeMultiple(I, F);
|
|
531
531
|
};
|
|
532
532
|
return /* @__PURE__ */ f(
|
|
533
|
-
|
|
533
|
+
Ze,
|
|
534
534
|
{
|
|
535
|
-
backgroundImage:
|
|
535
|
+
backgroundImage: c,
|
|
536
536
|
backgroundColor: w,
|
|
537
537
|
children: [
|
|
538
|
-
b && /* @__PURE__ */ e(
|
|
538
|
+
b && /* @__PURE__ */ e(Je, { children: b }),
|
|
539
539
|
/* @__PURE__ */ e(
|
|
540
|
-
|
|
540
|
+
Qe,
|
|
541
541
|
{
|
|
542
542
|
style: {
|
|
543
|
-
color:
|
|
544
|
-
fontFamily: ((
|
|
543
|
+
color: S.colors.text,
|
|
544
|
+
fontFamily: ((A = (j = S.fonts) == null ? void 0 : j.body) == null ? void 0 : A.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
545
545
|
},
|
|
546
546
|
children: t
|
|
547
547
|
}
|
|
548
548
|
),
|
|
549
|
-
i && i.length > 0 && /* @__PURE__ */ e(
|
|
550
|
-
|
|
549
|
+
i && i.length > 0 && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e(
|
|
550
|
+
Ae,
|
|
551
551
|
{
|
|
552
552
|
items: i,
|
|
553
553
|
itemWidth: 48,
|
|
554
554
|
itemHeight: 48,
|
|
555
555
|
magnification: 1.5,
|
|
556
556
|
itemGap: 8,
|
|
557
|
-
activeMode:
|
|
558
|
-
defaultActiveId:
|
|
559
|
-
defaultActiveIds:
|
|
557
|
+
activeMode: $,
|
|
558
|
+
defaultActiveId: O,
|
|
559
|
+
defaultActiveIds: z,
|
|
560
560
|
onItemClick: r,
|
|
561
|
-
onActiveChange:
|
|
562
|
-
onActiveChangeMultiple:
|
|
561
|
+
onActiveChange: q,
|
|
562
|
+
onActiveChangeMultiple: T
|
|
563
563
|
}
|
|
564
564
|
) })
|
|
565
565
|
]
|
|
566
566
|
}
|
|
567
567
|
);
|
|
568
|
-
},
|
|
568
|
+
}, et = l.div`
|
|
569
569
|
--header-height: 56px;
|
|
570
570
|
--page-gutter: 16px;
|
|
571
571
|
--sidebar-width: 264px;
|
|
@@ -578,7 +578,7 @@ const mt = ({
|
|
|
578
578
|
min-height: 100vh;
|
|
579
579
|
height: 100vh; /* 以视口高度为基准,便于内部独立滚动布局 */
|
|
580
580
|
position: relative;
|
|
581
|
-
`,
|
|
581
|
+
`, tt = l.div`
|
|
582
582
|
position: sticky;
|
|
583
583
|
top: 0;
|
|
584
584
|
z-index: 30;
|
|
@@ -590,16 +590,16 @@ const mt = ({
|
|
|
590
590
|
padding: 0 16px;
|
|
591
591
|
border-bottom: 1px solid rgba(0,0,0,0.06);
|
|
592
592
|
backdrop-filter: blur(8px);
|
|
593
|
-
`,
|
|
593
|
+
`, ot = l.div`
|
|
594
594
|
display: flex;
|
|
595
595
|
align-items: center;
|
|
596
596
|
gap: 12px;
|
|
597
597
|
min-width: 0;
|
|
598
|
-
`,
|
|
598
|
+
`, nt = l.div`
|
|
599
599
|
display: flex;
|
|
600
600
|
align-items: center;
|
|
601
601
|
gap: 8px;
|
|
602
|
-
`,
|
|
602
|
+
`, ve = l.button`
|
|
603
603
|
display: inline-flex;
|
|
604
604
|
align-items: center;
|
|
605
605
|
justify-content: center;
|
|
@@ -613,7 +613,7 @@ const mt = ({
|
|
|
613
613
|
|
|
614
614
|
&:hover { background: rgba(0,0,0,0.04); }
|
|
615
615
|
&:active { transform: translateY(1px); }
|
|
616
|
-
`,
|
|
616
|
+
`, it = l.div`
|
|
617
617
|
display: grid;
|
|
618
618
|
grid-template-columns: var(--sidebar-width) 1fr var(--toc-width);
|
|
619
619
|
gap: 16px;
|
|
@@ -634,9 +634,9 @@ const mt = ({
|
|
|
634
634
|
gap: 12px;
|
|
635
635
|
padding: 12px 12px 20px 12px;
|
|
636
636
|
}
|
|
637
|
-
`,
|
|
637
|
+
`, rt = l.aside`
|
|
638
638
|
position: relative;
|
|
639
|
-
`,
|
|
639
|
+
`, lt = l.div`
|
|
640
640
|
height: 100%;
|
|
641
641
|
overflow: hidden;
|
|
642
642
|
padding-right: 8px;
|
|
@@ -645,7 +645,7 @@ const mt = ({
|
|
|
645
645
|
opacity: ${(t) => t.$collapsed ? 0 : 1};
|
|
646
646
|
transform: translateX(${(t) => t.$collapsed ? "-6px" : "0px"});
|
|
647
647
|
pointer-events: ${(t) => t.$collapsed ? "none" : "auto"};
|
|
648
|
-
`,
|
|
648
|
+
`, at = l.button`
|
|
649
649
|
position: absolute;
|
|
650
650
|
top: 6px;
|
|
651
651
|
right: -10px;
|
|
@@ -660,42 +660,47 @@ const mt = ({
|
|
|
660
660
|
justify-content: center;
|
|
661
661
|
transition: background .15s ease;
|
|
662
662
|
&:hover { background: rgba(0,0,0,0.12); }
|
|
663
|
-
`,
|
|
663
|
+
`, st = l.div`
|
|
664
664
|
height: 100%;
|
|
665
665
|
overflow: auto;
|
|
666
666
|
padding-right: 8px;
|
|
667
|
-
`,
|
|
667
|
+
`, ct = l.main`
|
|
668
668
|
position: relative;
|
|
669
669
|
min-width: 0;
|
|
670
670
|
height: 100%;
|
|
671
671
|
overflow: auto; /* 文档渲染区独立滚动 */
|
|
672
|
-
`,
|
|
672
|
+
`, dt = l.div`
|
|
673
673
|
width: 100%;
|
|
674
674
|
max-width: var(--content-max);
|
|
675
675
|
margin: 0 auto;
|
|
676
676
|
background-clip: padding-box;
|
|
677
677
|
border-radius: 8px;
|
|
678
678
|
padding: 0px 12px;
|
|
679
|
-
|
|
679
|
+
padding-bottom: 120px; /* 底部留出足够的 margin,确保可以滚动到最底部 */
|
|
680
|
+
`, ht = l.div`
|
|
680
681
|
height: 100%;
|
|
681
682
|
transition: opacity .5s ease;
|
|
682
683
|
opacity: ${(t) => t.$opacity};
|
|
683
|
-
`,
|
|
684
|
+
`, pt = l.aside`
|
|
684
685
|
position: relative;
|
|
685
686
|
z-index: 1;
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
687
|
+
height: 100%;
|
|
688
|
+
overflow: hidden;
|
|
689
|
+
`, ut = l.div`
|
|
690
|
+
/* 右侧目录独立滚动 */
|
|
691
|
+
position: relative;
|
|
692
|
+
height: 100%;
|
|
693
|
+
overflow: auto;
|
|
690
694
|
padding-left: 8px;
|
|
691
695
|
border-left: 1px solid rgba(0,0,0,0.06);
|
|
692
696
|
background: transparent;
|
|
693
697
|
z-index: 1;
|
|
694
|
-
`,
|
|
698
|
+
`, gt = l.div`
|
|
695
699
|
transition: opacity .2s ease, transform .2s ease;
|
|
696
700
|
opacity: ${(t) => t.$collapsed ? 0 : 1};
|
|
697
701
|
transform: translateX(${(t) => t.$collapsed ? "6px" : "0px"});
|
|
698
702
|
pointer-events: ${(t) => t.$collapsed ? "none" : "auto"};
|
|
703
|
+
/* 不设置高度限制,让内容自然流动,由父容器 TocFloat 控制滚动 */
|
|
699
704
|
`;
|
|
700
705
|
l.button`
|
|
701
706
|
position: absolute;
|
|
@@ -713,11 +718,11 @@ l.button`
|
|
|
713
718
|
transition: background .15s ease;
|
|
714
719
|
&:hover { background: rgba(0,0,0,0.12); }
|
|
715
720
|
`;
|
|
716
|
-
const
|
|
721
|
+
const fe = l.div`
|
|
717
722
|
font-size: 12px;
|
|
718
723
|
opacity: .7;
|
|
719
724
|
padding: 8px 8px;
|
|
720
|
-
`,
|
|
725
|
+
`, Q = l.button`
|
|
721
726
|
width: 100%;
|
|
722
727
|
display: flex;
|
|
723
728
|
align-items: center;
|
|
@@ -738,7 +743,7 @@ const ue = l.div`
|
|
|
738
743
|
}
|
|
739
744
|
|
|
740
745
|
${(t) => t.$active ? "background: rgba(0,0,0,0.08); font-weight: 600;" : ""}
|
|
741
|
-
`,
|
|
746
|
+
`, ft = l.div`
|
|
742
747
|
display: flex;
|
|
743
748
|
align-items: center;
|
|
744
749
|
gap: 8px;
|
|
@@ -748,16 +753,16 @@ const ue = l.div`
|
|
|
748
753
|
overflow-y: hidden;
|
|
749
754
|
scrollbar-width: none;
|
|
750
755
|
&::-webkit-scrollbar { display: none; }
|
|
751
|
-
`,
|
|
756
|
+
`, xt = l.div`
|
|
752
757
|
width: 1px;
|
|
753
758
|
height: 16px;
|
|
754
759
|
background: currentColor;
|
|
755
760
|
opacity: .2;
|
|
756
|
-
`,
|
|
761
|
+
`, bt = {
|
|
757
762
|
theme: {
|
|
758
|
-
...
|
|
763
|
+
...M,
|
|
759
764
|
colors: {
|
|
760
|
-
...
|
|
765
|
+
...M.colors,
|
|
761
766
|
appBackground: "#ffffff",
|
|
762
767
|
panelBackground: "#ffffff",
|
|
763
768
|
dashboardBackground: "#ffffff",
|
|
@@ -767,11 +772,11 @@ const ue = l.div`
|
|
|
767
772
|
shadow: "0 1px 2px rgba(0,0,0,0.06)"
|
|
768
773
|
}
|
|
769
774
|
}
|
|
770
|
-
},
|
|
775
|
+
}, kt = {
|
|
771
776
|
theme: {
|
|
772
|
-
...
|
|
777
|
+
...M,
|
|
773
778
|
colors: {
|
|
774
|
-
...
|
|
779
|
+
...M.colors,
|
|
775
780
|
appBackground: "#0f172a",
|
|
776
781
|
panelBackground: "#111827",
|
|
777
782
|
dashboardBackground: "#0b1220",
|
|
@@ -782,138 +787,158 @@ const ue = l.div`
|
|
|
782
787
|
}
|
|
783
788
|
},
|
|
784
789
|
mode: "dark"
|
|
785
|
-
},
|
|
786
|
-
var
|
|
790
|
+
}, Dt = (t) => {
|
|
791
|
+
var K, ae, te, ke;
|
|
787
792
|
const {
|
|
788
|
-
children:
|
|
793
|
+
children: c,
|
|
789
794
|
headerLogo: w,
|
|
790
795
|
contentKey: b,
|
|
791
796
|
modules: i,
|
|
792
|
-
activeModuleKey:
|
|
793
|
-
onModuleChange:
|
|
794
|
-
languages:
|
|
795
|
-
activeLanguageKey:
|
|
797
|
+
activeModuleKey: $,
|
|
798
|
+
onModuleChange: O,
|
|
799
|
+
languages: z,
|
|
800
|
+
activeLanguageKey: P,
|
|
796
801
|
onLanguageChange: u,
|
|
797
|
-
themes:
|
|
798
|
-
activeThemeKey:
|
|
799
|
-
onThemeChange:
|
|
802
|
+
themes: d,
|
|
803
|
+
activeThemeKey: L,
|
|
804
|
+
onThemeChange: S,
|
|
800
805
|
sidebarItems: r,
|
|
801
|
-
activeSidebarId:
|
|
802
|
-
onSidebarItemClick:
|
|
803
|
-
activeTocId:
|
|
804
|
-
onTocItemClick:
|
|
805
|
-
collapsibleSidebar:
|
|
806
|
-
styles:
|
|
807
|
-
} = t,
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
806
|
+
activeSidebarId: q,
|
|
807
|
+
onSidebarItemClick: T,
|
|
808
|
+
activeTocId: j,
|
|
809
|
+
onTocItemClick: A,
|
|
810
|
+
collapsibleSidebar: I = !0,
|
|
811
|
+
styles: F
|
|
812
|
+
} = t, ne = be(), he = t.activeThemeKey === "dark" ? kt : bt, H = E(
|
|
813
|
+
E(
|
|
814
|
+
E({ theme: M, mode: "light" }, ne),
|
|
815
|
+
he
|
|
811
816
|
),
|
|
812
|
-
|
|
813
|
-
), o = (
|
|
817
|
+
F
|
|
818
|
+
), o = (H == null ? void 0 : H.theme) || M, [_, ie] = x.useState(!1), [U, pe] = x.useState(!1), [re, V] = x.useState(!1), k = typeof j == "string", [G, X] = x.useState(j), Z = x.useRef(null), [N, D] = x.useState(void 0), [ee, g] = x.useState(c), [v, ue] = x.useState(1);
|
|
814
819
|
x.useEffect(() => {
|
|
815
820
|
if (b === void 0) {
|
|
816
|
-
g(
|
|
821
|
+
g(c);
|
|
817
822
|
return;
|
|
818
823
|
}
|
|
819
|
-
|
|
824
|
+
ue(0);
|
|
820
825
|
const n = setTimeout(() => {
|
|
821
|
-
g(
|
|
826
|
+
g(c), requestAnimationFrame(() => ue(1));
|
|
822
827
|
}, 120);
|
|
823
828
|
return () => clearTimeout(n);
|
|
824
|
-
}, [b,
|
|
825
|
-
var n,
|
|
829
|
+
}, [b, c]), x.useMemo(() => {
|
|
830
|
+
var n, h, s, m, B, a, y, p, Y, C, W, J, oe;
|
|
826
831
|
return {
|
|
827
832
|
primaryColor: (n = o == null ? void 0 : o.colors) == null ? void 0 : n.primary,
|
|
828
|
-
secondaryColor: (
|
|
829
|
-
backgroundColor: (
|
|
830
|
-
textColor: (
|
|
831
|
-
borderColor: (
|
|
833
|
+
secondaryColor: (h = o == null ? void 0 : o.colors) == null ? void 0 : h.secondary,
|
|
834
|
+
backgroundColor: (s = o == null ? void 0 : o.colors) == null ? void 0 : s.appBackground,
|
|
835
|
+
textColor: (m = o == null ? void 0 : o.colors) == null ? void 0 : m.text,
|
|
836
|
+
borderColor: (B = o == null ? void 0 : o.colors) == null ? void 0 : B.border,
|
|
832
837
|
disabledBackground: (a = o == null ? void 0 : o.colors) == null ? void 0 : a.disabledBackground,
|
|
833
|
-
borderRadius: (
|
|
838
|
+
borderRadius: (y = o == null ? void 0 : o.space) == null ? void 0 : y.radius,
|
|
834
839
|
padding: (p = o == null ? void 0 : o.space) == null ? void 0 : p.padding,
|
|
835
|
-
margin: (
|
|
836
|
-
baseFontSize: (
|
|
840
|
+
margin: (Y = o == null ? void 0 : o.space) == null ? void 0 : Y.margin,
|
|
841
|
+
baseFontSize: (W = (C = o == null ? void 0 : o.fonts) == null ? void 0 : C.body) != null && W.size ? parseInt((oe = (J = o == null ? void 0 : o.fonts) == null ? void 0 : J.body) == null ? void 0 : oe.size, 10) : void 0
|
|
837
842
|
};
|
|
838
843
|
}, [o]), x.useEffect(() => {
|
|
839
|
-
if (
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
844
|
+
if (t.tocItems)
|
|
845
|
+
D(void 0);
|
|
846
|
+
else {
|
|
847
|
+
b !== void 0 && D(void 0);
|
|
848
|
+
let n = 0;
|
|
849
|
+
const h = 10;
|
|
850
|
+
let s = null, m = null;
|
|
851
|
+
const B = () => {
|
|
852
|
+
const a = Z.current;
|
|
853
|
+
if (!a) {
|
|
854
|
+
n < h ? (n++, s = setTimeout(B, 200)) : D([]);
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
const y = Array.from(a.querySelectorAll("h1, h2, h3"));
|
|
858
|
+
if (y.length === 0) {
|
|
859
|
+
n < h ? (n++, s = setTimeout(B, 200)) : D([]);
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
const p = /* @__PURE__ */ new Map(), Y = y.map((C) => {
|
|
863
|
+
var we;
|
|
864
|
+
const W = C.id || ((we = C.textContent) == null ? void 0 : we.trim().replace(/\s+/g, "-").toLowerCase()) || "", J = p.get(W) || 0;
|
|
865
|
+
p.set(W, J + 1);
|
|
866
|
+
const oe = J > 0 ? `${W}-${J}` : W;
|
|
867
|
+
C.id || (C.id = oe);
|
|
868
|
+
const De = C.tagName === "H1" ? 1 : C.tagName === "H2" ? 2 : 3;
|
|
869
|
+
return { id: oe, label: C.textContent || "", level: De };
|
|
849
870
|
});
|
|
850
|
-
|
|
851
|
-
}
|
|
852
|
-
return () =>
|
|
871
|
+
D(Y);
|
|
872
|
+
};
|
|
873
|
+
return m = requestAnimationFrame(() => {
|
|
874
|
+
s = setTimeout(B, 100);
|
|
875
|
+
}), () => {
|
|
876
|
+
m !== null && cancelAnimationFrame(m), s !== null && clearTimeout(s);
|
|
877
|
+
};
|
|
853
878
|
}
|
|
854
|
-
}, [
|
|
879
|
+
}, [c, t.tocItems, b]), x.useEffect(() => {
|
|
855
880
|
if (k) return;
|
|
856
|
-
const
|
|
857
|
-
if (
|
|
858
|
-
|
|
859
|
-
const
|
|
860
|
-
var p,
|
|
861
|
-
const
|
|
862
|
-
(
|
|
863
|
-
},
|
|
864
|
-
return
|
|
865
|
-
const
|
|
866
|
-
|
|
867
|
-
}), () =>
|
|
868
|
-
}, [
|
|
869
|
-
const
|
|
881
|
+
const h = ((t.tocItems ?? N) || []).map((a) => a.id).filter(Boolean);
|
|
882
|
+
if (h.length === 0) return;
|
|
883
|
+
X(void 0);
|
|
884
|
+
const s = { root: null, rootMargin: "0px 0px -70% 0px", threshold: 0 }, m = (a) => {
|
|
885
|
+
var p, Y;
|
|
886
|
+
const y = a.filter((C) => C.isIntersecting).sort((C, W) => C.boundingClientRect.top - W.boundingClientRect.top);
|
|
887
|
+
(Y = (p = y[0]) == null ? void 0 : p.target) != null && Y.id && X(y[0].target.id);
|
|
888
|
+
}, B = new IntersectionObserver(m, s);
|
|
889
|
+
return h.forEach((a) => {
|
|
890
|
+
const y = document.getElementById(a);
|
|
891
|
+
y && B.observe(y);
|
|
892
|
+
}), () => B.disconnect();
|
|
893
|
+
}, [N, k, t.tocItems, b]);
|
|
894
|
+
const ge = (n, h) => {
|
|
870
895
|
if (!n || n.length === 0) return;
|
|
871
|
-
const
|
|
872
|
-
return
|
|
873
|
-
},
|
|
874
|
-
const
|
|
875
|
-
|
|
896
|
+
const s = Math.max(0, n.findIndex((B) => B.key === h)), m = n[(s + 1) % n.length];
|
|
897
|
+
return m == null ? void 0 : m.key;
|
|
898
|
+
}, le = (n) => {
|
|
899
|
+
const h = document.getElementById(n);
|
|
900
|
+
h && h.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" });
|
|
876
901
|
};
|
|
877
|
-
return /* @__PURE__ */ e(
|
|
878
|
-
|
|
902
|
+
return /* @__PURE__ */ e(Se, { theme: o, mode: H.mode, children: /* @__PURE__ */ f(
|
|
903
|
+
et,
|
|
879
904
|
{
|
|
880
905
|
style: {
|
|
881
906
|
background: o.colors.appBackground,
|
|
882
907
|
color: o.colors.text,
|
|
883
|
-
fontFamily: ((
|
|
908
|
+
fontFamily: ((ae = (K = o.fonts) == null ? void 0 : K.body) == null ? void 0 : ae.family) || "PingFang SC, Microsoft YaHei, Arial, sans-serif"
|
|
884
909
|
},
|
|
885
910
|
children: [
|
|
886
911
|
/* @__PURE__ */ f(
|
|
887
|
-
|
|
912
|
+
tt,
|
|
888
913
|
{
|
|
889
914
|
style: {
|
|
890
915
|
background: o.colors.panelBackground || o.colors.dashboardBackground || "rgba(255,255,255,0.6)",
|
|
891
916
|
color: o.colors.text
|
|
892
917
|
},
|
|
893
918
|
children: [
|
|
894
|
-
/* @__PURE__ */ f(
|
|
919
|
+
/* @__PURE__ */ f(ot, { children: [
|
|
895
920
|
w,
|
|
896
|
-
i && i.length > 0 && /* @__PURE__ */ e(
|
|
897
|
-
|
|
921
|
+
i && i.length > 0 && /* @__PURE__ */ e(ft, { children: i.map((n) => /* @__PURE__ */ e(
|
|
922
|
+
Q,
|
|
898
923
|
{
|
|
899
|
-
$active: n.key ===
|
|
900
|
-
onClick: () =>
|
|
924
|
+
$active: n.key === $,
|
|
925
|
+
onClick: () => O == null ? void 0 : O(n.key),
|
|
901
926
|
title: n.label,
|
|
902
927
|
children: n.label
|
|
903
928
|
},
|
|
904
929
|
n.key
|
|
905
930
|
)) })
|
|
906
931
|
] }),
|
|
907
|
-
/* @__PURE__ */ f(
|
|
932
|
+
/* @__PURE__ */ f(nt, { children: [
|
|
908
933
|
/* @__PURE__ */ e("div", { className: "hide-on-desktop", style: { display: "none" } }),
|
|
909
|
-
|
|
910
|
-
|
|
934
|
+
z && z.length > 0 && /* @__PURE__ */ e(
|
|
935
|
+
ve,
|
|
911
936
|
{
|
|
912
937
|
onClick: () => {
|
|
913
|
-
const n =
|
|
938
|
+
const n = ge(z, P);
|
|
914
939
|
n && (u == null || u(n));
|
|
915
940
|
},
|
|
916
|
-
title: ((
|
|
941
|
+
title: ((te = z.find((n) => n.key === P)) == null ? void 0 : te.label) || "Language",
|
|
917
942
|
"aria-label": "language",
|
|
918
943
|
style: { color: o.colors.text },
|
|
919
944
|
children: /* @__PURE__ */ f("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
@@ -922,42 +947,42 @@ const ue = l.div`
|
|
|
922
947
|
] })
|
|
923
948
|
}
|
|
924
949
|
),
|
|
925
|
-
/* @__PURE__ */ e(
|
|
926
|
-
|
|
927
|
-
|
|
950
|
+
/* @__PURE__ */ e(xt, {}),
|
|
951
|
+
d && d.length > 0 && /* @__PURE__ */ e(
|
|
952
|
+
ve,
|
|
928
953
|
{
|
|
929
954
|
onClick: () => {
|
|
930
|
-
const n =
|
|
931
|
-
n && (
|
|
955
|
+
const n = ge(d, L);
|
|
956
|
+
n && (S == null || S(n));
|
|
932
957
|
},
|
|
933
|
-
title: ((
|
|
958
|
+
title: ((ke = d.find((n) => n.key === L)) == null ? void 0 : ke.label) || "Theme",
|
|
934
959
|
"aria-label": "theme",
|
|
935
960
|
style: { color: o.colors.text },
|
|
936
961
|
children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z", stroke: "currentColor", strokeWidth: "1.6" }) })
|
|
937
962
|
}
|
|
938
963
|
),
|
|
939
|
-
/* @__PURE__ */ e("div", { className: "mobile-only", style: { display: "none" }, children: /* @__PURE__ */ e(
|
|
964
|
+
/* @__PURE__ */ e("div", { className: "mobile-only", style: { display: "none" }, children: /* @__PURE__ */ e(Q, { onClick: () => V(!0), title: "\u6253\u5F00\u76EE\u5F55", children: "\u76EE\u5F55" }) })
|
|
940
965
|
] })
|
|
941
966
|
]
|
|
942
967
|
}
|
|
943
968
|
),
|
|
944
969
|
(() => {
|
|
945
|
-
const
|
|
946
|
-
return /* @__PURE__ */ f(
|
|
947
|
-
|
|
948
|
-
/* @__PURE__ */ e(
|
|
949
|
-
r.reduce((a,
|
|
950
|
-
const p =
|
|
951
|
-
return a[p] = a[p] || [], a[p].push(
|
|
970
|
+
const h = (Array.isArray(r) ? r.length : 0) > 1, s = h ? _ ? "10px" : "var(--sidebar-width)" : "0px", m = U ? "10px" : "var(--toc-width)", B = h ? `${s} 1fr ${m}` : `1fr ${m}`;
|
|
971
|
+
return /* @__PURE__ */ f(it, { style: { gridTemplateColumns: B }, children: [
|
|
972
|
+
h && /* @__PURE__ */ f(rt, { children: [
|
|
973
|
+
/* @__PURE__ */ e(lt, { $collapsed: _, children: /* @__PURE__ */ e(st, { children: r && r.length > 0 && /* @__PURE__ */ e("div", { children: Object.entries(
|
|
974
|
+
r.reduce((a, y) => {
|
|
975
|
+
const p = y.group || "\u6587\u6863";
|
|
976
|
+
return a[p] = a[p] || [], a[p].push(y), a;
|
|
952
977
|
}, {})
|
|
953
|
-
).map(([a,
|
|
954
|
-
/* @__PURE__ */ e(
|
|
955
|
-
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children:
|
|
956
|
-
|
|
978
|
+
).map(([a, y]) => /* @__PURE__ */ f("div", { children: [
|
|
979
|
+
/* @__PURE__ */ e(fe, { children: a }),
|
|
980
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: y.map((p) => /* @__PURE__ */ e(
|
|
981
|
+
Q,
|
|
957
982
|
{
|
|
958
|
-
$active: p.id ===
|
|
983
|
+
$active: p.id === q,
|
|
959
984
|
onClick: () => {
|
|
960
|
-
p.href && (p.href.startsWith("#") ?
|
|
985
|
+
p.href && (p.href.startsWith("#") ? le(p.href.slice(1)) : window.location.href = p.href), T == null || T(p), V(!1);
|
|
961
986
|
},
|
|
962
987
|
title: p.label,
|
|
963
988
|
children: p.label
|
|
@@ -965,23 +990,23 @@ const ue = l.div`
|
|
|
965
990
|
p.id
|
|
966
991
|
)) })
|
|
967
992
|
] }, a)) }) }) }),
|
|
968
|
-
|
|
993
|
+
I && h && /* @__PURE__ */ e(at, { onClick: () => ie((a) => !a), title: _ ? "\u5C55\u5F00\u5DE6\u4FA7\u680F" : "\u6536\u8D77\u5DE6\u4FA7\u680F", "aria-label": "toggle-left", children: _ ? /* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M9 6l6 6-6 6", stroke: "currentColor", strokeWidth: "1.6" }) }) : /* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M15 6l-6 6 6 6", stroke: "currentColor", strokeWidth: "1.6" }) }) })
|
|
969
994
|
] }),
|
|
970
|
-
/* @__PURE__ */ e(
|
|
971
|
-
|
|
995
|
+
/* @__PURE__ */ e(ct, { children: /* @__PURE__ */ e(
|
|
996
|
+
dt,
|
|
972
997
|
{
|
|
973
|
-
ref:
|
|
974
|
-
children: /* @__PURE__ */ e(
|
|
998
|
+
ref: Z,
|
|
999
|
+
children: /* @__PURE__ */ e(ht, { $opacity: v, children: ee })
|
|
975
1000
|
}
|
|
976
1001
|
) }),
|
|
977
|
-
/* @__PURE__ */ e(
|
|
978
|
-
/* @__PURE__ */ e(
|
|
979
|
-
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: ((t.tocItems ??
|
|
980
|
-
|
|
1002
|
+
/* @__PURE__ */ e(pt, { children: /* @__PURE__ */ e(ut, { children: /* @__PURE__ */ f(gt, { $collapsed: U, children: [
|
|
1003
|
+
/* @__PURE__ */ e(fe, { children: "\u672C\u9875\u76EE\u5F55" }),
|
|
1004
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: ((t.tocItems ?? N) || []).map((a) => /* @__PURE__ */ e(
|
|
1005
|
+
Q,
|
|
981
1006
|
{
|
|
982
|
-
$active: (k ?
|
|
1007
|
+
$active: (k ? j : G) === a.id,
|
|
983
1008
|
onClick: () => {
|
|
984
|
-
|
|
1009
|
+
le(a.id), A == null || A(a);
|
|
985
1010
|
},
|
|
986
1011
|
title: a.label,
|
|
987
1012
|
style: { paddingLeft: Math.max(0, (a.level || 1) - 1) * 12 + 10 },
|
|
@@ -992,7 +1017,7 @@ const ue = l.div`
|
|
|
992
1017
|
] }) }) })
|
|
993
1018
|
] });
|
|
994
1019
|
})(),
|
|
995
|
-
|
|
1020
|
+
re && /* @__PURE__ */ e(
|
|
996
1021
|
"div",
|
|
997
1022
|
{
|
|
998
1023
|
role: "dialog",
|
|
@@ -1004,7 +1029,7 @@ const ue = l.div`
|
|
|
1004
1029
|
background: "rgba(0,0,0,0.45)",
|
|
1005
1030
|
display: "flex"
|
|
1006
1031
|
},
|
|
1007
|
-
onClick: () =>
|
|
1032
|
+
onClick: () => V(!1),
|
|
1008
1033
|
children: /* @__PURE__ */ f(
|
|
1009
1034
|
"div",
|
|
1010
1035
|
{
|
|
@@ -1021,25 +1046,25 @@ const ue = l.div`
|
|
|
1021
1046
|
children: [
|
|
1022
1047
|
/* @__PURE__ */ f("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 8 }, children: [
|
|
1023
1048
|
/* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: "\u76EE\u5F55" }),
|
|
1024
|
-
/* @__PURE__ */ e(
|
|
1049
|
+
/* @__PURE__ */ e(Q, { onClick: () => V(!1), children: "\u5173\u95ED" })
|
|
1025
1050
|
] }),
|
|
1026
1051
|
r && r.length > 0 && /* @__PURE__ */ e("div", { style: { overflow: "auto", height: "calc(100% - 40px)" }, children: Object.entries(
|
|
1027
|
-
r.reduce((n,
|
|
1028
|
-
const
|
|
1029
|
-
return n[
|
|
1052
|
+
r.reduce((n, h) => {
|
|
1053
|
+
const s = h.group || "\u6587\u6863";
|
|
1054
|
+
return n[s] = n[s] || [], n[s].push(h), n;
|
|
1030
1055
|
}, {})
|
|
1031
|
-
).map(([n,
|
|
1032
|
-
/* @__PURE__ */ e(
|
|
1033
|
-
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children:
|
|
1034
|
-
|
|
1056
|
+
).map(([n, h]) => /* @__PURE__ */ f("div", { children: [
|
|
1057
|
+
/* @__PURE__ */ e(fe, { children: n }),
|
|
1058
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 4, padding: "0 8px 8px 8px" }, children: h.map((s) => /* @__PURE__ */ e(
|
|
1059
|
+
Q,
|
|
1035
1060
|
{
|
|
1036
|
-
$active:
|
|
1061
|
+
$active: s.id === q,
|
|
1037
1062
|
onClick: () => {
|
|
1038
|
-
|
|
1063
|
+
s.href && (s.href.startsWith("#") ? le(s.href.slice(1)) : window.location.href = s.href), T == null || T(s), V(!1);
|
|
1039
1064
|
},
|
|
1040
|
-
children:
|
|
1065
|
+
children: s.label
|
|
1041
1066
|
},
|
|
1042
|
-
|
|
1067
|
+
s.id
|
|
1043
1068
|
)) })
|
|
1044
1069
|
] }, n)) })
|
|
1045
1070
|
]
|
|
@@ -1052,7 +1077,7 @@ const ue = l.div`
|
|
|
1052
1077
|
) });
|
|
1053
1078
|
};
|
|
1054
1079
|
export {
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1080
|
+
$t as DashboardContainer,
|
|
1081
|
+
Bt as DockContainer,
|
|
1082
|
+
Dt as DocumentContainer
|
|
1058
1083
|
};
|
package/lib_enter.d.ts
CHANGED