@arpproject/recrate 0.1.22 → 0.1.24
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.
|
@@ -20,6 +20,7 @@ export interface DescriboCrateBuilderProps {
|
|
|
20
20
|
language?: string;
|
|
21
21
|
resetTabOnEntityChange?: boolean;
|
|
22
22
|
resetTabOnProfileChange?: boolean;
|
|
23
|
+
stateScopeKey?: string;
|
|
23
24
|
onReady?: () => void;
|
|
24
25
|
onError?: (errors: any) => void;
|
|
25
26
|
onWarning?: (warnings: any) => void;
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
+
interface NavigationTabState {
|
|
2
|
+
scrollTop?: number;
|
|
3
|
+
expandedSections?: string[];
|
|
4
|
+
selectedItems?: string[];
|
|
5
|
+
}
|
|
6
|
+
interface NavigationState {
|
|
7
|
+
activeTab?: string;
|
|
8
|
+
tabStates?: Record<string, NavigationTabState>;
|
|
9
|
+
uiState?: Record<string, any>;
|
|
10
|
+
}
|
|
1
11
|
interface State {
|
|
2
12
|
id: string;
|
|
13
|
+
tab?: string;
|
|
14
|
+
navigationState?: NavigationState;
|
|
3
15
|
[key: string]: any;
|
|
4
16
|
}
|
|
17
|
+
interface EditorStateOptions {
|
|
18
|
+
scopeKey?: string;
|
|
19
|
+
persist?: boolean;
|
|
20
|
+
}
|
|
5
21
|
/**
|
|
6
22
|
* @class
|
|
7
23
|
*
|
|
@@ -13,10 +29,16 @@ interface State {
|
|
|
13
29
|
export declare class EditorState {
|
|
14
30
|
history: State[];
|
|
15
31
|
current: number;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
32
|
+
private readonly persistEnabled;
|
|
33
|
+
private readonly storageKey?;
|
|
34
|
+
constructor(options?: EditorStateOptions);
|
|
35
|
+
private normaliseScopeKey;
|
|
36
|
+
private hydrate;
|
|
37
|
+
private persist;
|
|
38
|
+
clearPersistedState(): void;
|
|
39
|
+
dispose(options?: {
|
|
40
|
+
clearPersistedState?: boolean;
|
|
41
|
+
}): void;
|
|
20
42
|
reset(): void;
|
|
21
43
|
/**
|
|
22
44
|
* Push a new state onto the history stack
|
|
@@ -47,6 +69,9 @@ export declare class EditorState {
|
|
|
47
69
|
* @param {Object} an object to be merged into the current entry
|
|
48
70
|
*/
|
|
49
71
|
update(newState: State): void;
|
|
72
|
+
updateNavigationState(navigationState: NavigationState): void;
|
|
73
|
+
getNavigationState(id?: string): NavigationState | undefined;
|
|
74
|
+
prune(validIds: Set<string>): void;
|
|
50
75
|
/**
|
|
51
76
|
* Delete a property from the current entry
|
|
52
77
|
*
|
|
@@ -5,8 +5,10 @@ interface Store {
|
|
|
5
5
|
editorState: EditorState;
|
|
6
6
|
setConfiguration: (config: Record<string, any>) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const createStateStore: (stateScopeKey?: string) => import('zustand').StoreApi<Store>;
|
|
9
|
+
export declare const StateStoreProvider: ({ children, stateScopeKey, }: {
|
|
9
10
|
children: ReactNode;
|
|
11
|
+
stateScopeKey?: string;
|
|
10
12
|
}) => React.FunctionComponentElement<React.ProviderProps<import('zustand').StoreApi<Store> | null>>;
|
|
11
13
|
export declare const useStateStore: () => Store;
|
|
12
14
|
export {};
|
package/dist/recrate.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
.el-tabs__item{height:unset}.el-select-dropdown__wrap{max-height:500px!important}.el-select-group__title{font-size:14px!important}.scrollbar{overflow:overlay}.scrollbar::-webkit-scrollbar{background-color:#0000;height:16px;width:16px;z-index:999999}.scrollbar::-webkit-scrollbar-track{background-color:#0000}.scrollbar::-webkit-scrollbar-thumb{background-color:#0000;border:0 solid #fff;border-radius:16px}.scrollbar::-webkit-scrollbar-button{display:none}.scrollbar:hover::-webkit-scrollbar-thumb{background-color:#a0a0a5;border:4px solid #fff}.scrollbar::-webkit-scrollbar-thumb:hover{background-color:#a0a0a5;border:4px solid #f4f4f4}.cm-editor{font-size:12px;height:auto;max-height:none}.describo-tab-icon{align-items:center;display:flex;font-size:14px;font-weight:600;height:100%;justify-content:center;width:100%}.describo-add-only-tabs .ant-tabs-nav,.describo-add-only-tabs .ant-tabs-nav-wrap{height:100%}.describo-add-only-tabs .ant-tabs-nav-list{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center}.describo-add-only-tabs .ant-tabs-tab{justify-content:center}.describo-tabs-vertical-center-add .ant-tabs-nav,.describo-tabs-vertical-center-add .ant-tabs-nav-wrap{height:100%}.describo-tabs-vertical-center-add .ant-tabs-nav-list{height:100%;position:relative}.describo-tabs-vertical-center-add .ant-tabs-tab-add-button{align-items:center;display:flex;justify-content:center;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.recrate,.recrate .recrate-ant{display:flex;flex-direction:column;height:100vh;min-height:100vh}.describo-editor-scroll,.recrate .ant-tabs-left .ant-tabs-nav,.recrate .ant-tabs-right .ant-tabs-nav{height:100%}.recrate .ant-tabs-bottom .ant-tabs-nav-wrap,.recrate .ant-tabs-top .ant-tabs-nav-wrap{overflow-x:auto}
|
|
2
|
-
/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme, base, components, utilities;@layer theme{:host,:root{--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-red-200:oklch(88.5% 0.062 18.334);--color-red-500:oklch(63.7% 0.237 25.331);--color-red-600:oklch(57.7% 0.245 27.325);--color-red-700:oklch(50.5% 0.213 27.518);--color-green-100:oklch(96.2% 0.044 156.743);--color-green-200:oklch(92.5% 0.084 155.995);--color-green-600:oklch(62.7% 0.194 149.214);--color-cyan-200:oklch(91.7% 0.08 205.041);--color-sky-100:oklch(95.1% 0.026 236.824);--color-sky-500:oklch(68.5% 0.169 237.323);--color-blue-100:oklch(93.2% 0.032 255.585);--color-blue-200:oklch(88.2% 0.059 254.128);--color-blue-300:oklch(80.9% 0.105 251.813);--color-blue-400:oklch(70.7% 0.165 254.624);--color-blue-500:oklch(62.3% 0.214 259.815);--color-blue-600:oklch(54.6% 0.245 262.881);--color-blue-700:oklch(48.8% 0.243 264.376);--color-indigo-200:oklch(87% 0.065 274.039);--color-purple-200:oklch(90.2% 0.063 306.703);--color-slate-200:oklch(92.9% 0.013 255.508);--color-slate-300:oklch(86.9% 0.022 252.894);--color-slate-700:oklch(37.2% 0.044 257.287);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-black:#000;--color-white:#fff;--spacing:0.25rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--text-lg:1.125rem;--text-lg--line-height:1.55556;--font-weight-light:300;--font-weight-medium:500;--font-weight-bold:700;--radius-lg:0.5rem;--animate-pulse:pulse 2s cubic-bezier(0.4,0,0.6,1) infinite;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;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);tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{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-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:initial}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:initial;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}: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}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,#0000)}}}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,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing)*0)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.left-0{left:calc(var(--spacing)*0)}.z-50{z-index:50}.float-right{float:right}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.m-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.m-4{margin:calc(var(--spacing)*4)}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-2{margin-left:calc(var(--spacing)*2)}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-cell{display:table-cell}.h-1{height:calc(var(--spacing)*1)}.h-3{height:calc(var(--spacing)*3)}.h-8{height:calc(var(--spacing)*8)}.h-\[520px\]{height:520px}.h-full{height:100%}.min-h-0{min-height:calc(var(--spacing)*0)}.w-1{width:calc(var(--spacing)*1)}.w-1\/2{width:50%}.w-1\/3{width:33.33333%}.w-2\/3{width:66.66667%}.w-2\/6{width:33.33333%}.w-3{width:calc(var(--spacing)*3)}.w-4\/6{width:66.66667%}.w-6{width:calc(var(--spacing)*6)}.w-12{width:calc(var(--spacing)*12)}.w-\[600px\]{width:600px}.w-full{width:100%}.w-screen{width:100vw}.max-w-\[715px\]{max-width:715px}.min-w-32{min-width:calc(var(--spacing)*32)}.flex-1{flex:1}.flex-grow{flex-grow:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-content-between{place-content:space-between}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.space-y-1{:where(&>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*1*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*1*var(--tw-space-y-reverse))}}.space-y-2{:where(&>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*2*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*2*var(--tw-space-y-reverse))}}.space-y-3{:where(&>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*3*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*3*var(--tw-space-y-reverse))}}.space-y-4{:where(&>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*4*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*4*var(--tw-space-y-reverse))}}.gap-x-1{column-gap:calc(var(--spacing)*1)}.gap-x-2{column-gap:calc(var(--spacing)*2)}.space-x-1{:where(&>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*1*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*1*var(--tw-space-x-reverse))}}.space-x-2{:where(&>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*2*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*2*var(--tw-space-x-reverse))}}.space-x-4{:where(&>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*4*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*4*var(--tw-space-x-reverse))}}.gap-y-2{row-gap:calc(var(--spacing)*2)}.divide-y{:where(&>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-bottom-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse))}}.divide-gray-300{:where(&>:not(:last-child)){border-color:var(--color-gray-300)}}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-solid{--tw-border-style:solid;border-style:solid}.border-black{border-color:var(--color-black)}.border-black\/20{border-color:color-mix(in srgb,#000 20%,#0000);@supports (color:color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-black) 20%,#0000)}}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-700{border-color:var(--color-gray-700)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-700{border-color:var(--color-slate-700)}.bg-blue-200{background-color:var(--color-blue-200)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-200{background-color:var(--color-green-200)}.bg-indigo-200{background-color:var(--color-indigo-200)}.bg-purple-200{background-color:var(--color-purple-200)}.bg-red-200{background-color:var(--color-red-200)}.bg-red-500{background-color:var(--color-red-500)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-700{background-color:var(--color-slate-700)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pr-1{padding-right:calc(var(--spacing)*1)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-balance{text-wrap:balance}.text-nowrap{text-wrap:nowrap}.break-words{overflow-wrap:break-word}.whitespace-normal{white-space:normal}.whitespace-pre-wrap{white-space:pre-wrap}.text-black{color:var(--color-black)}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-600{color:var(--color-green-600)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-50{opacity:50%}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px)}.blur,.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,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));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-colors{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-transform{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-1000{--tw-duration:1000ms;transition-duration:1s}.group-hover\:opacity-100{&:is(:where(.group):hover *){@media (hover:hover){opacity:100%}}}.hover\:scale-105{&:hover{@media (hover:hover){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.hover\:rounded{&:hover{@media (hover:hover){border-radius:.25rem}}}.hover\:rounded-r-none{&:hover{@media (hover:hover){border-bottom-right-radius:0;border-top-right-radius:0}}}.hover\:bg-blue-100{&:hover{@media (hover:hover){background-color:var(--color-blue-100)}}}.hover\:bg-blue-300{&:hover{@media (hover:hover){background-color:var(--color-blue-300)}}}.hover\:bg-blue-700{&:hover{@media (hover:hover){background-color:var(--color-blue-700)}}}.hover\:bg-cyan-200{&:hover{@media (hover:hover){background-color:var(--color-cyan-200)}}}.hover\:bg-green-200{&:hover{@media (hover:hover){background-color:var(--color-green-200)}}}.hover\:bg-red-700{&:hover{@media (hover:hover){background-color:var(--color-red-700)}}}.hover\:bg-sky-100{&:hover{@media (hover:hover){background-color:var(--color-sky-100)}}}.hover\:text-black{&:hover{@media (hover:hover){color:var(--color-black)}}}.focus\:border-2{&:focus{border-style:var(--tw-border-style);border-width:2px}}.focus\:border-green-600{&:focus{border-color:var(--color-green-600)}}.focus\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.focus-visible\:ring-2{&:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + 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)}}.focus-visible\:ring-sky-500{&:focus-visible{--tw-ring-color:var(--color-sky-500)}}.focus-visible\:outline-none{&:focus-visible{--tw-outline-style:none;outline-style:none}}.active\:bg-blue-400{&:active{background-color:var(--color-blue-400)}}.xl\:w-1\/5{@media (width >= 80rem){width:20%}}.xl\:w-4\/5{@media (width >= 80rem){width:80%}}}@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-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@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-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@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}@keyframes pulse{50%{opacity:.5}}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--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-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--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}}}
|
|
2
|
+
/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer theme, base, components, utilities;@layer theme{:host,:root{--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-red-200:oklch(88.5% 0.062 18.334);--color-red-500:oklch(63.7% 0.237 25.331);--color-red-600:oklch(57.7% 0.245 27.325);--color-red-700:oklch(50.5% 0.213 27.518);--color-green-100:oklch(96.2% 0.044 156.743);--color-green-200:oklch(92.5% 0.084 155.995);--color-green-600:oklch(62.7% 0.194 149.214);--color-cyan-200:oklch(91.7% 0.08 205.041);--color-sky-100:oklch(95.1% 0.026 236.824);--color-sky-500:oklch(68.5% 0.169 237.323);--color-blue-100:oklch(93.2% 0.032 255.585);--color-blue-200:oklch(88.2% 0.059 254.128);--color-blue-300:oklch(80.9% 0.105 251.813);--color-blue-400:oklch(70.7% 0.165 254.624);--color-blue-500:oklch(62.3% 0.214 259.815);--color-blue-600:oklch(54.6% 0.245 262.881);--color-blue-700:oklch(48.8% 0.243 264.376);--color-indigo-200:oklch(87% 0.065 274.039);--color-purple-200:oklch(90.2% 0.063 306.703);--color-slate-200:oklch(92.9% 0.013 255.508);--color-slate-300:oklch(86.9% 0.022 252.894);--color-slate-700:oklch(37.2% 0.044 257.287);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-200:oklch(92.8% 0.006 264.531);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-400:oklch(70.7% 0.022 261.325);--color-gray-500:oklch(55.1% 0.027 264.364);--color-gray-600:oklch(44.6% 0.03 256.802);--color-gray-700:oklch(37.3% 0.034 259.733);--color-gray-800:oklch(27.8% 0.033 256.848);--color-black:#000;--color-white:#fff;--spacing:0.25rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--text-lg:1.125rem;--text-lg--line-height:1.55556;--font-weight-light:300;--font-weight-medium:500;--font-weight-bold:700;--radius-lg:0.5rem;--animate-pulse:pulse 2s cubic-bezier(0.4,0,0.6,1) infinite;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;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);tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{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-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:initial}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{background-color:initial;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}: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}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,#0000)}}}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,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing)*0)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.left-0{left:calc(var(--spacing)*0)}.isolate{isolation:isolate}.z-50{z-index:50}.float-right{float:right}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.m-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.m-4{margin:calc(var(--spacing)*4)}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-2{margin-left:calc(var(--spacing)*2)}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-cell{display:table-cell}.h-1{height:calc(var(--spacing)*1)}.h-3{height:calc(var(--spacing)*3)}.h-8{height:calc(var(--spacing)*8)}.h-\[520px\]{height:520px}.h-full{height:100%}.min-h-0{min-height:calc(var(--spacing)*0)}.w-1{width:calc(var(--spacing)*1)}.w-1\/2{width:50%}.w-1\/3{width:33.33333%}.w-2\/3{width:66.66667%}.w-2\/6{width:33.33333%}.w-3{width:calc(var(--spacing)*3)}.w-4\/6{width:66.66667%}.w-6{width:calc(var(--spacing)*6)}.w-12{width:calc(var(--spacing)*12)}.w-\[600px\]{width:600px}.w-full{width:100%}.w-screen{width:100vw}.max-w-\[715px\]{max-width:715px}.min-w-32{min-width:calc(var(--spacing)*32)}.flex-1{flex:1}.flex-grow{flex-grow:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-content-between{place-content:space-between}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.space-y-1{:where(&>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*1*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*1*var(--tw-space-y-reverse))}}.space-y-2{:where(&>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*2*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*2*var(--tw-space-y-reverse))}}.space-y-3{:where(&>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*3*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*3*var(--tw-space-y-reverse))}}.space-y-4{:where(&>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*4*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*4*var(--tw-space-y-reverse))}}.gap-x-1{column-gap:calc(var(--spacing)*1)}.gap-x-2{column-gap:calc(var(--spacing)*2)}.space-x-1{:where(&>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*1*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*1*var(--tw-space-x-reverse))}}.space-x-2{:where(&>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*2*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*2*var(--tw-space-x-reverse))}}.space-x-4{:where(&>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*4*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*4*var(--tw-space-x-reverse))}}.gap-y-2{row-gap:calc(var(--spacing)*2)}.divide-y{:where(&>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-bottom-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse))}}.divide-gray-300{:where(&>:not(:last-child)){border-color:var(--color-gray-300)}}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-solid{--tw-border-style:solid;border-style:solid}.border-black{border-color:var(--color-black)}.border-black\/20{border-color:color-mix(in srgb,#000 20%,#0000);@supports (color:color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-black) 20%,#0000)}}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-700{border-color:var(--color-gray-700)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-700{border-color:var(--color-slate-700)}.bg-blue-200{background-color:var(--color-blue-200)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-200{background-color:var(--color-green-200)}.bg-indigo-200{background-color:var(--color-indigo-200)}.bg-purple-200{background-color:var(--color-purple-200)}.bg-red-200{background-color:var(--color-red-200)}.bg-red-500{background-color:var(--color-red-500)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-700{background-color:var(--color-slate-700)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pr-1{padding-right:calc(var(--spacing)*1)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-balance{text-wrap:balance}.text-nowrap{text-wrap:nowrap}.break-words{overflow-wrap:break-word}.whitespace-normal{white-space:normal}.whitespace-pre-wrap{white-space:pre-wrap}.text-black{color:var(--color-black)}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-600{color:var(--color-green-600)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-50{opacity:50%}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px)}.blur,.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,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));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-colors{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-transform{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-1000{--tw-duration:1000ms;transition-duration:1s}.group-hover\:opacity-100{&:is(:where(.group):hover *){@media (hover:hover){opacity:100%}}}.hover\:scale-105{&:hover{@media (hover:hover){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.hover\:rounded{&:hover{@media (hover:hover){border-radius:.25rem}}}.hover\:rounded-r-none{&:hover{@media (hover:hover){border-bottom-right-radius:0;border-top-right-radius:0}}}.hover\:bg-blue-100{&:hover{@media (hover:hover){background-color:var(--color-blue-100)}}}.hover\:bg-blue-300{&:hover{@media (hover:hover){background-color:var(--color-blue-300)}}}.hover\:bg-blue-700{&:hover{@media (hover:hover){background-color:var(--color-blue-700)}}}.hover\:bg-cyan-200{&:hover{@media (hover:hover){background-color:var(--color-cyan-200)}}}.hover\:bg-green-200{&:hover{@media (hover:hover){background-color:var(--color-green-200)}}}.hover\:bg-red-700{&:hover{@media (hover:hover){background-color:var(--color-red-700)}}}.hover\:bg-sky-100{&:hover{@media (hover:hover){background-color:var(--color-sky-100)}}}.hover\:text-black{&:hover{@media (hover:hover){color:var(--color-black)}}}.focus\:border-2{&:focus{border-style:var(--tw-border-style);border-width:2px}}.focus\:border-green-600{&:focus{border-color:var(--color-green-600)}}.focus\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.focus-visible\:ring-2{&:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + 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)}}.focus-visible\:ring-sky-500{&:focus-visible{--tw-ring-color:var(--color-sky-500)}}.focus-visible\:outline-none{&:focus-visible{--tw-outline-style:none;outline-style:none}}.active\:bg-blue-400{&:active{background-color:var(--color-blue-400)}}.xl\:w-1\/5{@media (width >= 80rem){width:20%}}.xl\:w-4\/5{@media (width >= 80rem){width:80%}}}@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-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@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-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@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}@keyframes pulse{50%{opacity:.5}}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--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-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--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}}}
|
|
3
3
|
.recrate{all:revert-layer}
|
package/dist/recrate.es.js
CHANGED
|
@@ -67349,17 +67349,57 @@ function useStore(api2, selector = identity) {
|
|
|
67349
67349
|
React__default.useDebugValue(slice2);
|
|
67350
67350
|
return slice2;
|
|
67351
67351
|
}
|
|
67352
|
+
const STORAGE_KEY_PREFIX = "recrate.editor-state.v1";
|
|
67352
67353
|
let EditorState$1 = class EditorState {
|
|
67353
|
-
constructor() {
|
|
67354
|
-
this.
|
|
67355
|
-
this.
|
|
67354
|
+
constructor(options = {}) {
|
|
67355
|
+
this.persistEnabled = options.persist !== false;
|
|
67356
|
+
this.storageKey = this.persistEnabled ? `${STORAGE_KEY_PREFIX}:${this.normaliseScopeKey(options.scopeKey)}` : void 0;
|
|
67357
|
+
const hydrated = this.hydrate();
|
|
67358
|
+
this.history = (hydrated == null ? void 0 : hydrated.history) ?? [];
|
|
67359
|
+
this.current = (hydrated == null ? void 0 : hydrated.current) ?? 0;
|
|
67360
|
+
}
|
|
67361
|
+
normaliseScopeKey(scopeKey) {
|
|
67362
|
+
const trimmed = typeof scopeKey === "string" ? scopeKey.trim() : "";
|
|
67363
|
+
return trimmed || "default";
|
|
67364
|
+
}
|
|
67365
|
+
hydrate() {
|
|
67366
|
+
if (typeof window === "undefined" || !this.storageKey) return null;
|
|
67367
|
+
try {
|
|
67368
|
+
const raw = window.sessionStorage.getItem(this.storageKey);
|
|
67369
|
+
if (!raw) return null;
|
|
67370
|
+
const data = JSON.parse(raw);
|
|
67371
|
+
if (!Array.isArray(data == null ? void 0 : data.history)) return null;
|
|
67372
|
+
return {
|
|
67373
|
+
history: data.history,
|
|
67374
|
+
current: Math.max(0, Math.min(Number(data.current) || 0, data.history.length - 1))
|
|
67375
|
+
};
|
|
67376
|
+
} catch {
|
|
67377
|
+
return null;
|
|
67378
|
+
}
|
|
67379
|
+
}
|
|
67380
|
+
persist() {
|
|
67381
|
+
if (typeof window === "undefined" || !this.storageKey) return;
|
|
67382
|
+
try {
|
|
67383
|
+
window.sessionStorage.setItem(this.storageKey, JSON.stringify({ history: this.history, current: this.current }));
|
|
67384
|
+
} catch {
|
|
67385
|
+
}
|
|
67386
|
+
}
|
|
67387
|
+
clearPersistedState() {
|
|
67388
|
+
if (typeof window === "undefined" || !this.storageKey) return;
|
|
67389
|
+
try {
|
|
67390
|
+
window.sessionStorage.removeItem(this.storageKey);
|
|
67391
|
+
} catch {
|
|
67392
|
+
}
|
|
67393
|
+
}
|
|
67394
|
+
dispose(options = {}) {
|
|
67395
|
+
if (options.clearPersistedState) {
|
|
67396
|
+
this.clearPersistedState();
|
|
67397
|
+
}
|
|
67356
67398
|
}
|
|
67357
|
-
/**
|
|
67358
|
-
* Reset the internal state
|
|
67359
|
-
*/
|
|
67360
67399
|
reset() {
|
|
67361
67400
|
this.history = [];
|
|
67362
67401
|
this.current = 0;
|
|
67402
|
+
this.persist();
|
|
67363
67403
|
}
|
|
67364
67404
|
/**
|
|
67365
67405
|
* Push a new state onto the history stack
|
|
@@ -67378,6 +67418,7 @@ let EditorState$1 = class EditorState {
|
|
|
67378
67418
|
}
|
|
67379
67419
|
this.history = [...this.history, { id: id2 }];
|
|
67380
67420
|
this.current = this.history.length - 1;
|
|
67421
|
+
this.persist();
|
|
67381
67422
|
}
|
|
67382
67423
|
/**
|
|
67383
67424
|
* Go back through the state
|
|
@@ -67385,6 +67426,7 @@ let EditorState$1 = class EditorState {
|
|
|
67385
67426
|
back() {
|
|
67386
67427
|
if (this.current === 0) return;
|
|
67387
67428
|
this.current -= 1;
|
|
67429
|
+
this.persist();
|
|
67388
67430
|
}
|
|
67389
67431
|
/**
|
|
67390
67432
|
* Go forward through the state
|
|
@@ -67392,6 +67434,7 @@ let EditorState$1 = class EditorState {
|
|
|
67392
67434
|
forward() {
|
|
67393
67435
|
if (this.current === this.history.length - 1) return;
|
|
67394
67436
|
this.current += 1;
|
|
67437
|
+
this.persist();
|
|
67395
67438
|
}
|
|
67396
67439
|
/**
|
|
67397
67440
|
* Return the current entry
|
|
@@ -67412,6 +67455,44 @@ let EditorState$1 = class EditorState {
|
|
|
67412
67455
|
*/
|
|
67413
67456
|
update(newState) {
|
|
67414
67457
|
this.history[this.current] = { ...this.history[this.current], ...newState };
|
|
67458
|
+
this.persist();
|
|
67459
|
+
}
|
|
67460
|
+
updateNavigationState(navigationState) {
|
|
67461
|
+
var _a2, _b;
|
|
67462
|
+
const latest = this.latest();
|
|
67463
|
+
if (!latest) return;
|
|
67464
|
+
this.update({
|
|
67465
|
+
...latest,
|
|
67466
|
+
navigationState: {
|
|
67467
|
+
...latest.navigationState ?? {},
|
|
67468
|
+
...navigationState,
|
|
67469
|
+
tabStates: {
|
|
67470
|
+
...((_a2 = latest.navigationState) == null ? void 0 : _a2.tabStates) ?? {},
|
|
67471
|
+
...navigationState.tabStates ?? {}
|
|
67472
|
+
},
|
|
67473
|
+
uiState: {
|
|
67474
|
+
...((_b = latest.navigationState) == null ? void 0 : _b.uiState) ?? {},
|
|
67475
|
+
...navigationState.uiState ?? {}
|
|
67476
|
+
}
|
|
67477
|
+
}
|
|
67478
|
+
});
|
|
67479
|
+
}
|
|
67480
|
+
getNavigationState(id2) {
|
|
67481
|
+
var _a2;
|
|
67482
|
+
if (!id2) {
|
|
67483
|
+
return (_a2 = this.latest()) == null ? void 0 : _a2.navigationState;
|
|
67484
|
+
}
|
|
67485
|
+
for (let i = this.history.length - 1; i >= 0; i -= 1) {
|
|
67486
|
+
const entry = this.history[i];
|
|
67487
|
+
if ((entry == null ? void 0 : entry.id) !== id2) continue;
|
|
67488
|
+
if (entry.navigationState) return entry.navigationState;
|
|
67489
|
+
}
|
|
67490
|
+
return void 0;
|
|
67491
|
+
}
|
|
67492
|
+
prune(validIds) {
|
|
67493
|
+
this.history = this.history.filter((entry) => validIds.has(entry.id));
|
|
67494
|
+
this.current = this.history.length === 0 ? 0 : Math.min(this.current, this.history.length - 1);
|
|
67495
|
+
this.persist();
|
|
67415
67496
|
}
|
|
67416
67497
|
/**
|
|
67417
67498
|
* Delete a property from the current entry
|
|
@@ -67421,6 +67502,7 @@ let EditorState$1 = class EditorState {
|
|
|
67421
67502
|
*/
|
|
67422
67503
|
deleteFromState({ property }) {
|
|
67423
67504
|
delete this.history[this.current][property];
|
|
67505
|
+
this.persist();
|
|
67424
67506
|
}
|
|
67425
67507
|
/**
|
|
67426
67508
|
* Replace an id in the state
|
|
@@ -67435,30 +67517,30 @@ let EditorState$1 = class EditorState {
|
|
|
67435
67517
|
replaceId({ id: id2, newId }) {
|
|
67436
67518
|
this.history = this.history.slice(0, -1);
|
|
67437
67519
|
this.current = this.history.length - 1;
|
|
67438
|
-
this.history = this.history.map((e3
|
|
67439
|
-
|
|
67440
|
-
return { ...e3, id: newId };
|
|
67441
|
-
} else {
|
|
67442
|
-
return e3;
|
|
67443
|
-
}
|
|
67444
|
-
});
|
|
67520
|
+
this.history = this.history.map((e3) => e3.id === id2 ? { ...e3, id: newId } : e3);
|
|
67521
|
+
this.persist();
|
|
67445
67522
|
}
|
|
67446
67523
|
};
|
|
67447
|
-
const createStateStore = () => createStore((set2) => ({
|
|
67524
|
+
const createStateStore = (stateScopeKey) => createStore((set2) => ({
|
|
67448
67525
|
configuration: {},
|
|
67449
|
-
editorState: new EditorState$1(),
|
|
67526
|
+
editorState: new EditorState$1({ scopeKey: stateScopeKey }),
|
|
67450
67527
|
setConfiguration: (config2) => set2({ configuration: config2 })
|
|
67451
67528
|
}));
|
|
67452
|
-
const defaultStore = createStateStore();
|
|
67529
|
+
const defaultStore = createStateStore("default");
|
|
67453
67530
|
const StateStoreContext = createContext(null);
|
|
67454
|
-
const StateStoreProvider = ({
|
|
67455
|
-
|
|
67456
|
-
|
|
67457
|
-
|
|
67458
|
-
|
|
67531
|
+
const StateStoreProvider = ({
|
|
67532
|
+
children,
|
|
67533
|
+
stateScopeKey
|
|
67534
|
+
}) => {
|
|
67535
|
+
const store = useMemo$1(() => createStateStore(stateScopeKey), [stateScopeKey]);
|
|
67536
|
+
useEffect(() => {
|
|
67537
|
+
return () => {
|
|
67538
|
+
store.getState().editorState.dispose();
|
|
67539
|
+
};
|
|
67540
|
+
}, [store]);
|
|
67459
67541
|
return React__default.createElement(
|
|
67460
67542
|
StateStoreContext.Provider,
|
|
67461
|
-
{ value:
|
|
67543
|
+
{ value: store },
|
|
67462
67544
|
children
|
|
67463
67545
|
);
|
|
67464
67546
|
};
|
|
@@ -106637,6 +106719,7 @@ const RenderControls = ({
|
|
|
106637
106719
|
var _a2, _b, _c, _d, _e2, _f;
|
|
106638
106720
|
const { t: t2 } = useTranslation();
|
|
106639
106721
|
const state = useStateStore();
|
|
106722
|
+
const debugNav = (...args) => console.log("[recrate-nav-debug][controls]", ...args);
|
|
106640
106723
|
const [dialogs, setDialogs] = useState({
|
|
106641
106724
|
previewCrate: false,
|
|
106642
106725
|
editContext: false,
|
|
@@ -106666,17 +106749,25 @@ const RenderControls = ({
|
|
|
106666
106749
|
const canGoForward = state.editorState.canForward();
|
|
106667
106750
|
const handleBack = () => {
|
|
106668
106751
|
if (!canGoBack) return;
|
|
106752
|
+
const before = state.editorState.latest();
|
|
106753
|
+
debugNav("back.click", { currentEntity: entity["@id"], before });
|
|
106669
106754
|
onBack();
|
|
106670
106755
|
const latest = state.editorState.latest();
|
|
106756
|
+
debugNav("back.afterPointerMove", { latest });
|
|
106671
106757
|
if (latest == null ? void 0 : latest.id) {
|
|
106758
|
+
debugNav("back.loadEntity", { id: latest.id, updateState: false });
|
|
106672
106759
|
onLoadEntity({ id: latest.id, updateState: false });
|
|
106673
106760
|
}
|
|
106674
106761
|
};
|
|
106675
106762
|
const handleForward = () => {
|
|
106676
106763
|
if (!canGoForward) return;
|
|
106764
|
+
const before = state.editorState.latest();
|
|
106765
|
+
debugNav("forward.click", { currentEntity: entity["@id"], before });
|
|
106677
106766
|
onForward();
|
|
106678
106767
|
const latest = state.editorState.latest();
|
|
106768
|
+
debugNav("forward.afterPointerMove", { latest });
|
|
106679
106769
|
if (latest == null ? void 0 : latest.id) {
|
|
106770
|
+
debugNav("forward.loadEntity", { id: latest.id, updateState: false });
|
|
106680
106771
|
onLoadEntity({ id: latest.id, updateState: false });
|
|
106681
106772
|
}
|
|
106682
106773
|
};
|
|
@@ -110558,9 +110649,40 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110558
110649
|
localStorage.setItem("recrate.verticalTabWidth", String(clamped));
|
|
110559
110650
|
}, 200), [iconView]);
|
|
110560
110651
|
const [scrollViewportHeight, setScrollViewportHeight] = useState(0);
|
|
110652
|
+
const [scrollRestoreNonce, setScrollRestoreNonce] = useState(0);
|
|
110561
110653
|
const contentContainerRef = useRef(null);
|
|
110562
110654
|
const activeContentRef = useRef(null);
|
|
110563
110655
|
const editorPanelRef = useRef(null);
|
|
110656
|
+
const navigationRestoreReadyRef = useRef(false);
|
|
110657
|
+
const pendingRestoredTabRef = useRef(null);
|
|
110658
|
+
const getVisibleContextMarkers = (selector, dataAttribute) => {
|
|
110659
|
+
const source = activeContentRef.current;
|
|
110660
|
+
if (!source) return [];
|
|
110661
|
+
return Array.from(source.querySelectorAll(selector)).map((node2) => node2.getAttribute(dataAttribute)).filter((value) => Boolean(value));
|
|
110662
|
+
};
|
|
110663
|
+
const captureViewContext = (tabName = activeTab, explicitScrollTop) => {
|
|
110664
|
+
var _a3, _b2, _c2, _d2;
|
|
110665
|
+
const entityId = contextEntity == null ? void 0 : contextEntity["@id"];
|
|
110666
|
+
if (!entityId || ((_a3 = state.editorState.latest()) == null ? void 0 : _a3.id) !== entityId) return;
|
|
110667
|
+
const previous = state.editorState.getNavigationState(entityId) ?? {};
|
|
110668
|
+
const scrollTop = typeof explicitScrollTop === "number" ? explicitScrollTop : ((_b2 = activeContentRef.current) == null ? void 0 : _b2.scrollTop) ?? ((_d2 = (_c2 = previous.tabStates) == null ? void 0 : _c2[tabName]) == null ? void 0 : _d2.scrollTop) ?? 0;
|
|
110669
|
+
const nextTabState = {
|
|
110670
|
+
scrollTop,
|
|
110671
|
+
expandedSections: getVisibleContextMarkers('[aria-expanded="true"],[data-expanded="true"]', "data-section-id"),
|
|
110672
|
+
selectedItems: getVisibleContextMarkers('[aria-selected="true"],[data-selected="true"]', "data-item-id")
|
|
110673
|
+
};
|
|
110674
|
+
state.editorState.updateNavigationState({
|
|
110675
|
+
activeTab: tabName,
|
|
110676
|
+
tabStates: { [tabName]: nextTabState },
|
|
110677
|
+
uiState: {
|
|
110678
|
+
showAddPanel,
|
|
110679
|
+
reverseSidebarVisible,
|
|
110680
|
+
highlightRequiredProperties,
|
|
110681
|
+
iconView,
|
|
110682
|
+
tabPaneWidth
|
|
110683
|
+
}
|
|
110684
|
+
});
|
|
110685
|
+
};
|
|
110564
110686
|
const computeScrollViewportHeight = useMemo$1(() => debounce(() => {
|
|
110565
110687
|
var _a3, _b2;
|
|
110566
110688
|
const containerRect = (_a3 = contentContainerRef.current) == null ? void 0 : _a3.getBoundingClientRect();
|
|
@@ -110615,6 +110737,10 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110615
110737
|
}
|
|
110616
110738
|
}));
|
|
110617
110739
|
useEffect(() => {
|
|
110740
|
+
navigationRestoreReadyRef.current = false;
|
|
110741
|
+
if ((contextEntity == null ? void 0 : contextEntity["@id"]) && (entity == null ? void 0 : entity["@id"]) && contextEntity["@id"] !== entity["@id"]) {
|
|
110742
|
+
captureViewContext(activeTab);
|
|
110743
|
+
}
|
|
110618
110744
|
setExtraProperties([]);
|
|
110619
110745
|
init2({ entity });
|
|
110620
110746
|
}, [entity]);
|
|
@@ -110625,10 +110751,10 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110625
110751
|
}
|
|
110626
110752
|
}, [profileManager == null ? void 0 : profileManager.$key]);
|
|
110627
110753
|
const init2 = ({ entity: entity2 }) => {
|
|
110754
|
+
var _a3, _b2, _c2, _d2, _e3;
|
|
110628
110755
|
if (!entity2["@id"]) return;
|
|
110629
|
-
|
|
110630
|
-
|
|
110631
|
-
}
|
|
110756
|
+
const latestEntry = state.editorState.latest();
|
|
110757
|
+
const isCurrentHistoryEntity = (latestEntry == null ? void 0 : latestEntry.id) === entity2["@id"];
|
|
110632
110758
|
const layout = applyLayout({
|
|
110633
110759
|
configuration: state.configuration,
|
|
110634
110760
|
profileManager,
|
|
@@ -110639,24 +110765,102 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110639
110765
|
setRenderTabs(layout.renderTabs);
|
|
110640
110766
|
setMissingRequiredData(layout.missingRequiredData);
|
|
110641
110767
|
setTabs(layout.tabs);
|
|
110642
|
-
|
|
110643
|
-
|
|
110644
|
-
|
|
110645
|
-
|
|
110768
|
+
const navState = isCurrentHistoryEntity ? latestEntry == null ? void 0 : latestEntry.navigationState : state.editorState.getNavigationState(entity2["@id"]);
|
|
110769
|
+
const tabNames = layout.tabs.map((tab) => tab.name);
|
|
110770
|
+
const fallbackTab = tabNames.includes("about") ? "about" : tabNames[0] ?? "about";
|
|
110771
|
+
const restoredTab = layout.renderTabs && (navState == null ? void 0 : navState.activeTab) && tabNames.includes(navState.activeTab) ? navState.activeTab : fallbackTab;
|
|
110772
|
+
pendingRestoredTabRef.current = restoredTab;
|
|
110773
|
+
setActiveTab(restoredTab);
|
|
110774
|
+
if (typeof ((_a3 = navState == null ? void 0 : navState.uiState) == null ? void 0 : _a3.showAddPanel) === "boolean") setShowAddPanel(navState.uiState.showAddPanel);
|
|
110775
|
+
if (typeof ((_b2 = navState == null ? void 0 : navState.uiState) == null ? void 0 : _b2.reverseSidebarVisible) === "boolean") setReverseSidebarVisible(navState.uiState.reverseSidebarVisible);
|
|
110776
|
+
if (typeof ((_c2 = navState == null ? void 0 : navState.uiState) == null ? void 0 : _c2.highlightRequiredProperties) === "boolean") setHighlightRequiredProperties(navState.uiState.highlightRequiredProperties);
|
|
110777
|
+
if (typeof ((_d2 = navState == null ? void 0 : navState.uiState) == null ? void 0 : _d2.iconView) === "boolean") setIconView(navState.uiState.iconView);
|
|
110778
|
+
if (typeof ((_e3 = navState == null ? void 0 : navState.uiState) == null ? void 0 : _e3.tabPaneWidth) === "number") setTabPaneWidth(navState.uiState.tabPaneWidth);
|
|
110779
|
+
if (isCurrentHistoryEntity) {
|
|
110780
|
+
if (layout.renderTabs) {
|
|
110781
|
+
state.editorState.update({ id: entity2["@id"], tab: restoredTab });
|
|
110782
|
+
} else {
|
|
110783
|
+
state.editorState.deleteFromState({ property: "tab" });
|
|
110784
|
+
}
|
|
110646
110785
|
}
|
|
110647
110786
|
};
|
|
110648
110787
|
const refresh = () => {
|
|
110649
110788
|
const entityObj = crateManager.getEntity({ id: entity["@id"], link: false, materialise: false });
|
|
110650
110789
|
init2({ entity: entityObj });
|
|
110651
110790
|
};
|
|
110791
|
+
const handleLoadEntityWithContext = (params) => {
|
|
110792
|
+
captureViewContext(activeTab);
|
|
110793
|
+
onLoadEntity(params);
|
|
110794
|
+
};
|
|
110652
110795
|
const saveTabToState = (tabName) => {
|
|
110653
|
-
|
|
110796
|
+
var _a3;
|
|
110797
|
+
const activeEntityId = contextEntity == null ? void 0 : contextEntity["@id"];
|
|
110798
|
+
const latestId = (_a3 = state.editorState.latest()) == null ? void 0 : _a3.id;
|
|
110799
|
+
if (!activeEntityId || latestId !== activeEntityId) {
|
|
110800
|
+
return;
|
|
110801
|
+
}
|
|
110802
|
+
state.editorState.update({ id: activeEntityId, tab: tabName });
|
|
110803
|
+
state.editorState.updateNavigationState({ activeTab: tabName });
|
|
110654
110804
|
};
|
|
110655
110805
|
useEffect(() => {
|
|
110656
110806
|
if (entity == null ? void 0 : entity["@id"]) {
|
|
110657
110807
|
refresh();
|
|
110658
110808
|
}
|
|
110659
110809
|
}, [extraProperties]);
|
|
110810
|
+
useEffect(() => {
|
|
110811
|
+
var _a3, _b2, _c2;
|
|
110812
|
+
if (!navigationRestoreReadyRef.current) return;
|
|
110813
|
+
if (!(contextEntity == null ? void 0 : contextEntity["@id"])) return;
|
|
110814
|
+
const viewport = activeContentRef.current;
|
|
110815
|
+
if (!viewport) return;
|
|
110816
|
+
const restoreTarget = ((_c2 = (_b2 = (_a3 = state.editorState.getNavigationState(contextEntity["@id"])) == null ? void 0 : _a3.tabStates) == null ? void 0 : _b2[activeTab]) == null ? void 0 : _c2.scrollTop) ?? 0;
|
|
110817
|
+
let cancelled = false;
|
|
110818
|
+
let rafId = 0;
|
|
110819
|
+
let timerId = 0;
|
|
110820
|
+
let attempts = 0;
|
|
110821
|
+
const maxAttempts = 12;
|
|
110822
|
+
const attemptRestore = () => {
|
|
110823
|
+
if (cancelled) return;
|
|
110824
|
+
attempts += 1;
|
|
110825
|
+
const maxScrollable = Math.max(0, viewport.scrollHeight - viewport.clientHeight);
|
|
110826
|
+
const target = Math.min(restoreTarget, maxScrollable);
|
|
110827
|
+
viewport.scrollTop = target;
|
|
110828
|
+
const done = Math.abs(viewport.scrollTop - target) <= 1;
|
|
110829
|
+
if (done || attempts >= maxAttempts) {
|
|
110830
|
+
return;
|
|
110831
|
+
}
|
|
110832
|
+
timerId = window.setTimeout(() => {
|
|
110833
|
+
rafId = window.requestAnimationFrame(attemptRestore);
|
|
110834
|
+
}, 35);
|
|
110835
|
+
};
|
|
110836
|
+
rafId = window.requestAnimationFrame(attemptRestore);
|
|
110837
|
+
const handleScroll = () => captureViewContext(activeTab, viewport.scrollTop);
|
|
110838
|
+
viewport.addEventListener("scroll", handleScroll, { passive: true });
|
|
110839
|
+
return () => {
|
|
110840
|
+
cancelled = true;
|
|
110841
|
+
if (navigationRestoreReadyRef.current) {
|
|
110842
|
+
captureViewContext(activeTab, viewport.scrollTop);
|
|
110843
|
+
}
|
|
110844
|
+
viewport.removeEventListener("scroll", handleScroll);
|
|
110845
|
+
window.cancelAnimationFrame(rafId);
|
|
110846
|
+
window.clearTimeout(timerId);
|
|
110847
|
+
};
|
|
110848
|
+
}, [activeTab, contextEntity == null ? void 0 : contextEntity["@id"], renderTabs, tabs.length, scrollRestoreNonce]);
|
|
110849
|
+
useEffect(() => {
|
|
110850
|
+
const pendingTab = pendingRestoredTabRef.current;
|
|
110851
|
+
if (!(contextEntity == null ? void 0 : contextEntity["@id"])) return;
|
|
110852
|
+
if (pendingTab) {
|
|
110853
|
+
if (activeTab !== pendingTab) {
|
|
110854
|
+
return;
|
|
110855
|
+
}
|
|
110856
|
+
navigationRestoreReadyRef.current = true;
|
|
110857
|
+
pendingRestoredTabRef.current = null;
|
|
110858
|
+
setScrollRestoreNonce((prev2) => prev2 + 1);
|
|
110859
|
+
return;
|
|
110860
|
+
}
|
|
110861
|
+
if (!navigationRestoreReadyRef.current) return;
|
|
110862
|
+
captureViewContext(activeTab);
|
|
110863
|
+
}, [activeTab, showAddPanel, reverseSidebarVisible, highlightRequiredProperties, iconView, tabPaneWidth, contextEntity == null ? void 0 : contextEntity["@id"]]);
|
|
110660
110864
|
const handleAddPropertyPlaceholder = (property) => {
|
|
110661
110865
|
try {
|
|
110662
110866
|
const newExtraProperties = [...extraProperties, property];
|
|
@@ -110711,7 +110915,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110711
110915
|
...data
|
|
110712
110916
|
});
|
|
110713
110917
|
if (updatedEntity["@id"] !== entity["@id"]) {
|
|
110714
|
-
|
|
110918
|
+
handleLoadEntityWithContext({ id: updatedEntity["@id"] });
|
|
110715
110919
|
} else {
|
|
110716
110920
|
refresh();
|
|
110717
110921
|
}
|
|
@@ -110816,7 +111020,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110816
111020
|
const handleDeleteEntity = (data) => {
|
|
110817
111021
|
try {
|
|
110818
111022
|
crateManager.deleteEntity({ id: data.id });
|
|
110819
|
-
|
|
111023
|
+
handleLoadEntityWithContext({ id: "./" });
|
|
110820
111024
|
onSaveCrate();
|
|
110821
111025
|
} catch (error2) {
|
|
110822
111026
|
onError();
|
|
@@ -110929,7 +111133,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110929
111133
|
RenderControls,
|
|
110930
111134
|
{
|
|
110931
111135
|
entity: contextEntity,
|
|
110932
|
-
onLoadEntity,
|
|
111136
|
+
onLoadEntity: handleLoadEntityWithContext,
|
|
110933
111137
|
onBack: () => state.editorState.back(),
|
|
110934
111138
|
onForward: () => state.editorState.forward(),
|
|
110935
111139
|
onAddPropertyPlaceholder: handleAddPropertyPlaceholder,
|
|
@@ -110998,7 +111202,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
110998
111202
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
110999
111203
|
"div",
|
|
111000
111204
|
{
|
|
111001
|
-
className: `my-2 p-2 describo-property describo-property-name-name ${savedProperty === "name" ? "bg-green-200 rounded
|
|
111205
|
+
className: `my-2 p-2 describo-property describo-property-name-name ${savedProperty === "name" ? "bg-green-200 rounded" : ""}`,
|
|
111002
111206
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(EntityName, { entity: contextEntity, onUpdate: handleUpdateEntity })
|
|
111003
111207
|
}
|
|
111004
111208
|
),
|
|
@@ -111016,7 +111220,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111016
111220
|
values: Array.isArray(contextEntity[property]) ? contextEntity[property] : [contextEntity[property]],
|
|
111017
111221
|
highlightRequired: highlightRequiredProperties,
|
|
111018
111222
|
savedProperty: savedProperty === property,
|
|
111019
|
-
onLoadEntity,
|
|
111223
|
+
onLoadEntity: handleLoadEntityWithContext,
|
|
111020
111224
|
onCreateEntity: handleCreateEntity,
|
|
111021
111225
|
onLinkEntity: handleLinkEntity,
|
|
111022
111226
|
onUnlinkEntity: handleUnlinkEntity,
|
|
@@ -111104,7 +111308,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111104
111308
|
values: Array.isArray(contextEntity[property]) ? contextEntity[property] : [contextEntity[property]],
|
|
111105
111309
|
highlightRequired: highlightRequiredProperties,
|
|
111106
111310
|
savedProperty: savedProperty === property,
|
|
111107
|
-
onLoadEntity,
|
|
111311
|
+
onLoadEntity: handleLoadEntityWithContext,
|
|
111108
111312
|
onCreateEntity: handleCreateEntity,
|
|
111109
111313
|
onLinkEntity: handleLinkEntity,
|
|
111110
111314
|
onUnlinkEntity: handleUnlinkEntity,
|
|
@@ -111134,6 +111338,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111134
111338
|
className: "describo-tabs-vertical-center-add",
|
|
111135
111339
|
activeKey: activeTab,
|
|
111136
111340
|
onChange: (key) => {
|
|
111341
|
+
captureViewContext(activeTab);
|
|
111137
111342
|
setActiveTab(key);
|
|
111138
111343
|
saveTabToState(key);
|
|
111139
111344
|
},
|
|
@@ -111180,7 +111385,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111180
111385
|
values: Array.isArray(contextEntity[input.name]) ? contextEntity[input.name] : [contextEntity[input.name]],
|
|
111181
111386
|
highlightRequired: highlightRequiredProperties,
|
|
111182
111387
|
savedProperty: savedProperty === input.name,
|
|
111183
|
-
onLoadEntity,
|
|
111388
|
+
onLoadEntity: handleLoadEntityWithContext,
|
|
111184
111389
|
onCreateEntity: handleCreateEntity,
|
|
111185
111390
|
onLinkEntity: handleLinkEntity,
|
|
111186
111391
|
onUnlinkEntity: handleUnlinkEntity,
|
|
@@ -111209,7 +111414,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111209
111414
|
values: Array.isArray(contextEntity[input.name]) ? contextEntity[input.name] : [contextEntity[input.name]],
|
|
111210
111415
|
highlightRequired: highlightRequiredProperties,
|
|
111211
111416
|
savedProperty: savedProperty === input.name,
|
|
111212
|
-
onLoadEntity,
|
|
111417
|
+
onLoadEntity: handleLoadEntityWithContext,
|
|
111213
111418
|
onCreateEntity: handleCreateEntity,
|
|
111214
111419
|
onLinkEntity: handleLinkEntity,
|
|
111215
111420
|
onUnlinkEntity: handleUnlinkEntity,
|
|
@@ -111242,7 +111447,7 @@ const RenderEntity = forwardRef((props, ref) => {
|
|
|
111242
111447
|
{
|
|
111243
111448
|
entity: contextEntity,
|
|
111244
111449
|
onLoadEntity: (data) => {
|
|
111245
|
-
|
|
111450
|
+
handleLoadEntityWithContext(data);
|
|
111246
111451
|
setReverseSidebarVisible(false);
|
|
111247
111452
|
}
|
|
111248
111453
|
},
|
|
@@ -119575,7 +119780,7 @@ var EmotionCacheContext = /* @__PURE__ */ React.createContext(
|
|
|
119575
119780
|
}) : null
|
|
119576
119781
|
);
|
|
119577
119782
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
119578
|
-
const version = "0.1.
|
|
119783
|
+
const version = "0.1.24";
|
|
119579
119784
|
const pkg = {
|
|
119580
119785
|
version
|
|
119581
119786
|
};
|
|
@@ -119584,7 +119789,8 @@ const ProfileManagerContext = React__default.createContext(null);
|
|
|
119584
119789
|
const CrateManagerContext = React__default.createContext(null);
|
|
119585
119790
|
const LookupsContext = React__default.createContext(null);
|
|
119586
119791
|
function DescriboCrateBuilder(props) {
|
|
119587
|
-
|
|
119792
|
+
const { stateScopeKey } = props;
|
|
119793
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(StateStoreProvider, { stateScopeKey, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DescriboCrateBuilderInner, { ...props }) });
|
|
119588
119794
|
}
|
|
119589
119795
|
function DescriboCrateBuilderInner(props) {
|
|
119590
119796
|
const {
|
|
@@ -119607,6 +119813,7 @@ function DescriboCrateBuilderInner(props) {
|
|
|
119607
119813
|
language: language2 = propertyDefinitions.language.default,
|
|
119608
119814
|
resetTabOnEntityChange = false,
|
|
119609
119815
|
resetTabOnProfileChange = false,
|
|
119816
|
+
stateScopeKey,
|
|
119610
119817
|
onReady,
|
|
119611
119818
|
onError,
|
|
119612
119819
|
onWarning,
|
|
@@ -119712,8 +119919,7 @@ function DescriboCrateBuilderInner(props) {
|
|
|
119712
119919
|
const validIds = new Set(
|
|
119713
119920
|
graph.filter((entry) => entry && typeof entry === "object" && typeof entry["@id"] === "string").map((entry) => String(entry["@id"]))
|
|
119714
119921
|
);
|
|
119715
|
-
state.editorState.
|
|
119716
|
-
state.editorState.current = state.editorState.history.length === 0 ? 0 : Math.min(state.editorState.current, state.editorState.history.length - 1);
|
|
119922
|
+
state.editorState.prune(validIds);
|
|
119717
119923
|
const candidateIds = [(_a2 = state.editorState.latest()) == null ? void 0 : _a2.id, entityId, "./"];
|
|
119718
119924
|
let nextEntity = null;
|
|
119719
119925
|
for (const candidateId of candidateIds) {
|
package/dist/types.d.ts
CHANGED