@kedem/okdb 1.0.1 β 1.0.3
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/bin/okdb.js +1 -1
- package/keys/public.pem +3 -0
- package/okdb.js +1 -1
- package/package.json +2 -2
- package/public/admin-app.js +1 -1
- package/public/components/admin-route-host.ok.js +1 -1
- package/public/components/env-picker.ok.js +1 -1
- package/public/components/field-path-input.ok.js +1 -1
- package/public/components/geo-map.ok.js +1 -1
- package/public/components/ok-cron-input.ok.js +1 -1
- package/public/components/ok-dropzone.ok.js +1 -1
- package/public/components/ok-js-input.ok.js +1 -1
- package/public/components/ok-json-input.ok.js +1 -1
- package/public/components/ok-text-monaco-input.ok.js +1 -1
- package/public/components/theme-toggle.ok.js +1 -1
- package/public/login-app.js +1 -1
- package/public/modules/ok.js +1 -1
- package/public/sections/api/parts/api-endpoint.ok.js +1 -1
- package/public/sections/auth/modals/create-token-modal.ok.js +1 -1
- package/public/sections/auth/modals/edit-token-modal.ok.js +1 -1
- package/public/sections/auth/modals/perm-info-popover.ok.js +1 -1
- package/public/sections/auth/parts/token-detail.ok.js +1 -1
- package/public/sections/auth/parts/token-list.ok.js +1 -1
- package/public/sections/db/modals/add-item-modal.ok.js +1 -1
- package/public/sections/db/modals/create-env-modal.ok.js +1 -1
- package/public/sections/db/modals/create-fts-modal.ok.js +1 -1
- package/public/sections/db/modals/create-index-modal.ok.js +1 -1
- package/public/sections/db/modals/create-pipeline-modal.ok.js +1 -1
- package/public/sections/db/modals/demo-env-modal.ok.js +1 -1
- package/public/sections/db/modals/remove-env-modal.ok.js +1 -1
- package/public/sections/db/modals/schema-edit-modal.ok.js +1 -1
- package/public/sections/db/parts/db-overview.ok.js +1 -1
- package/public/sections/db/parts/db-pipelines-panel.ok.js +1 -1
- package/public/sections/db/parts/edit-row.ok.js +1 -1
- package/public/sections/db/parts/tm-timeline.ok.js +1 -1
- package/public/sections/db/parts/type-changelog.ok.js +1 -1
- package/public/sections/db/parts/type-list.ok.js +1 -1
- package/public/sections/db/parts/type-pipelines-tab.ok.js +1 -1
- package/public/sections/db/parts/type-schema-tab.ok.js +1 -1
- package/public/sections/db/parts/type-viewer.ok.js +1 -1
- package/public/sections/db/parts/type-violations-tab.ok.js +1 -1
- package/public/sections/embeddings/modals/register-model-modal.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-engine-declaration-editor.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-engine-list.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-lifecycle-bar.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-model-catalog.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-overview.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-worker-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embeddings-engine-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
- package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +1 -1
- package/public/sections/engines/engine-panel-shared-style.js +1 -1
- package/public/sections/engines/engine-ui-utils.js +1 -1
- package/public/sections/engines/modals/engine-modal.ok.js +1 -1
- package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
- package/public/sections/engines/parts/engine-lifecycle-actions.ok.js +1 -1
- package/public/sections/engines/parts/engine-panel-shell.ok.js +1 -1
- package/public/sections/engines/parts/engine-resource-card.ok.js +1 -1
- package/public/sections/engines/parts/engine-row-item.ok.js +1 -1
- package/public/sections/engines/parts/generic-engine-panel.ok.js +1 -1
- package/public/sections/files/parts/files-blob-status.ok.js +1 -1
- package/public/sections/files/parts/files-collection-list.ok.js +1 -1
- package/public/sections/files/parts/files-collection-panel.ok.js +1 -1
- package/public/sections/files/parts/files-file-list.ok.js +1 -1
- package/public/sections/files/parts/files-overview.ok.js +1 -1
- package/public/sections/files/parts/files-path-browser.ok.js +1 -1
- package/public/sections/files/parts/files-upload-panel.ok.js +1 -1
- package/public/sections/functions/modals/function-modal.ok.js +1 -1
- package/public/sections/functions/parts/function-detail.ok.js +1 -1
- package/public/sections/functions/parts/function-logs.ok.js +1 -1
- package/public/sections/functions/parts/function-runner.ok.js +1 -1
- package/public/sections/functions/parts/functions-list.ok.js +1 -1
- package/public/sections/license/parts/license-panel.ok.js +1 -1
- package/public/sections/queue/modals/create-bucket-modal.ok.js +1 -1
- package/public/sections/queue/modals/edit-bucket-modal.ok.js +1 -1
- package/public/sections/queue/modals/edit-job-modal.ok.js +1 -1
- package/public/sections/queue/modals/enqueue-job-modal.ok.js +1 -1
- package/public/sections/queue/modals/job-type-modal.ok.js +1 -1
- package/public/sections/queue/parts/ok-job-form.ok.js +1 -1
- package/public/sections/queue/parts/queue-buckets.ok.js +1 -1
- package/public/sections/queue/parts/queue-job-types.ok.js +1 -1
- package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
- package/public/sections/queue/parts/queue-types.ok.js +1 -1
- package/public/sections/queue/parts/queue-workers.ok.js +1 -1
- package/public/sections/sync/parts/sync-node-detail.ok.js +1 -1
- package/public/sections/sync/parts/sync-retention.ok.js +1 -1
- package/public/sections/sync/parts/sync-topology.ok.js +1 -1
- package/public/sections/system/modals/data-ops-modal.ok.js +1 -1
- package/public/sections/system/parts/system-api-panel.ok.js +1 -1
- package/public/sections/system/parts/system-auth-panel.ok.js +1 -1
- package/public/sections/system/parts/system-log-history.ok.js +1 -1
- package/public/sections/system/parts/system-log.ok.js +1 -1
- package/public/sections/system/parts/system-status.ok.js +1 -1
- package/public/sections/system/parts/system-sync-panel.ok.js +1 -1
- package/public/sections/views/modals/create-view-modal.ok.js +1 -1
- package/public/sections/views/parts/view-detail.ok.js +1 -1
- package/public/sections/views/parts/views-list.ok.js +1 -1
- package/public/sections/views/parts/views-overview.ok.js +1 -1
- package/public/setup-app.js +1 -1
- package/public/stores/auth-store.js +1 -1
- package/public/stores/events-store.js +1 -1
- package/public/stores/functions-store.js +1 -1
- package/public/stores/okdb-store.js +1 -1
- package/public/stores/theme-store.js +1 -1
- package/public/util/permissions.js +1 -1
- package/public/util/sift-schema.js +1 -1
- package/public/vendor/okjs/ok.esm.min.js +1 -2
- package/public/vendor/okjs/toolkit/behavior/async.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-doc-viewer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/ok-layer-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/ok-layer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/ok-overlay.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/ok-sandbox.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/transition.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-console-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-console.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-inspector-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-inspector.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-js-tree.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-timeline-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-timeline.ok.js +1 -1
- package/public/vendor/okjs/toolkit/docs/doc-viewer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/editor/ok-live-component.ok.js +1 -1
- package/public/vendor/okjs/toolkit/editor/ok-live-example.ok.js +1 -1
- package/public/vendor/okjs/toolkit/editor/ok-live-shell.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-dropdown.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-icon.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-select.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-table.ok.js +1 -1
- package/public/vendor/okjs/toolkit/errors/ok-crash-boundary.ok.js +1 -1
- package/public/vendor/okjs/toolkit/errors/ok-crash-info.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/i18n-editor-examples.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/i18n-editor.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/i18n-key-editor-tips.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/i18n-key-editor.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/i18n-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/i18n/ok-i18n.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-contextmenu.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-dismiss-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-draggable.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-flyover-panel.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-flyover.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-highlight-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-highlight.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-hotkeys-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-picker-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-popout-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-popout.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-portal-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-submenu.ok.js +1 -1
- package/public/vendor/okjs/toolkit/layout/ok-resizer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/manifest.js +1 -1
- package/public/vendor/okjs/toolkit/modals/ok-modal-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/modals/ok-modal.ok.js +1 -1
- package/public/vendor/okjs/toolkit/modals/ok-toast-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/modals/ok-window.ok.js +1 -1
- package/public/vendor/okjs/toolkit/navigation/hash-router.ok.js +1 -1
- package/public/vendor/okjs/toolkit/navigation/history-router.ok.js +1 -1
- package/public/vendor/okjs/toolkit/navigation/router.ok.js +1 -1
- package/public/vendor/okjs/toolkit/sync/reactive-sync-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/sync/reactive-sync.js +1 -1
- package/public/vendor/okjs/toolkit/theming/blocks/ok-design-button.css.js +1 -1
- package/public/vendor/okjs/toolkit/theming/blocks/ok-design-input.css.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-design-style.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-design-vars.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-design.ok.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-input.ok.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-style.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-utils.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-variable.ok.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-vm.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor.ok.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme.ok.js +1 -1
- package/public/view-models/type-query-vm.js +1 -1
- package/okdb-data/default/data.mdb +0 -0
- package/okdb-data/default/lock.mdb +0 -0
- package/okdb-data/~log/data.mdb +0 -0
- package/okdb-data/~log/lock.mdb +0 -0
- package/okdb-data/~system/data.mdb +0 -0
- package/okdb-data/~system/lock.mdb +0 -0
- package/public/images/logo.png +0 -0
- package/public/images/logo.svg +0 -333
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../core/ok-layer-service.ok.js";import o from"../interaction/ok-portal-service.ok.js";let t=[],i=2e3;const r=new WeakMap;function s(e){const o=t.indexOf(e);-1!==o&&t.splice(o,1),t.push(e),t.forEach((e,o)=>{const s=r.get(e),n=i+o;s?.layer?.restackOwner?.(e,{type:"window",tier:s.tier??"window",z:n}),e.classList.toggle("ok-window--active",o===t.length-1)})}var n={tag:"ok-window",dependencies:[e,o],attr:{noClose:{empty:!0},noMaximize:{empty:!0},noPortal:{empty:!0},layer:{default:"window"}},template:'<div class="ok-window__hud ok-window__hud--header" @mousedown="startDrag($event)"><div class="ok-window__header"><div class="ok-window__title">{{ $props.title || \'\' }}</div><if :="!$props.noMaximize"><button class="ok-window__maximize" @click="toggleMaximize">π</button></if><if :="!$props.noClose"><button class="ok-window__close" @click="close">Γ</button></if></div></div><div class="ok-window__body"><slot/></div><if :="$cmp.$cache.templates?.footer"><div class="ok-window__hud ok-window__hud--footer"><div class="ok-window__footer"><slot name="footer"/></div></div></if><div class="ok-window__resizer ok-window__resizer--top" @mousedown="startResize(\'top\', $event)"/><div class="ok-window__resizer ok-window__resizer--right" @mousedown="startResize(\'right\', $event)"/><div class="ok-window__resizer ok-window__resizer--bottom" @mousedown="startResize(\'bottom\', $event)"/><div class="ok-window__resizer ok-window__resizer--left" @mousedown="startResize(\'left\', $event)"/><div class="ok-window__resizer ok-window__resizer--top-left" @mousedown="startResize(\'top-left\', $event)"/><div class="ok-window__resizer ok-window__resizer--top-right" @mousedown="startResize(\'top-right\', $event)"/><div class="ok-window__resizer ok-window__resizer--bottom-left" @mousedown="startResize(\'bottom-left\', $event)"/><div class="ok-window__resizer ok-window__resizer--bottom-right" @mousedown="startResize(\'bottom-right\', $event)"/>',context(e){let o=null;return{close(){e.$el.dispatchEvent(new CustomEvent("close"))},maximize(){const t=e.$el;t.classList.contains("ok-window--maximized")||(t.getBoundingClientRect(),o={left:t.style.left,top:t.style.top,width:t.style.width,height:t.style.height,transform:t.style.transform},t.style.left="0",t.style.top="0",t.style.width="100vw",t.style.height="100vh",t.style.transform="none",t.classList.add("ok-window--maximized"))},restore(){const t=e.$el;t.classList.contains("ok-window--maximized")&&o&&(t.style.left=o.left,t.style.top=o.top,t.style.width=o.width,t.style.height=o.height,t.style.transform=o.transform,t.classList.remove("ok-window--maximized"))},toggleMaximize(){e.$el.classList.contains("ok-window--maximized")?this.restore():this.maximize()},startDrag(o){o.preventDefault();const t=e.$el;s(t);const i=t.getBoundingClientRect(),r=o.clientX-i.left,n=o.clientY-i.top;t.style.width=i.width+"px",t.style.height=i.height+"px";const d=e.$listen(document,"mousemove",e=>{t.style.position="fixed",t.style.left=e.clientX-r+"px",t.style.top=e.clientY-n+"px",t.style.transform="none"}),a=e.$listen(document,"mouseup",()=>{d.stop(),a.stop()})},setupAutohideHUD(e){const o=e.$el;let t;o.classList.add("ok-window--autohidehud");const i=()=>{o.classList.remove("ok-window--idle"),clearTimeout(t);const i=getComputedStyle(o).getPropertyValue("--ok-window_hud-idle-delay").trim(),r=e.$ok.util.parseTimeToMs(i||"5s");t=setTimeout(()=>{o.classList.add("ok-window--idle")},r)};["mousemove","mousedown","touchstart"].forEach(t=>e.$listen(o,t,i)),i(),e.$ext("unmount",()=>{clearTimeout(t)})},startResize(o,t){t.preventDefault();const i=e.$el;s(i);const r=i.getBoundingClientRect(),n=t.clientX,d=t.clientY,a=r.width,l=r.height,w=r.left,c=r.top;i.style.width=`${a}px`,i.style.height=`${l}px`,i.style.left=`${w}px`,i.style.top=`${c}px`,i.style.transform="none";const h=e.$listen(document,"mousemove",e=>{const t=e.clientX-n,r=e.clientY-d;if(o.includes("right")&&(i.style.width=`${Math.max(200,a+t)}px`),o.includes("bottom")&&(i.style.height=`${Math.max(100,l+r)}px`),o.includes("left")){const e=Math.max(200,a-t);i.style.width=`${e}px`,i.style.left=`${w+t}px`}if(o.includes("top")){const e=Math.max(100,l-r);i.style.height=`${e}px`,i.style.top=`${c+r}px`}}),p=e.$listen(document,"mouseup",()=>{h.stop(),p.stop()})}}},mounted(e){const o=e.$ok.shared.layer;i=o?.resolveLayerZ(e.$attr.layer)??i,r.set(e.$el,{layer:o,tier:e.$attr.layer}),s(e.$el);const n=()=>s(e.$el);if(e.$listen(e.$el,"mousedown",n),e.$listen(e.$el,"touchstart",n),e.$attr.noPortal)o?.restackOwner?.(e.$el,{type:"window",tier:e.$attr.layer,z:i+t.indexOf(e.$el)});else{if(e.$__unmount__$||e.$attr.noPortal)return;const o=e.$ok.shared.portal,r=e.$ok.shared.layer;if(!o||!r)return;r.ownerLayer(e.$el,{type:"window",tier:e.$attr.layer,zIndex:i+t.indexOf(e.$el)}).then(t=>{!t||e.$__unmount__$||e.$attr.noPortal||(o.to(e.$el,t),s(e.$el))}),r.restackOwner(e.$el,{type:"window",tier:e.$attr.layer,z:i+t.indexOf(e.$el)}),e.$el.style.pointerEvents="auto",e.$cache.windowPortalActive=!0}null!=e.$attr.autohidehud&&this.setupAutohideHUD(e)},unmounted(e){const o=t.indexOf(e.$el);-1!==o&&t.splice(o,1),e.$cache.windowPortalActive&&(e.$ok.shared.portal?.back(e.$el),e.$cache.windowPortalActive=!1),e.$ok.shared.layer?.clearOwner?.(e.$el),r.delete(e.$el)},style:"[tag]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--ok-window_bg, white);color:var(--ok_fg, black);border-radius:var(--ok-window_radius, 0.5rem);box-shadow:var(--ok-window_shadow, 0 0 1rem rgba(0,0,0,0.2));z-index:var(--ok-window_z, 0);display:flex;flex-direction:column;overflow:hidden;min-width:300px;max-width:90vw;max-height:90vh;min-height:0;width:fit-content;height:fit-content}.ok-window--idle .ok-window__hud,.ok-window__hud{transition:grid-template-rows .3s ease,opacity .3s ease}.ok-window__hud{grid-template-rows:minmax(0,1fr);opacity:1;display:grid!important}.ok-window--idle .ok-window__hud{grid-template-rows:minmax(0,0fr);opacity:0}.ok-window__footer,.ok-window__header{background:var(--ok-window_header-bg, #f5f5f5);display:flex;justify-content:space-between;align-items:center;min-height:fit-content}.ok-window__footer{background:var(--ok-window_footer-bg, #f9f9f9);padding:.5rem 1rem;text-align:right}.ok-window__title{flex:1;padding:.5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:700;user-select:none}[tag] .ok-window__close,[tag] .ok-window__maximize{all:unset;border:0;padding:.5rem;cursor:pointer;font-size:1.2rem}.ok-window__body{flex-grow:1;display:flex;flex-direction:column;padding:var(--ok-window_padding, 1rem);overflow:auto}.ok-window__resizer{position:absolute;z-index:10}.ok-window__resizer--top{top:-4px;left:0;right:0;height:8px;cursor:ns-resize}.ok-window__resizer--right{top:0;right:-4px;bottom:0;width:8px;cursor:ew-resize}.ok-window__resizer--bottom{bottom:-4px;left:0;right:0;height:8px;cursor:ns-resize}.ok-window__resizer--left{top:0;left:-4px;bottom:0;width:8px;cursor:ew-resize}.ok-window__resizer--top-left{top:-4px;left:-4px;width:12px;height:12px;cursor:nwse-resize}.ok-window__resizer--top-right{top:-4px;right:-4px;width:12px;height:12px;cursor:nesw-resize}.ok-window__resizer--bottom-left{bottom:-4px;left:-4px;width:12px;height:12px;cursor:nesw-resize}.ok-window__resizer--bottom-right{bottom:-4px;right:-4px;width:12px;height:12px;cursor:nwse-resize}.ok-window--active{box-shadow:var(--ok-window_shadow-active, 0 0 1rem rgba(0, 0, 0, 0.4))}.ok-window:not(.ok-window--active){box-shadow:var(--ok-window_shadow-inactive, 0 0 0.5rem rgba(0, 0, 0, 0.1));opacity:.95}.ok-window--maximized{border-radius:0;max-height:100vh;max-width:100vw}.ok-window__hud--header{cursor:grab;min-height:fit-content}.ok-window__hud--header:active{cursor:grabbing}",plugins:{theme:{expose:{"--ok-window_header-bg":{default:"var(--ok_bg-secondary)",type:"color",description:"Window header background color",category:"Colors"},"--ok-window_bg":{default:"var(--ok-surface_bg)",type:"color",description:"Window header background color",category:"Colors"},"--ok-window_footer-bg":{default:"var(--ok-window_bg)",type:"color",description:"Window footer background color",category:"Colors"},"--ok-window_radius":{default:"var(--ok_radius, 0.5rem)",type:"length",description:"Window border radius",category:"Colors"},"--ok-window_shadow":{default:"var(--ok_shadow, 0 0 1rem rgba(0,0,0,0.2))",type:"box-shadow",description:"Window shadow",category:"Colors"},"--ok-window_padding":{default:"var(--ok_padding, 1rem)",type:"length",description:"Content Padding",category:"Layout"},"--ok-window_hud-idle-delay":{default:"5s",type:"delay",description:"HUD idle delay",category:"Timing"}}}}};export{n as default};
|
|
1
|
+
import e from"../core/ok-layer-service.ok.js";import o from"../interaction/ok-portal-service.ok.js";const t=s;function i(){const e=["HUD idle delay","box-shadow","10079424mkQMcm","transform","[tag]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--ok-window_bg, white);color:var(--ok_fg, black);border-radius:var(--ok-window_radius, 0.5rem);box-shadow:var(--ok-window_shadow, 0 0 1rem rgba(0,0,0,0.2));z-index:var(--ok-window_z, 0);display:flex;flex-direction:column;overflow:hidden;min-width:300px;max-width:90vw;max-height:90vh;min-height:0;width:fit-content;height:fit-content}.ok-window--idle .ok-window__hud,.ok-window__hud{transition:grid-template-rows .3s ease,opacity .3s ease}.ok-window__hud{grid-template-rows:minmax(0,1fr);opacity:1;display:grid!important}.ok-window--idle .ok-window__hud{grid-template-rows:minmax(0,0fr);opacity:0}.ok-window__footer,.ok-window__header{background:var(--ok-window_header-bg, #f5f5f5);display:flex;justify-content:space-between;align-items:center;min-height:fit-content}.ok-window__footer{background:var(--ok-window_footer-bg, #f9f9f9);padding:.5rem 1rem;text-align:right}.ok-window__title{flex:1;padding:.5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:700;user-select:none}[tag] .ok-window__close,[tag] .ok-window__maximize{all:unset;border:0;padding:.5rem;cursor:pointer;font-size:1.2rem}.ok-window__body{flex-grow:1;display:flex;flex-direction:column;padding:var(--ok-window_padding, 1rem);overflow:auto}.ok-window__resizer{position:absolute;z-index:10}.ok-window__resizer--top{top:-4px;left:0;right:0;height:8px;cursor:ns-resize}.ok-window__resizer--right{top:0;right:-4px;bottom:0;width:8px;cursor:ew-resize}.ok-window__resizer--bottom{bottom:-4px;left:0;right:0;height:8px;cursor:ns-resize}.ok-window__resizer--left{top:0;left:-4px;bottom:0;width:8px;cursor:ew-resize}.ok-window__resizer--top-left{top:-4px;left:-4px;width:12px;height:12px;cursor:nwse-resize}.ok-window__resizer--top-right{top:-4px;right:-4px;width:12px;height:12px;cursor:nesw-resize}.ok-window__resizer--bottom-left{bottom:-4px;left:-4px;width:12px;height:12px;cursor:nesw-resize}.ok-window__resizer--bottom-right{bottom:-4px;right:-4px;width:12px;height:12px;cursor:nwse-resize}.ok-window--active{box-shadow:var(--ok-window_shadow-active, 0 0 1rem rgba(0, 0, 0, 0.4))}.ok-window:not(.ok-window--active){box-shadow:var(--ok-window_shadow-inactive, 0 0 0.5rem rgba(0, 0, 0, 0.1));opacity:.95}.ok-window--maximized{border-radius:0;max-height:100vh;max-width:100vw}.ok-window__hud--header{cursor:grab;min-height:fit-content}.ok-window__hud--header:active{cursor:grabbing}","position","Window footer background color","contains","color","window","touchstart","ok-window--maximized","stop","restackOwner","preventDefault","460FlBUNA","$ext","$cache","var(--ok_bg-secondary)","left","mouseup","clearOwner","auto","Window header background color","pointerEvents","tier","3396708XHHffa","splice","get","util","var(--ok-window_bg)","delay","none","getBoundingClientRect","push","100vw","ok-window","add","1520106NdxYgW","autohidehud","$__unmount__$","top","classList","Window border radius","shared","windowPortalActive","includes","var(--ok_padding, 1rem)","5172139sQbxcS","setupAutohideHUD","noPortal","5349006aFgRmX","unmount","--ok-window_hud-idle-delay","$attr","max","width","clientY","toggle","trim","height","$listen","parseTimeToMs","Content Padding",'<div class="ok-window__hud ok-window__hud--header" @mousedown="startDrag($event)"><div class="ok-window__header"><div class="ok-window__title">{{ $props.title || \'\' }}</div><if :="!$props.noMaximize"><button class="ok-window__maximize" @click="toggleMaximize">π</button></if><if :="!$props.noClose"><button class="ok-window__close" @click="close">Γ</button></if></div></div><div class="ok-window__body"><slot/></div><if :="$cmp.$cache.templates?.footer"><div class="ok-window__hud ok-window__hud--footer"><div class="ok-window__footer"><slot name="footer"/></div></div></if><div class="ok-window__resizer ok-window__resizer--top" @mousedown="startResize(\'top\', $event)"/><div class="ok-window__resizer ok-window__resizer--right" @mousedown="startResize(\'right\', $event)"/><div class="ok-window__resizer ok-window__resizer--bottom" @mousedown="startResize(\'bottom\', $event)"/><div class="ok-window__resizer ok-window__resizer--left" @mousedown="startResize(\'left\', $event)"/><div class="ok-window__resizer ok-window__resizer--top-left" @mousedown="startResize(\'top-left\', $event)"/><div class="ok-window__resizer ok-window__resizer--top-right" @mousedown="startResize(\'top-right\', $event)"/><div class="ok-window__resizer ok-window__resizer--bottom-left" @mousedown="startResize(\'bottom-left\', $event)"/><div class="ok-window__resizer ok-window__resizer--bottom-right" @mousedown="startResize(\'bottom-right\', $event)"/>',"style","$ok","bottom","Layout","length","1323382nDTXLR","63475JtKEGP","clientX","set","delete","then","portal","restore","Colors","$el","getPropertyValue","layer","remove","dispatchEvent","indexOf","close","forEach","ok-window--idle","var(--ok-surface_bg)","mousemove","16rXnuqR","mousedown"];return(i=function(){return e})()}!function(){const e=s,o=i();for(;;)try{if(740593==parseInt(e(320))/1+parseInt(e(288))/2+-parseInt(e(276))/3+-parseInt(e(265))/4*(parseInt(e(321))/5)+parseInt(e(301))/6+-parseInt(e(298))/7*(-parseInt(e(340))/8)+-parseInt(e(344))/9)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();let r=[],n=2e3;function s(e,o){return e-=265,i()[e]}const d=new WeakMap;function a(e){const o=s,t=r[o(334)](e);-1!==t&&r[o(277)](t,1),r[o(284)](e),r[o(336)]((e,t)=>{const i=o,s=d[i(278)](e),a=n+t;s?.[i(331)]?.[i(355)]?.(e,{type:i(351),tier:s[i(275)]??"window",z:a}),e[i(292)][i(308)]("ok-window--active",t===r[i(319)]-1)})}var w={tag:t(286),dependencies:[e,o],attr:{noClose:{empty:!0},noMaximize:{empty:!0},noPortal:{empty:!0},layer:{default:t(351)}},template:t(314),context(e){let o=null;return{close(){const o=s;e[o(329)][o(333)](new CustomEvent(o(335)))},maximize(){const t=s,i=e[t(329)];i[t(292)].contains(t(353))||(i[t(283)](),o={left:i[t(315)][t(269)],top:i.style.top,width:i[t(315)][t(306)],height:i[t(315)][t(310)],transform:i[t(315)].transform},i[t(315)][t(269)]="0",i.style[t(291)]="0",i.style[t(306)]=t(285),i[t(315)].height="100vh",i[t(315)][t(345)]=t(282),i[t(292)][t(287)](t(353)))},restore(){const t=s,i=e[t(329)];i[t(292)][t(349)](t(353))&&o&&(i[t(315)][t(269)]=o[t(269)],i[t(315)][t(291)]=o[t(291)],i[t(315)][t(306)]=o[t(306)],i[t(315)][t(310)]=o[t(310)],i[t(315)][t(345)]=o[t(345)],i[t(292)].remove(t(353)))},toggleMaximize(){const o=s;e[o(329)][o(292)][o(349)](o(353))?this[o(327)]():this.maximize()},startDrag(o){const t=s;o[t(356)]();const i=e.$el;a(i);const r=i[t(283)](),n=o[t(322)]-r[t(269)],d=o[t(307)]-r[t(291)];i[t(315)].width=r[t(306)]+"px",i.style.height=r.height+"px";const w=e[t(311)](document,t(339),e=>{const o=t;i[o(315)][o(347)]="fixed",i[o(315)][o(269)]=e[o(322)]-n+"px",i[o(315)][o(291)]=e[o(307)]-d+"px",i.style[o(345)]=o(282)}),l=e[t(311)](document,t(270),()=>{const e=t;w[e(354)](),l[e(354)]()})},setupAutohideHUD(e){const o=s,t=e[o(329)];let i;t[o(292)][o(287)]("ok-window--autohidehud");const r=()=>{const r=o;t.classList[r(332)](r(337)),clearTimeout(i);const n=getComputedStyle(t)[r(330)](r(303))[r(309)](),s=e.$ok[r(279)][r(312)](n||"5s");i=setTimeout(()=>{const e=r;t.classList.add(e(337))},s)};[o(339),"mousedown",o(352)][o(336)](o=>e.$listen(t,o,r)),r(),e[o(266)](o(302),()=>{clearTimeout(i)})},startResize(o,t){const i=s;t[i(356)]();const r=e[i(329)];a(r);const n=r[i(283)](),d=t[i(322)],w=t[i(307)],l=n[i(306)],c=n[i(310)],p=n[i(269)],h=n[i(291)];r.style[i(306)]=l+"px",r[i(315)][i(310)]=c+"px",r.style[i(269)]=p+"px",r[i(315)][i(291)]=h+"px",r.style[i(345)]=i(282);const _=e[i(311)](document,i(339),e=>{const t=i,n=e[t(322)]-d,s=e[t(307)]-w;if(o[t(296)]("right")&&(r[t(315)].width=Math[t(305)](200,l+n)+"px"),o[t(296)](t(317))&&(r[t(315)].height=Math.max(100,c+s)+"px"),o[t(296)](t(269))){const e=Math[t(305)](200,l-n);r[t(315)].width=e+"px",r[t(315)][t(269)]=p+n+"px"}if(o[t(296)]("top")){const e=Math[t(305)](100,c-s);r[t(315)].height=e+"px",r.style[t(291)]=h+s+"px"}}),u=e[i(311)](document,"mouseup",()=>{const e=i;_.stop(),u[e(354)]()})}}},mounted(e){const o=t,i=e[o(316)][o(294)][o(331)];n=i?.resolveLayerZ(e[o(304)][o(331)])??n,d[o(323)](e.$el,{layer:i,tier:e[o(304)][o(331)]}),a(e[o(329)]);const s=()=>a(e[o(329)]);if(e[o(311)](e[o(329)],o(341),s),e.$listen(e[o(329)],o(352),s),e[o(304)][o(300)])i?.[o(355)]?.(e.$el,{type:o(351),tier:e.$attr[o(331)],z:n+r[o(334)](e.$el)});else{if(e[o(290)]||e[o(304)][o(300)])return;const t=e[o(316)].shared[o(326)],i=e[o(316)][o(294)][o(331)];if(!t||!i)return;i.ownerLayer(e[o(329)],{type:o(351),tier:e[o(304)][o(331)],zIndex:n+r[o(334)](e.$el)})[o(325)](i=>{const r=o;!i||e[r(290)]||e.$attr[r(300)]||(t.to(e.$el,i),a(e[r(329)]))}),i[o(355)](e[o(329)],{type:o(351),tier:e[o(304)].layer,z:n+r.indexOf(e[o(329)])}),e[o(329)][o(315)][o(274)]=o(272),e[o(267)][o(295)]=!0}null!=e.$attr[o(289)]&&this[o(299)](e)},unmounted(e){const o=t,i=r[o(334)](e[o(329)]);-1!==i&&r.splice(i,1),e[o(267)][o(295)]&&(e[o(316)][o(294)].portal?.back(e.$el),e[o(267)][o(295)]=!1),e.$ok.shared[o(331)]?.[o(271)]?.(e[o(329)]),d[o(324)](e[o(329)])},style:t(346),plugins:{theme:{expose:{"--ok-window_header-bg":{default:t(268),type:t(350),description:t(273),category:t(328)},"--ok-window_bg":{default:t(338),type:t(350),description:t(273),category:t(328)},"--ok-window_footer-bg":{default:t(280),type:t(350),description:t(348),category:t(328)},"--ok-window_radius":{default:"var(--ok_radius, 0.5rem)",type:t(319),description:t(293),category:t(328)},"--ok-window_shadow":{default:"var(--ok_shadow, 0 0 1rem rgba(0,0,0,0.2))",type:t(343),description:"Window shadow",category:t(328)},"--ok-window_padding":{default:t(297),type:t(319),description:t(313),category:t(318)},"--ok-window_hud-idle-delay":{default:"5s",type:t(281),description:t(342),category:"Timing"}}}}};export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./router.ok.js";
|
|
1
|
+
import t from"./router.ok.js";const e=r;function n(){const t=["5020446SRVKfy","bind","location","search","router","$cache","_push","2601006KsUskk","_back","140isSWpy","back","3950HYlLrm","1103lxdgoK","105831tVELPi","810180qHFOkf","addEventListener","destroy","4mWKNZl","2172715StxepG","pathname","history","replaceState","$attr","slice","hash","_go","13057pfwSZh","$once","456CujSdV","hashchange","hash-router","onPathChange"];return(n=function(){return t})()}function r(t,e){return t-=203,n()[t]}!function(){const t=r,e=n();for(;;)try{if(696316==parseInt(t(208))/1*(parseInt(t(205))/2)+-parseInt(t(203))/3*(-parseInt(t(213))/4)+-parseInt(t(214))/5+-parseInt(t(228))/6+-parseInt(t(210))/7+-parseInt(t(224))/8*(-parseInt(t(209))/9)+-parseInt(t(207))/10*(-parseInt(t(222))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();var o={tag:e(226),unwrap:!0,dependencies:[t],context:t=>({router:null,_push(t,e=null){const n=r;window[n(216)].pushState(e,"",window[n(230)][n(215)]+window[n(230)][n(231)]+(t?"#"+t:"")),this[n(230)]=t},_replace(t,e=null){const n=r;window[n(216)][n(217)](e,"",window[n(230)][n(215)]+window[n(230)][n(231)]+(t?"#"+t:"")),this[n(230)]=t},_back(){const t=r;window.history[t(206)]()},_go(t){window[r(216)].go(t)},location:"",get base(){return t[r(218)].base||""},get push(){const t=r;return this[t(234)][t(229)](this)},get replace(){const t=r;return this._replace[t(229)](this)},get back(){const t=r;return this[t(204)][t(229)](this)},get go(){const t=r;return this[t(221)][t(229)](this)}}),mount(t){const n=e,r=t[n(233)][n(232)]={};r[n(227)]=()=>{const t=n;this[t(230)]=window[t(230)][t(220)][t(219)](1)},window[n(211)](n(225),r[n(227)]),t[n(223)](n(212),()=>window.removeEventListener(n(225),r[n(227)])),this[n(230)]=window.location[n(220)][n(219)](1)},template:'<router @route="$cmp.$cache.events.route?.listener" @mount="router = $scope.$innerContext" :base :parent="$attr.parent" :location :back :go :push :replace><slot var:router/></router>'};export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./router.ok.js";
|
|
1
|
+
import t from"./router.ok.js";function e(t,e){return t-=406,o()[t]}function o(){const t=["destroy","_go","a[href]","origin","1773549azsxYn","pushState","$el","hasAttribute","1075038zWHdTW","hash","base","211XfVQAo","location","33xtbZIW","data-native","pathname","10sfkAql","_back","$once","onPathChange",'<router @route="$cmp.$cache.events.route?.listener" @mount="router = $scope.$innerContext" :base :parent="$attr.parent" :location :back :go :push :replace><slot var:router/></router>',"$listen","981016xaXbNl","back","_replace","router","328dFnHjN","125541Npcsua","2303290mbuhae","addEventListener","replaceState","click","target","_push","history-router","search","$cache","8426uWKHXc","2475165nOBods","baseURI","popstate","bind","$attr"];return(o=function(){return t})()}const n=e;!function(){const t=e,n=o();for(;;)try{if(447700==parseInt(t(431))/1*(-parseInt(t(414))/2)+-parseInt(t(424))/3+parseInt(t(442))/4*(parseInt(t(436))/5)+-parseInt(t(428))/6+parseInt(t(415))/7+parseInt(t(446))/8*(parseInt(t(447))/9)+parseInt(t(448))/10*(parseInt(t(433))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();var a={tag:n(411),unwrap:!1,dependencies:[t],context:t=>({router:null,_push(t,o=null){const n=e;history[n(425)](o,"",t||"/"),this[n(432)]=location[n(435)]+location[n(412)]+location[n(429)]},_replace(t,o=null){history[e(407)](o,"",t||"/"),this.location=location.pathname+location.search+location.hash},_back(){history[e(443)]()},_go(t){history.go(t)},location:"",get base(){const o=e;return t[o(419)][o(430)]||document[o(416)].replace(location[o(423)],"")},get push(){const t=e;return this[t(410)][t(418)](this)},get replace(){return this[e(444)].bind(this)},get back(){const t=e;return this[t(437)][t(418)](this)},get go(){const t=e;return this[t(421)][t(418)](this)}}),mount(t){const e=n,o=t[e(413)][e(445)]={};o[e(439)]=()=>{const t=e;this[t(432)]=location[t(435)]+location[t(412)]+location[t(429)]},window[e(406)](e(417),o[e(439)]),t[e(438)](e(420),()=>{window.removeEventListener("popstate",o.onPathChange)}),this.location=location.pathname+location[e(412)]+location[e(429)],t[e(441)](t[e(426)],e(408),t=>{const o=e,n=t[o(409)].closest(o(422));n&&n.origin===location[o(423)]&&!n[o(427)](o(434))&&(t.preventDefault(),this[o(410)](n[o(435)]+n.search+n[o(429)]))})},template:n(440)};export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const t=r;function n(t,n){const e=r;if(n.startsWith("/"))return n;const s=n[e(362)]("./")?n[e(382)](2):n;return t[e(367)](/\/+$/,"")+"/"+s[e(367)](/^\/+/,"")}function e(t,n){const e=r,s={};if("*"===n)return{params:s,location:t};const o=t.split("/"),i=n[e(386)]("/"),a="*"===i[i[e(412)]-1],h=a?i[e(412)]-1:i.length;if(o[e(412)]<h||!a&&o[e(412)]!==i.length)return null;for(let t=0;t<i[e(412)];t++){const n=i[t],r=o[t];if("*"===n)break;if(n[e(362)](":"))s[n[e(382)](1)]=r;else if(n!==r)return null}let c=i[e(393)](t=>"*"===t);-1===c&&(c=i.length);const u=o[e(382)](0,c)[e(377)]("/");return a&&(s["*"]=o.slice(c)[e(377)]("/")),{params:s,location:u}}function s(t=""){const n=r,e={};for(const s of t[n(386)]("&")){if(!s)continue;const[t,r=""]=s[n(386)]("=");e[decodeURIComponent(t)]=decodeURIComponent(r)}return e}function r(t,n){return t-=357,o()[t]}function o(){const t=["6HNUEvy","$el","slice","_pendingLocation","get","resolve","split","_searchProxyTarget","_searchString","ROUTER_MISSING_BACK","root","11quGeAX","$attr","findIndex","ownKeys","orphaned","_searchProxy","_search","update","ROUTER_MISSING_REPLACE","path","entries","keys","lastSearch","back","delete","parent","$error","values","16gpaSje","_pendingNavigationContext","_anchor","length","958923YvTAFq","2176264UrSGKN","snapshot","ROUTER_MISSING_PUSH","debounceReplace","_path","$watch","78494HVOYSK","1024365JPQFoM","atPath","params","lastMatch","startsWith","snapshotParams","3WojCzc","push","_replaceScheduled","replace","map","location","base","emitChange","route","2684430kCFPWR","dispatchEvent","_navigationContext","7245530FWaSez","join","2374096UOJYTt","router"];return(o=function(){return t})()}function i(t){const n=r,e=t[n(386)]("#");return[e[0],e[n(382)](1).join("#")]}function a(t,n){for(const e in n)t[e]=n[e];for(const e in t)e in n||delete t[e]}function h(t,n,s,o){const i=r,a=()=>{const i=r;if(o[i(395)])return o.snapshotParams;o[i(359)]!==t[i(418)]&&(o[i(359)]=t[i(418)],o[i(361)]=e(t._path,n));const a=o[i(361)];return null==a||a[i(369)]!==s?o[i(363)]:a[i(360)]};return new Proxy(o[i(363)],{get:(t,n)=>a()[n],has:(t,n)=>n in a(),ownKeys:()=>Reflect[i(394)](a()),getOwnPropertyDescriptor:(t,n)=>{const e=a();if(n in e)return{value:e[n],writable:!0,enumerable:!0,configurable:!0}}})}function c(t,n,s,o){const i=r,h=()=>{const i=r;if(o.orphaned)return o[i(415)];o[i(359)]!==t._path&&(o[i(359)]=t[i(418)],o[i(361)]=e(t[i(418)],n));const h=o[i(361)];return null!=h&&h[i(369)]===s?(o[i(403)]!==t[i(397)]&&(o[i(403)]=t[i(397)],a(o[i(415)],o[i(403)])),o[i(403)]):o.snapshot};return new Proxy(o[i(415)],{get:(t,n)=>h()[n],has:(t,n)=>n in h(),ownKeys:()=>Reflect[i(394)](h()),getOwnPropertyDescriptor:(t,n)=>Reflect.getOwnPropertyDescriptor(h(),n),set:(n,e,s)=>{const r=i;return h()===o[r(415)]||(t.search[e]=s),!0},deleteProperty:(n,e)=>{const s=i;return h()===o[s(415)]||delete t.search[e],!0}})}!function(){const t=r,n=o();for(;;)try{if(322026==-parseInt(t(409))/1*(parseInt(t(357))/2)+-parseInt(t(364))/3*(-parseInt(t(378))/4)+-parseInt(t(358))/5*(parseInt(t(380))/6)+-parseInt(t(413))/7+parseInt(t(414))/8+-parseInt(t(373))/9+-parseInt(t(376))/10*(-parseInt(t(391))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();var u={tag:t(379),unwrap:!0,context(t){const o=new Map;return{get router(){return this},_navigationContext:null,_searchString:"",_search:{},_path:"",_anchor:"",get navigationContext(){return this._navigationContext},set navigationContext(t){this[r(375)]=t},get searchString(){return this._searchString},set searchString(t){const n=r;this[n(417)](this[n(385)](this._path,s(t),this[n(411)]),this._navigationContext)},_searchProxy:null,_searchProxyTarget:null,_getSearchProxy(){const t=r,n=this[t(397)];if(this[t(396)]&&this[t(387)]===n)return this[t(396)];const e=this,s=new Proxy(n,{set(n,s,r){const o=t,i={...n,[s]:r};return e[o(417)](e[o(385)](e[o(418)],i,e._anchor),e[o(375)]),!0},deleteProperty(n,s){const r=t,o={...n};return delete o[s],e.debounceReplace(e[r(385)](e[r(418)],o,e[r(411)]),e._navigationContext),!0}});return this[t(396)]=s,this[t(387)]=n,s},get search(){return this._getSearchProxy()},set search(t){const n=r;this.debounceReplace(this[n(385)](this[n(418)],t,this[n(411)]),this[n(375)])},get path(){return this[r(418)]},set path(t){const n=r;this[n(417)](this[n(385)](t,this._search,this[n(411)]),this._navigationContext)},get anchor(){return this[r(411)]},set anchor(t){const n=r,[e]=i(this[n(369)]),s=e+(t?"#"+t:"");this[n(417)](s,this[n(375)])},_replaceScheduled:!1,_pendingLocation:null,_pendingNavigationContext:null,debounceReplace(t,n=null){const e=r;this[e(410)]=n,this._pendingLocation=t,!this[e(366)]&&(this[e(366)]=!0,queueMicrotask(()=>{const t=e;this[t(366)]=!1;const n=this[t(383)],s=this[t(410)];this[t(383)]=null,this._pendingNavigationContext=null,this[t(367)](n,s)}))},match(t){const s=r;this[s(369)];const i=n(this[s(370)],t),a=o[s(384)](t);let u;if(a&&a[s(359)]===this._path?u=a[s(361)]:(u=e(this[s(418)],i),a&&(a.atPath=this[s(418)],a[s(361)]=u)),null==u)return a&&(a[s(395)]=!0),o.delete(t),null;if(a&&a.matchedLocation===u[s(369)]&&function(t,n){const e=r,s=Object[e(402)](t),o=Object[e(402)](n);if(s[e(412)]!==o[e(412)])return!1;for(const e of s)if(t[e]!==n[e])return!1;return!0}(a[s(361)][s(360)],u[s(360)]))return a[s(372)];a&&(a[s(395)]=!0);const l={route:null,matchedLocation:u[s(369)],atPath:this._path,lastMatch:u,snapshot:{...this._search},snapshotParams:{...u[s(360)]},lastSearch:this[s(397)],orphaned:!1};return l[s(372)]={path:i,location:u[s(369)],params:h(this,i,u[s(369)],l),search:c(this,i,u[s(369)],l),router:this},o.set(t,l),l[s(372)]},get root(){const t=r;return this[t(406)]?.[t(390)]||this},get parent(){return t[r(392)].parent},get base(){const n=r;return t.$attr.base||this[n(406)]?.[n(400)]||""},get location(){const n=r;return void 0!==t[n(392)][n(369)]?t.$attr[n(369)]:this.parent?.[n(369)]||""},back(){const n=r,e=t[n(392)][n(404)]||this.parent?.[n(404)];if(!e)throw t.$error(n(389));return e()},go(n){const e=r,s=t.$attr.go||this.parent?.go;if(!s)throw t[e(407)]("ROUTER_MISSING_GO");return s(n)},push(n,e=null){const s=r;this[s(375)]=e;const o=t[s(392)].push||this.parent?.[s(365)];if(!o)throw t.$error(s(416));return o(n,e)},replace(n,e=null){const s=r;this[s(375)]=e;const o=t[s(392)][s(367)]||this[s(406)]?.[s(367)];if(!o)throw t[s(407)](s(399));return o(n,e)},resolve:(t,n={},e="")=>t+function(t){const n=r,e=Object[n(401)](t);return e[n(412)]?"?"+e[n(368)](([t,n])=>encodeURIComponent(t)+"="+encodeURIComponent(n))[n(377)]("&"):""}(n)+(e?"#"+e:""),update(){const t=r;let h=!1,c=!1,u=!1;const[l,p]=i(this[t(369)]),[f,g=""]=l[t(386)]("?");if(this[t(388)]!==g||this[t(418)]!==f)for(const n of o[t(408)]())n.lastSearch=this[t(397)],a(n.snapshot,this[t(397)]),n[t(361)]&&a(n.snapshotParams,n[t(361)][t(360)]);if(this[t(388)]!==g&&(this[t(388)]=g,this[t(397)]=s(g),h=!0),this[t(418)]!==f&&(this._path=f,c=!0),this._anchor!==p&&(this._anchor=p,u=!0),c)for(const[s,r]of o){const i=n(this[t(370)],s),a=e(this[t(418)],i);null==a||a[t(369)]!==r.matchedLocation?(r[t(395)]=!0,o[t(405)](s)):(r[t(359)]=this._path,r[t(361)]=a)}(c||h||u)&&this[t(371)]()},emitChange(){const n=r;t[n(381)][n(374)](new CustomEvent(n(372),{detail:this}))}}},mount(n){const e=t;n[e(419)](()=>this[e(369)],()=>{this[e(398)]()}),this[e(398)]()},template:"<slot var:router/>"};export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from"./reactive-sync.js";function e(){var r=["3018epFnhD","4114901ePDdUp","329152TaOIeA","shared","createReactiveSync","4809870pNvUUJ","7847741ILmXYI","2vXEcqF","16564fFNrwf","12SdjYMf","3120MHnWLX","reactive-sync-service","95716WBLoim","117FEUvne","333jKGzMZ"];return(e=function(){return r})()}var t=a;function a(r,t){return r-=173,e()[r]}!function(){for(var r=a,t=e();;)try{if(378150==-parseInt(r(183))/1*(parseInt(r(178))/2)+parseInt(r(185))/3*(-parseInt(r(179))/4)+parseInt(r(181))/5*(-parseInt(r(186))/6)+parseInt(r(187))/7+-parseInt(r(173))/8*(parseInt(r(184))/9)+parseInt(r(176))/10+-parseInt(r(177))/11*(-parseInt(r(180))/12))break;t.push(t.shift())}catch(r){t.push(t.shift())}}();var n={tag:t(182),register(e){var a=t;e[a(174)].sync={...r,createReactiveSync:(t,n)=>r[a(175)](t,{OKProxy:e.OK.OKProxy,...n})}}};export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,{path:
|
|
1
|
+
function t(t,e){return t-=209,i()[t]}const e=t;function s(e,{path:s,args:n,mode:r,type:o,value:i}){const c=t;for(let t=0;t<s[c(255)]-1;t++)if(!(e=e[s[t]]))return;const a=s[s[c(255)]-1];if(o===c(242)&&Array[c(232)](e))switch(r){case c(225):e[c(225)](...n);break;case c(212):e[c(212)]();break;case c(243):e[c(243)]();break;case c(217):e[c(217)](...n);break;case c(239):e[c(239)](...n);break;case"set":e[a]=i;break;case c(255):e[c(255)]=i}else e[a]=i}function n(t,{mode:n=e(221),transport:r={push:t=>{throw new Error(e(228))},send:t=>{throw new Error("Not implemented")},listen:t=>{throw new Error("Not implemented")},requestFetch:t=>{throw new Error(e(228))},destroy:()=>{throw new Error(e(228))}},OKProxy:o=null}={}){const i=e;if(!o)throw new Error(i(235));const c=t[o[i(269)]];if(!c)throw new Error("Local must be an OKProxy");const a=[];let h=!1,u=!1;const p=t=>{const e=i;u||(a[e(225)]({path:t[e(275)],value:t.value,type:t.raw.type,mode:t[e(226)][e(265)],args:t[e(226)][e(245)]}),!h&&(h=!0,queueMicrotask(async()=>{r[e(225)](a),a.length=0,h=!1})))};let l=null;if(n===i(221)||"push"===n){if(!r[i(225)])throw new Error("push is required on transport");l=c.observeDeep(t,p)}const d={OKProxy:o,get local(){return t},get transport(){return r},destroy(){const e=i;t=null,l?.[e(256)](),r[e(224)]?.()},pull(e){"twoway"!==n&&"pull"!==n||(c[i(266)](()=>{u=!0;for(let n of e)s(t,n)}),u=!1)},receive(e){const s=i;c[s(266)](()=>{const n=s;u=!0;const r=new Set;for(let s of Object[n(220)](t))t[s]=e[s],r.add(s);for(let s of Object[n(220)](e))!r[n(246)](s)&&(t[s]=e[s])}),this[s(271)]&&(this[s(271)][s(258)](t),this._awaitFetchPromise=null),u=!1},_awaitFetchPromise:null,awaitFetch(){const t=i;if(this[t(271)])return this[t(271)].promise;let e=null;const s=new Promise(t=>{e=t});return this._awaitFetchPromise={promise:s,resolve:e},this[t(271)][t(209)]},async fetch(){const t=i;u=!0,r[t(214)]();const e=await this[t(210)]();return u=!1,e}};return r[i(250)]?.(d),d}function r(e){return{_contextSync:null,_onMessage(e){const s=t;if(!this[s(252)])throw new Error(s(257));e[s(234)][s(213)]===s(225)?this[s(252)][s(268)](JSON.parse(e[s(234)][s(249)])):"send"===e[s(234)][s(213)]?this[s(252)][s(273)](JSON.parse(e[s(234)][s(241)])):e[s(234)][s(213)]===s(247)&&this.send(this._contextSync.local)},_boundOnMessage:null,listen(s){const n=t;this[n(252)]=s,this[n(261)]=this[n(223)][n(229)](this),e[n(211)](n(267),this[n(261)])},destroy(){const s=t;this[s(261)]&&e[s(263)](s(267),this[s(261)])},send(s){const n=t,r=s[this[n(252)][n(260)][n(230)]];e[n(272)]({type:n(254),source:JSON[n(237)](r)})},push(s){const n=t;e[n(272)]({type:"push",changes:JSON[n(237)](s)})},requestFetch(){const s=t;e[s(272)]({type:s(247)})}}}function o(t="ok-sync"){const s=e,n=new BroadcastChannel(t),r=Math[s(262)]()[s(231)](36)[s(264)](2);return{_contextSync:null,_onMessage(t){const e=s;if(t[e(234)][e(222)]===r)return;const n=t[e(234)];this._contextSync&&("push"===n[e(213)]?this[e(252)][e(268)](n[e(249)]):n[e(213)]===e(254)?this[e(252)][e(273)](n[e(241)]):"fetch"===n[e(213)]&&this[e(254)](this._contextSync[e(244)]))},listen(t){const e=s;this[e(252)]=t,this[e(259)]=this[e(223)].bind(this),n[e(211)](e(267),this[e(259)])},destroy(){const t=s;this[t(259)]&&(n[t(263)](t(267),this._bound),this[t(259)]=null),n[t(236)]()},send(t){const e=s,o=t[this[e(252)][e(260)][e(230)]];n.postMessage({type:e(254),source:o,senderId:r})},push(t){const e=s;n.postMessage({type:e(225),changes:t,senderId:r})},requestFetch(){const t=s;n[t(272)]({type:t(247),senderId:r})}}}function i(){const t=["shift","local","args","has","fetch","324SiDDhA","changes","listen","2103595qIFpvZ","_contextSync","326044nXnXfN","send","length","stop","Receiving messages without context","resolve","_bound","OKProxy","_boundOnMessage","random","removeEventListener","slice","mode","frame","message","pull","SYM_OKPROXY_INSTANCE","3622671GgXnXr","_awaitFetchPromise","postMessage","receive","130MFdJNK","path","promise","awaitFetch","addEventListener","pop","type","requestFetch","722939VILXCV","5741dnUjTi","unshift","638055AkbLqT","340BpETNP","keys","twoway","senderId","_onMessage","destroy","push","raw","9PVGETE","Not implemented","bind","SYM_TARGET","toString","isArray","64DZkjba","data","OKProxy class is required","close","stringify","422VSAkIo","splice","63474xyGtaU","source","array"];return(i=function(){return t})()}!function(){const e=t,s=i();for(;;)try{if(700015==-parseInt(e(216))/1*(parseInt(e(238))/2)+-parseInt(e(227))/3*(-parseInt(e(253))/4)+-parseInt(e(219))/5*(parseInt(e(240))/6)+-parseInt(e(215))/7*(parseInt(e(233))/8)+-parseInt(e(270))/9+parseInt(e(274))/10*(-parseInt(e(218))/11)+parseInt(e(248))/12*(parseInt(e(251))/13))break;s.push(s.shift())}catch(t){s.push(s.shift())}}();export{o as createBroadcastTransport,n as createReactiveSync,r as createWorkerTransport};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var n="\n/* Default buttons */\n~ button {\n cursor: pointer;\n}\n~ button.active {\n background: var(--ok_bg-accent);\n}\n\n~ button:hover {\n background: color-mix(in srgb, var(--ok_bg) 50%, var(--ok_bg-accent));\n box-shadow: var(--ok_shadow-strong);\n}\n\n~ button:active {\n background: color-mix(in srgb, var(--ok_bg) 90%, var(--ok_fg));\n}\n\n~ button:focus {\n box-shadow: 0 0 0 2px var(--ok_focus-ring);\n outline: none;\n}\n\n~ button:focus-visible {\n box-shadow: 0 0 0 2px var(--ok_focus-ring);\n outline: calc(var(--ok_space-xs)) solid var(--ok_fg-accent);\n}\n\n~ button:disabled {\n opacity: 0.5;\n filter: grayscale(0.3);\n cursor: not-allowed;\n}";export{
|
|
1
|
+
var n=o;function o(n,o){return n-=365,r()[n]}!function(){for(var n=o,t=r();;)try{if(174634==-parseInt(n(365))/1+parseInt(n(370))/2+-parseInt(n(371))/3*(parseInt(n(368))/4)+parseInt(n(369))/5*(-parseInt(n(366))/6)+-parseInt(n(373))/7+parseInt(n(372))/8+parseInt(n(367))/9)break;t.push(t.shift())}catch(n){t.push(t.shift())}}();var t=n(374);function r(){var n=["9660384YkDkRY","4eDtPUL","10OhfRUP","207444HGWZUV","928491ZeZRjb","1601560fxfqha","1918371ZTzlzZ","\n/* Default buttons */\n~ button {\n cursor: pointer;\n}\n~ button.active {\n background: var(--ok_bg-accent);\n}\n\n~ button:hover {\n background: color-mix(in srgb, var(--ok_bg) 50%, var(--ok_bg-accent));\n box-shadow: var(--ok_shadow-strong);\n}\n\n~ button:active {\n background: color-mix(in srgb, var(--ok_bg) 90%, var(--ok_fg));\n}\n\n~ button:focus {\n box-shadow: 0 0 0 2px var(--ok_focus-ring);\n outline: none;\n}\n\n~ button:focus-visible {\n box-shadow: 0 0 0 2px var(--ok_focus-ring);\n outline: calc(var(--ok_space-xs)) solid var(--ok_fg-accent);\n}\n\n~ button:disabled {\n opacity: 0.5;\n filter: grayscale(0.3);\n cursor: not-allowed;\n}","290497rYYFtm","985836iHNTMB"];return(r=function(){return n})()}export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var n='\n~ input[type="range"] {\n outline: none;\n accent-color: var(--ok_fg-accent);\n box-shadow: none;\n}\n\n/* Input / Textarea / Select */\n~ input:focus,\n ~ select:focus,\n ~ textarea:focus {\n \n box-shadow: 0 0 0 2px var(--ok_focus-ring);\n outline: calc(var(--ok_space-xs)) solid var(--ok_fg-accent);\n}\n\n~ input[type="range"]:focus {\n outline: none;\n filter: brightness(1.2);\n box-shadow: none;\n}\n\n~ input[type="range"]:focus::-webkit-slider-thumb {\n box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok_fg-accent) 50%, transparent);\n background-clip: padding-box;\n border: none;\n border-radius: 50%;\n}\n\n~ input[type="range"]:focus::-moz-range-thumb {\n box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok_fg-accent) 50%, transparent);\n background-clip: padding-box;\n border: none;\n border-radius: 50%;\n}\n\n~ input:disabled {\n cursor: not-allowed; \n}';
|
|
1
|
+
var n=e;function r(){var n=['\n~ input[type="range"] {\n outline: none;\n accent-color: var(--ok_fg-accent);\n box-shadow: none;\n}\n\n/* Input / Textarea / Select */\n~ input:focus,\n ~ select:focus,\n ~ textarea:focus {\n \n box-shadow: 0 0 0 2px var(--ok_focus-ring);\n outline: calc(var(--ok_space-xs)) solid var(--ok_fg-accent);\n}\n\n~ input[type="range"]:focus {\n outline: none;\n filter: brightness(1.2);\n box-shadow: none;\n}\n\n~ input[type="range"]:focus::-webkit-slider-thumb {\n box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok_fg-accent) 50%, transparent);\n background-clip: padding-box;\n border: none;\n border-radius: 50%;\n}\n\n~ input[type="range"]:focus::-moz-range-thumb {\n box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok_fg-accent) 50%, transparent);\n background-clip: padding-box;\n border: none;\n border-radius: 50%;\n}\n\n~ input:disabled {\n cursor: not-allowed; \n}',"925640GSqmWR","87PmgWGr","5305890QJlmxG","68444HAjJia","73534xWtxaH","2723232nEbKtw","18NKegST","745031XqljEz","2436633tyeWDN"];return(r=function(){return n})()}function e(n,e){return n-=398,r()[n]}!function(){for(var n=e,t=r();;)try{if(703184==-parseInt(n(398))/1*(parseInt(n(406))/2)+-parseInt(n(403))/3*(-parseInt(n(405))/4)+parseInt(n(404))/5+-parseInt(n(407))/6+parseInt(n(399))/7+-parseInt(n(402))/8+parseInt(n(400))/9)break;t.push(t.shift())}catch(n){t.push(t.shift())}}();var t=n(401);export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var n="\n\n/* Reset */\n~ {\n box-sizing: border-box;\n color: var(--ok_fg);\n background: var(--ok_bg);\n font-family: var(--ok_font-family);\n font-size: var(--ok_font-size);\n line-height: var(--ok_line-height-base);\n}\n\n~ *,\n~ *::before,\n~ *::after {\n box-sizing: inherit;\n min-width: 0;\n min-height: 0;\n}\n\n/* Inline elements */\n~ hr {\n border: none;\n border-top: var(--ok_border);\n margin: var(--ok_space) 0;\n}\n\n~ img {\n max-width: 100%;\n height: auto;\n display: block;\n}\n\n~ code {\n font-family: var(--ok_font-family-monospace, monospace);\n background: var(--ok_bg-muted);\n padding: 0 var(--ok_space-xs);\n border-radius: var(--ok_space-xs);\n}\n\n/* Headings */\n~ h1,\n ~ h2,\n ~ h3,\n ~ h4,\n ~ h5,\n ~ h6 {\n color: var(--ok_fg);\n margin: calc(var(--ok_space) * 2) 0 var(--ok_space);\n font-weight: var(--ok_font-weight-bold);\n line-height: 1.2;\n}\n~ h1 { font-size: calc(var(--ok_font-size) * 2); }\n~ h2 { font-size: calc(var(--ok_font-size) * 1.75); }\n~ h3 { font-size: calc(var(--ok_font-size) * 1.5); }\n~ h4 { font-size: calc(var(--ok_font-size) * 1.25); }\n~ h5 { font-size: var(--ok_font-size); }\n~ h6 { font-size: calc(var(--ok_font-size) * 0.875); }\n\n/* Baseline for form elements */\n~ button,\n~ input[type=file]::file-selector-button,\n~ input[type=file]::-webkit-file-upload-button,\n~ input,\n~ select,\n~ textarea {\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n font-variant-numeric: tabular-nums;\n background: var(--ok_bg);\n padding: var(--ok_space-sm);\n color: var(--ok_fg);\n border: var(--ok_border);\n border-radius: var(--ok_space-xs);\n box-shadow: var(--ok_shadow);\n transition: var(--ok_transition);\n}\n\n/* Links */\n~ a {\n color: var(--ok_fg-accent);\n text-decoration: underline;\n}\n~ a:hover {\n color: color-mix(in srgb, var(--ok_fg-accent) 80%, var(--ok_fg));\n text-decoration: none;\n}\n\n/* βββββββββββββββββββββββββββββββββββββββββββββββββββββ */\n/* Flavors: accent / secondary / muted */\n/* βββββββββββββββββββββββββββββββββββββββββββββββββββββ */\n~ .accent {\n background: var(--ok_bg-accent);\n color: var(--ok_fg-accent);\n border: var(--ok_border-accent);\n}\n~ .accent:hover {\n background: color-mix(in srgb, var(--ok_bg-accent) 90%, var(--ok_fg-accent));\n}\n~ button.accent.active {\n background: var(--ok_bg);\n}\n\n~ .muted {\n background: var(--ok_bg-muted);\n color: var(--ok_fg-muted);\n border: var(--ok_border-muted);\n}\n~ .muted:hover {\n background: color-mix(in srgb, var(--ok_bg-muted) 90%, var(--ok_fg-accent));\n}\n\n~ .secondary {\n background: var(--ok_bg-secondary);\n color: var(--ok_fg-secondary);\n border: var(--ok_border-secondary);\n}\n~ button.secondary.active {\n background: var(--ok_bg);\n}\n~ .secondary:hover {\n background: color-mix(in srgb, var(--ok_bg-secondary) 90%, black);\n}";
|
|
1
|
+
function n(n,o){return n-=218,r()[n]}!function(){for(var o=n,a=r();;)try{if(695345==-parseInt(o(224))/1*(parseInt(o(221))/2)+-parseInt(o(225))/3*(-parseInt(o(223))/4)+parseInt(o(219))/5+-parseInt(o(227))/6+parseInt(o(222))/7+parseInt(o(218))/8+-parseInt(o(220))/9*(parseInt(o(226))/10))break;a.push(a.shift())}catch(n){a.push(a.shift())}}();var o="\n\n/* Reset */\n~ {\n box-sizing: border-box;\n color: var(--ok_fg);\n background: var(--ok_bg);\n font-family: var(--ok_font-family);\n font-size: var(--ok_font-size);\n line-height: var(--ok_line-height-base);\n}\n\n~ *,\n~ *::before,\n~ *::after {\n box-sizing: inherit;\n min-width: 0;\n min-height: 0;\n}\n\n/* Inline elements */\n~ hr {\n border: none;\n border-top: var(--ok_border);\n margin: var(--ok_space) 0;\n}\n\n~ img {\n max-width: 100%;\n height: auto;\n display: block;\n}\n\n~ code {\n font-family: var(--ok_font-family-monospace, monospace);\n background: var(--ok_bg-muted);\n padding: 0 var(--ok_space-xs);\n border-radius: var(--ok_space-xs);\n}\n\n/* Headings */\n~ h1,\n ~ h2,\n ~ h3,\n ~ h4,\n ~ h5,\n ~ h6 {\n color: var(--ok_fg);\n margin: calc(var(--ok_space) * 2) 0 var(--ok_space);\n font-weight: var(--ok_font-weight-bold);\n line-height: 1.2;\n}\n~ h1 { font-size: calc(var(--ok_font-size) * 2); }\n~ h2 { font-size: calc(var(--ok_font-size) * 1.75); }\n~ h3 { font-size: calc(var(--ok_font-size) * 1.5); }\n~ h4 { font-size: calc(var(--ok_font-size) * 1.25); }\n~ h5 { font-size: var(--ok_font-size); }\n~ h6 { font-size: calc(var(--ok_font-size) * 0.875); }\n\n/* Baseline for form elements */\n~ button,\n~ input[type=file]::file-selector-button,\n~ input[type=file]::-webkit-file-upload-button,\n~ input,\n~ select,\n~ textarea {\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n font-variant-numeric: tabular-nums;\n background: var(--ok_bg);\n padding: var(--ok_space-sm);\n color: var(--ok_fg);\n border: var(--ok_border);\n border-radius: var(--ok_space-xs);\n box-shadow: var(--ok_shadow);\n transition: var(--ok_transition);\n}\n\n/* Links */\n~ a {\n color: var(--ok_fg-accent);\n text-decoration: underline;\n}\n~ a:hover {\n color: color-mix(in srgb, var(--ok_fg-accent) 80%, var(--ok_fg));\n text-decoration: none;\n}\n\n/* βββββββββββββββββββββββββββββββββββββββββββββββββββββ */\n/* Flavors: accent / secondary / muted */\n/* βββββββββββββββββββββββββββββββββββββββββββββββββββββ */\n~ .accent {\n background: var(--ok_bg-accent);\n color: var(--ok_fg-accent);\n border: var(--ok_border-accent);\n}\n~ .accent:hover {\n background: color-mix(in srgb, var(--ok_bg-accent) 90%, var(--ok_fg-accent));\n}\n~ button.accent.active {\n background: var(--ok_bg);\n}\n\n~ .muted {\n background: var(--ok_bg-muted);\n color: var(--ok_fg-muted);\n border: var(--ok_border-muted);\n}\n~ .muted:hover {\n background: color-mix(in srgb, var(--ok_bg-muted) 90%, var(--ok_fg-accent));\n}\n\n~ .secondary {\n background: var(--ok_bg-secondary);\n color: var(--ok_fg-secondary);\n border: var(--ok_border-secondary);\n}\n~ button.secondary.active {\n background: var(--ok_bg);\n}\n~ .secondary:hover {\n background: color-mix(in srgb, var(--ok_bg-secondary) 90%, black);\n}";function r(){var n=["3047168WWoiiJ","2105640WdBHtP","342NrgXEZ","932200fNsgdz","5515307YSzkNS","1982936TbgqSa","1kEjCWJ","3zcyLks","27910ryNcKE","4908936vlLTbN"];return(r=function(){return n})()}export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={"--ok_fg":{type:
|
|
1
|
+
function e(e,a){return e-=250,t()[e]}function t(){var e=["1024px","300","border","calc(var(--ok_space) * 2)","#e0f0ff","10934308qkqkwY","10BYgmjx","#666","1px solid #0055cc","string","var(--ok_space)","164NvISkz","#f5f5f5","1.5","152065OcINTE","3790887OXzTDg","1524131VePtkl","#007bff","number","Layout","36DZSuzG","Breakpoints","Typography","Effects","length","1px solid #ccc","768px","var(--ok_shadow-x) var(--ok_shadow-y) var(--ok_shadow-blur) var(--ok_shadow-spread) var(--ok_shadow-color)","color","400","574133NnNIeM","700","#fff","2BWmVRO","1rem","5360535KDDUkq","#000","States","#1565c0","var(--ok_font-size)","box-shadow","2921952AKgcAm","calc(var(--ok_font-size) * .75)","Colors",'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"calc(var(--ok_font-size) * .875)","#f8f8f8","rgba(0,0,0,0.1)","0px","calc(var(--ok_space) * 1.5)","#f9a825"];return(t=function(){return e})()}var a=e;!function(){for(var a=e,o=t();;)try{if(715792==-parseInt(a(268))/1+parseInt(a(271))/2*(parseInt(a(253))/3)+parseInt(a(300))/4*(-parseInt(a(252))/5)+-parseInt(a(258))/6*(-parseInt(a(254))/7)+parseInt(a(279))/8+parseInt(a(273))/9*(parseInt(a(295))/10)+-parseInt(a(294))/11)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();var o={"--ok_fg":{type:a(266),category:a(281),default:a(274)},"--ok_bg":{type:"color",category:a(281),default:a(270)},"--ok_border":{type:"border",category:"Colors",default:a(263)},"--ok_fg-accent":{type:a(266),category:a(281),default:a(255)},"--ok_bg-accent":{type:a(266),category:a(281),default:a(293)},"--ok_border-accent":{type:"border",category:a(281),default:a(297)},"--ok_fg-muted":{type:a(266),category:a(281),default:a(296)},"--ok_bg-muted":{type:a(266),category:a(281),default:a(250)},"--ok_border-muted":{type:a(291),category:a(281),default:"1px solid #ddd"},"--ok_fg-secondary":{type:"color",category:a(281),default:"#444"},"--ok_bg-secondary":{type:a(266),category:"Colors",default:a(284)},"--ok_border-secondary":{type:a(291),category:a(281),default:"1px solid #ccc"},"--ok_space":{type:a(262),category:a(257),default:"8px"},"--ok_space-xs":{type:a(262),category:a(257),default:"calc(var(--ok_space) * .5)"},"--ok_space-sm":{type:a(262),category:"Layout",default:"calc(var(--ok_space) * .75)"},"--ok_space-md":{type:"length",category:a(257),default:a(299)},"--ok_space-lg":{type:"length",category:a(257),default:a(287)},"--ok_space-xl":{type:a(262),category:a(257),default:a(292)},"--ok_shadow-x":{type:a(262),category:a(261),default:"0px"},"--ok_shadow-y":{type:a(262),category:a(261),default:"var(--ok_space-xs)"},"--ok_shadow-blur":{type:a(262),category:a(261),default:"var(--ok_space-sm)"},"--ok_shadow-spread":{type:a(262),category:a(261),default:a(286)},"--ok_shadow-color":{type:a(266),category:a(261),default:a(285)},"--ok_shadow":{type:a(278),category:a(261),default:a(265)},"--ok_shadow-strong":{type:"box-shadow",category:a(261),default:"var(--ok_shadow-x) calc(var(--ok_shadow-y) * 2) calc(var(--ok_shadow-blur) * 2) var(--ok_shadow-spread) var(--ok_shadow-color)"},"--ok_font-size":{type:a(262),category:a(257),default:a(272)},"--ok_size-xs":{type:"length",category:a(257),default:a(280)},"--ok_size-sm":{type:"length",category:a(257),default:a(283)},"--ok_size-md":{type:"length",category:a(257),default:a(277)},"--ok_size-lg":{type:a(262),category:a(257),default:"calc(var(--ok_font-size) * 1.25)"},"--ok_size-xl":{type:a(262),category:a(257),default:"calc(var(--ok_font-size) * 1.5)"},"--ok_font-family":{type:a(298),category:a(260),default:a(282)},"--ok_font-weight-light":{type:a(256),category:a(260),default:a(290)},"--ok_font-weight-regular":{type:"number",category:a(260),default:a(267)},"--ok_font-weight-bold":{type:"number",category:"Typography",default:a(269)},"--ok_line-height-base":{type:a(256),category:a(260),default:a(251)},"--ok_transition":{type:a(298),category:"Behavior",default:"0.2s ease"},"--ok_focus-ring":{type:a(298),category:"Behavior",default:"0 0 0 3px rgba(0, 123, 255, 0.5)"},"--ok_breakpoint-xs":{type:a(262),category:a(259),default:"0px"},"--ok_breakpoint-sm":{type:a(262),category:a(259),default:"480px"},"--ok_breakpoint-md":{type:a(262),category:a(259),default:a(264)},"--ok_breakpoint-lg":{type:"length",category:a(259),default:a(289)},"--ok_breakpoint-xl":{type:a(262),category:a(259),default:"1280px"},"--ok_success":{type:a(266),category:"States",default:"#2e7d32"},"--ok_error":{type:"color",category:a(275),default:"#c62828"},"--ok_warning":{type:a(266),category:a(275),default:a(288)},"--ok_info":{type:a(266),category:a(275),default:a(276)}};export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./ok-design-style.js";import t from"./ok-design-vars.js";import
|
|
1
|
+
import e from"./ok-design-style.js";import t from"./ok-design-vars.js";import n from"./blocks/ok-design-button.css.js";import s from"./blocks/ok-design-input.css.js";import r from"./ok-theme.ok.js";const o=a;function a(e,t){return e-=142,f()[e]}!function(){const e=a,t=f();for(;;)try{if(399482==parseInt(e(166))/1*(-parseInt(e(160))/2)+-parseInt(e(161))/3*(parseInt(e(151))/4)+parseInt(e(156))/5+-parseInt(e(163))/6*(-parseInt(e(158))/7)+-parseInt(e(150))/8*(parseInt(e(168))/9)+-parseInt(e(146))/10*(-parseInt(e(167))/11)+-parseInt(e(162))/12)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();let i=null;function p(e){const t=a;e[t(154)].$okDesignApplied||(e.$setInnerVars({$okDesignApplied:{get:()=>!0}}),e[t(148)][t(165)].theme._registerDef({tag:t(164),plugins:{theme:{define:{default:{"--ok_bg":t(145)},"default:hover":{"--ok_bg":"var(--ok_bg-accent)"}}}}}),e[t(148)][t(165)].theme.init(),e[t(149)][t(152)](t(159),""))}var c={tag:o(147),dependencies:[r],get style(){const t=o;return i||(i=[e,n,s].map(e=>e[t(155)]("~",t(153))).join("\n"),i)},plugins:{theme:{expose:t}},async prepareDep(e,t){const n=o,s=e[n(148)][n(143)].cache[n(157)](t.id);await e[n(148)][n(143)][n(142)](s,e),p(e)},prepare(e){p(e)},template:o(144)};function f(){const e=["replaceAll","3559730GxRyfj","get","56iefaXf","data-ok-design","8022jpSXny","3JDHwoR","5304600lTJHYn","453594sCiUlZ","button","shared","163RQAHHA","1639tHCoBR","16497HecGKF","activate","componentRegistry","<slot/>","var(--ok_bg-accent)","50090TysTva","ok-design","$ok","$el","136XmdpdQ","2146372KDDRsk","setAttribute",":where([data-ok-design])","$vars"];return(f=function(){return e})()}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function t(t,e){return t-=398,r()[t]}const e=t;!function(){const e=t,a=r();for(;;)try{if(586258==parseInt(e(421))/1*(parseInt(e(416))/2)+-parseInt(e(429))/3*(-parseInt(e(425))/4)+-parseInt(e(422))/5+parseInt(e(409))/6*(parseInt(e(430))/7)+parseInt(e(402))/8+-parseInt(e(434))/9+-parseInt(e(403))/10)break;a.push(a.shift())}catch(t){a.push(a.shift())}}();var a={tag:"ok-theme-editor-input",attr:{value:{},default:{},type:{default:"string"}},context:e=>({get defaultValue(){const a=t;return e[a(406)][a(404)]},get value(){const a=t;return e.$attr[a(426)]},get type(){const a=t;return e[a(406)][a(405)]},get isUsable(){const e=t,a=this[e(426)]??this[e(418)]??"";return""!==a&&a!==e(432)&&"inherit"!==a},get isOverridden(){const e=t;return void 0!==this[e(426)]&&this[e(426)]!==this[e(418)]},extractRGB(e=""){const a=t;if(!e||e===a(432)||e===a(433))return a(419);if(e.startsWith(a(400))){const t=e[a(399)](/rgba?\(([^)]+)\)/);if(t){const[e,r,i]=t[1][a(413)](",")[a(428)](0,3)[a(431)](t=>parseInt(t,10));return"#"+[e,r,i][a(431)](t=>(0|t).toString(16)[a(412)](2,"0"))[a(427)]("")}}if(e[a(398)]("#")){if(4===e[a(415)])return"#"+[...e[a(428)](1)].map(t=>t+t)[a(427)]("");if(5===e[a(415)])return"#"+[...e[a(428)](1,4)][a(431)](t=>t+t)[a(427)]("");if(7===e[a(415)])return e;if(9===e[a(415)])return e.slice(0,7)}return"#ffffff"},extractAlpha(e=""){const a=t;if(e.startsWith(a(411))){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const e=t[1].split(",").map(t=>t[a(414)]());return Math.max(0,Math[a(423)](1,parseFloat(e[3]??"1")))}}if(e[a(398)]("#")){if(9===e[a(415)])return parseInt(e[a(428)](7,9),16)/255;if(5===e[a(415)])return parseInt(e[4]+e[4],16)/255}return 1},updateAlpha(e,a){const r=t,i=Math[r(410)](0,Math[r(423)](1,+a||0));if(e[r(398)]("#"))return(7===e[r(415)]?e:this[r(408)](e))+Math[r(401)](255*i)[r(424)](16)[r(412)](2,"0");const o=e.match(/rgba?\(([^)]+)\)/);if(o){const[t,e,a]=o[1][r(413)](",")[r(428)](0,3)[r(431)](t=>parseInt(t,10));return"rgba("+t+", "+e+", "+a+", "+i+")"}return this[r(408)](e)+Math[r(401)](255*i)[r(424)](16).padStart(2,"0")},set(a){const r=t;e[r(417)](r(426),a??"")}}),template:e(420),style:e(407)};function r(){const t=["type","$attr","[tag] .ok-theme-editor__color-row,[tag] .ok-theme-editor__var-input{display:grid;grid-template-columns:1fr auto auto;gap:.5rem;align-items:center}[tag] .ok-theme-editor__color-row{grid-template-columns:42px 1fr}[tag] .ok-theme-editor__alpha{width:100%}[tag] .ok-theme-editor__color-box-wrapper{position:relative;width:42px;height:32px}[tag] .ok-theme-editor__color-box-wrapper input[type=color]{width:100%;height:100%;padding:0;border:0;background:0 0}[tag] .ok-theme-editor__color-box-wrapper--unset input[type=color]{outline:1px dashed #aaa;outline-offset:-2px}[tag] .ok-theme-editor__color-box-hint{position:absolute;inset:0;display:grid;place-items:center;color:#666;background:#fffa;font-weight:700;pointer-events:none}[tag] .ok-theme-editor__clear,[tag] .ok-theme-editor__reset{justify-self:end}","extractRGB","6241182bwrXDe","max","rgba","padStart","split","trim","length","11990lxAWWX","$dispatch","defaultValue","#ffffff",'<div class="ok-theme-editor__var-input"><switch :value="type"><case value="color"><div class="ok-theme-editor__color-row"><div class="ok-theme-editor__color-box-wrapper" :class="{ \'ok-theme-editor__color-box-wrapper--unset\': !isOverridden }"><input type="color" :value="extractRGB(value || defaultValue)" :title="isOverridden ? \'Overridden\' : \'Using default\'" @input="set(updateAlpha($event.target.value, extractAlpha(value || defaultValue)))"><if :="!isUsable"><span class="ok-theme-editor__color-box-hint">?</span></if></div><input class="ok-theme-editor__alpha" type="range" min="0" max="1" step="0.01" :value="extractAlpha(value || defaultValue)" :disabled="!isUsable" @input="set(updateAlpha(extractRGB(value || defaultValue), $event.target.value))"></div></case><case value="string"><input type="text" :value="value ?? \'\'" @input="set($event.target.value)"></case><case value="border"><textarea :value="value ?? \'\'" @input="set($event.target.value)"/></case><case value="box-shadow"><textarea :value="value ?? \'\'" @input="set($event.target.value)"/></case><default><textarea :value="value ?? \'\'" @input="set($event.target.value)"/></default></switch><button class="ok-theme-editor__reset" title="Reset to default" @click="$cmp.$dispatch(\'reset\')">Reset</button> <button class="ok-theme-editor__clear" title="Clear from current scope" @click="$cmp.$dispatch(\'clear\')">Clear</button></div>',"46SpemKB","417725Xptyui","min","toString","12636jloQis","value","join","slice","1017jAycHp","7RLCgSZ","map","revert","inherit","1380996RJGdPf","startsWith","match","rgb","round","4627360TBksVi","21420410hgDTTk","default"];return(r=function(){return t})()}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../../interaction/ok-hotkeys-service.ok.js";import t from"../../modals/ok-window.ok.js";import o from"./ok-theme-editor.ok.js";import r from"../../interaction/ok-picker-service.ok.js";
|
|
1
|
+
import e from"../../interaction/ok-hotkeys-service.ok.js";import t from"../../modals/ok-window.ok.js";import o from"./ok-theme-editor.ok.js";import r from"../../interaction/ok-picker-service.ok.js";function s(e,t){return e-=437,c()[e]}const n=s;!function(){const e=s,t=c();for(;;)try{if(796809==-parseInt(e(471))/1*(parseInt(e(468))/2)+-parseInt(e(442))/3*(parseInt(e(453))/4)+parseInt(e(452))/5*(parseInt(e(460))/6)+-parseInt(e(440))/7*(-parseInt(e(444))/8)+-parseInt(e(463))/9*(parseInt(e(475))/10)+-parseInt(e(486))/11+parseInt(e(474))/12)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();var i={tag:"ok-theme-editor-service",dependencies:[e,t,o,r],register(e,t){const o=s;e.shared[o(455)]={target:null,deepClone(e){const t=o;return e&&typeof e===t(481)?JSON[t(464)](JSON[t(462)](e)):e},deepMerge(e,t){const r=o;if(!t||typeof t!==r(481))return e;for(const o in t){const s=t[o];null===s?delete e[o]:typeof s!==r(481)||Array[r(441)](s)?e[o]=s:(e[o]=e[o]||{},this[r(443)](e[o],s))}return e},mergePreset(t,r){const s=o,n=e[s(446)][s(480)][s(469)][s(476)](t),i=this.deepClone(n||{define:{},components:{}});if(i.define=i[s(437)]||{},i.components=i[s(439)]||{},r?.[s(437)]&&this[s(443)](i.define,r[s(437)]),r?.components)for(const[e,t]of Object.entries(r[s(439)]))i[s(439)][e]=i[s(439)][e]||{},this[s(443)](i.components[e],t);if(0===Object[s(485)](i[s(437)])[s(470)]&&delete i[s(437)],i[s(439)]){for(const[e,t]of Object[s(438)](i[s(439)])){for(const[o,r]of Object[s(438)](t))0===Object[s(485)](r)[s(470)]&&delete i[s(439)][e][o];0===Object[s(485)](i[s(439)][e]).length&&delete i[s(439)][e]}0===Object[s(485)](i[s(439)])[s(470)]&&delete i[s(439)]}return i},getSavedPresets(){const e=o,t=[];for(let o=0;o<localStorage[e(470)];o++){const r=localStorage[e(461)](o);r.startsWith(e(482))&&t[e(457)](r[e(451)](e(482),""))}return t[e(484)]()},loadAllSavedPresets(){const t=o,r=this[t(454)]();for(const o of r){const r=localStorage[t(445)](t(482)+o);if(r)try{const s=JSON[t(464)](r);e[t(446)][t(480)][t(469)][t(477)](o,s)}catch(e){}}},async open(r=null){const s=o;this[s(472)]=r,this[s(466)](),await e[s(446)].layer.toggle(s(448),!0,{registration:t,tier:"window"})},async close(){const t=o;this[t(472)]=null,await e[t(446)].layer[t(478)]("ok-theme-editor-service",!1)}},e.config[o(473)]===o(459)&&e[o(446)][o(465)].register([o(479),"alt","t"],{description:o(467),keydown(t){const r=o;t[r(450)]||e[r(446)][r(449)].start({onPick:async t=>{const o=r;await e[o(446)][o(455)][o(447)](t)}})},keyup(){const t=o;e.shared[t(449)][t(483)]()}})},template:n(456)};function c(){const e=["keys","15826041moiEbZ","define","entries","components","1468488BmBjLh","isArray","102xNLFJq","deepMerge","16LsoUrO","getItem","shared","open","ok-theme-editor-service","picker","repeat","replace","4855mDzzCS","125508zKtSWu","getSavedPresets","themeEditor",'<ok-window no-portal @close="$ok.shared.themeEditor.close()"><ok-theme-editor :target="$ok.shared.themeEditor.target"/></ok-window>',"push","Failed to load preset ","dev","9438QvxyBh","key","stringify","6496488JYwtGO","parse","hotkeys","loadAllSavedPresets","Toggle theme editor","4yhPVrK","presets","length","658478uHGrJK","target","env","49392324loDAjD","20obtMtY","get","set","toggle","ctrl","theme","object","ok-theme-preset:","stop","sort"];return(c=function(){return e})()}export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var n="\n[tag] { display: block; }\n\n[tag] .ok-theme-editor__header {\n display: flex; align-items: center; justify-content: space-between;\n margin-bottom: var(--ok_margin, 1rem);\n}\n\n[tag] .ok-theme-editor__title {\n display: flex;\n align-items: center;\n gap: .5rem;\n}\n\n[tag] .ok-theme-editor__preset-name {\n color: var(--ok_fg-accent);\n font-weight: 600;\n}\n\n[tag] .ok-theme-editor__modified {\n color: var(--ok_fg-error, #f44);\n font-size: 1.5em;\n}\n\n[tag] .ok-theme-editor__actions { display: flex; gap: .5rem; }\n\n[tag] .ok-theme-editor__delete-btn {\n background: var(--ok_bg-error, #fee);\n color: var(--ok_fg-error, #c33);\n border-color: var(--ok_fg-error, #c33);\n}\n\n[tag] .ok-theme-editor__delete-btn:hover {\n background: var(--ok_fg-error, #c33);\n color: var(--ok_bg, white);\n}\n\n[tag] .ok-theme-editor__filter-bar {\n display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;\n margin: .75rem 0;\n min-width: 200px;\n padding: var(--ok_space-xs) var(--ok_space);\n border: var(--ok_border);\n border-radius: var(--ok_space-xs);\n background: var(--ok_bg);\n color: var(--ok_fg);\n font-size: inherit;\n cursor: pointer;\n}\n\n[tag] .ok-theme-editor__select {\n min-width: 200px;\n padding: var(--ok_space-xs) var(--ok_space);\n border: var(--ok_border);\n border-radius: var(--ok_space-xs);\n background: var(--ok_bg);\n color: var(--ok_fg);\n font-size: inherit;\n cursor: pointer;\n}\n\n[tag] .ok-theme-editor__select:focus {\n outline: 2px solid var(--ok_fg-accent);\n outline-offset: 2px;\n}\n\n[tag] .ok-theme-editor__info {\n padding: var(--ok_space);\n background: var(--ok_bg-accent);\n border-radius: var(--ok_space-xs);\n margin: var(--ok_space) 0;\n border-left: 3px solid var(--ok_fg-accent);\n}\n\n[tag] .ok-theme-editor__variant-label {\n color: var(--ok_fg-accent);\n font-weight: 600;\n}\n\n[tag] .ok-theme-editor__empty,\n[tag] .ok-theme-editor__empty-state {\n color: var(--ok_fg-muted);\n font-style: italic;\n padding: var(--ok_space);\n}\n\n[tag] .ok-theme-editor__empty-state {\n grid-column: 1 / -1;\n text-align: center;\n border: 1px dashed var(--ok_border);\n border-radius: var(--ok_space-xs);\n background: var(--ok_bg-muted);\n margin: var(--ok_space) 0;\n}\n\n[tag] .ok-theme-editor__grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n gap: var(--ok_space-sm);\n margin-top: 1rem;\n}\n\n[tag] .ok-theme-editor__var-card {\n border: var(--ok_border);\n border-radius: var(--ok_space-sm);\n background: var(--ok_bg-muted);\n box-shadow: var(--ok_shadow);\n padding: var(--ok_space);\n}\n\n[tag] .ok-theme-editor__var-head {\n display: flex;\n gap: .5rem;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: .5rem;\n}\n\n[tag] .ok-theme-editor__var-title {\n display: flex;\n flex-direction: column;\n gap: .25rem;\n flex: 1;\n}\n\n[tag] .ok-theme-editor__var-name {\n font-weight: 600;\n word-break: break-all;\n}\n\n[tag] .ok-theme-editor__var-source {\n font-size: var(--ok_size-xs);\n padding: 2px 6px;\n border-radius: var(--ok_space-xs);\n background: var(--ok_bg);\n width: fit-content;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n[tag] .ok-theme-editor__scope {\n display: inline-flex;\n gap: 2px;\n margin-left: 6px;\n vertical-align: middle;\n}\n\n[tag] .scope-btn {\n background: none;\n border: 1px solid var(--ok_border);\n border-radius: 3px;\n padding: 2px 6px;\n cursor: pointer;\n opacity: 0.5;\n transition: opacity 0.2s, background 0.2s;\n font-size: 12px;\n line-height: 1;\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: 2px;\n}\n\n[tag] .scope-btn .scope-check {\n font-size: 10px;\n color: var(--ok_fg-success, #4ade80);\n font-weight: bold;\n}\n\n[tag] .scope-btn.has-value {\n opacity: 0.8;\n border-color: var(--ok_fg-muted);\n}\n\n[tag] .scope-btn.active {\n opacity: 1;\n background: var(--ok_bg-accent);\n color: var(--ok_fg-accent);\n border-color: var(--ok_fg-accent);\n}\n\n[tag] .scope-btn.active .scope-check {\n color: var(--ok_fg-accent);\n}\n\n[tag] .scope-btn:hover:not(.active) {\n opacity: 0.7;\n}\n\n[tag] .ok-theme-editor__lock-icon-btn {\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n cursor: pointer;\n font-size: 0.85em;\n line-height: 1;\n opacity: 0.6;\n transition: opacity 0.2s ease;\n}\n\n[tag] .ok-theme-editor__lock-icon-btn:hover {\n opacity: 1;\n}\n\n[tag] .ok-theme-editor__input {\n width: 100%;\n}\n\n[tag] button.active {\n background: var(--ok_bg-accent);\n color: var(--ok_fg-accent);\n font-weight: 600;\n}\n";
|
|
1
|
+
function n(n,r){return n-=362,e()[n]}function e(){var n=["276sgwCal","\n[tag] { display: block; }\n\n[tag] .ok-theme-editor__header {\n display: flex; align-items: center; justify-content: space-between;\n margin-bottom: var(--ok_margin, 1rem);\n}\n\n[tag] .ok-theme-editor__title {\n display: flex;\n align-items: center;\n gap: .5rem;\n}\n\n[tag] .ok-theme-editor__preset-name {\n color: var(--ok_fg-accent);\n font-weight: 600;\n}\n\n[tag] .ok-theme-editor__modified {\n color: var(--ok_fg-error, #f44);\n font-size: 1.5em;\n}\n\n[tag] .ok-theme-editor__actions { display: flex; gap: .5rem; }\n\n[tag] .ok-theme-editor__delete-btn {\n background: var(--ok_bg-error, #fee);\n color: var(--ok_fg-error, #c33);\n border-color: var(--ok_fg-error, #c33);\n}\n\n[tag] .ok-theme-editor__delete-btn:hover {\n background: var(--ok_fg-error, #c33);\n color: var(--ok_bg, white);\n}\n\n[tag] .ok-theme-editor__filter-bar {\n display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;\n margin: .75rem 0;\n min-width: 200px;\n padding: var(--ok_space-xs) var(--ok_space);\n border: var(--ok_border);\n border-radius: var(--ok_space-xs);\n background: var(--ok_bg);\n color: var(--ok_fg);\n font-size: inherit;\n cursor: pointer;\n}\n\n[tag] .ok-theme-editor__select {\n min-width: 200px;\n padding: var(--ok_space-xs) var(--ok_space);\n border: var(--ok_border);\n border-radius: var(--ok_space-xs);\n background: var(--ok_bg);\n color: var(--ok_fg);\n font-size: inherit;\n cursor: pointer;\n}\n\n[tag] .ok-theme-editor__select:focus {\n outline: 2px solid var(--ok_fg-accent);\n outline-offset: 2px;\n}\n\n[tag] .ok-theme-editor__info {\n padding: var(--ok_space);\n background: var(--ok_bg-accent);\n border-radius: var(--ok_space-xs);\n margin: var(--ok_space) 0;\n border-left: 3px solid var(--ok_fg-accent);\n}\n\n[tag] .ok-theme-editor__variant-label {\n color: var(--ok_fg-accent);\n font-weight: 600;\n}\n\n[tag] .ok-theme-editor__empty,\n[tag] .ok-theme-editor__empty-state {\n color: var(--ok_fg-muted);\n font-style: italic;\n padding: var(--ok_space);\n}\n\n[tag] .ok-theme-editor__empty-state {\n grid-column: 1 / -1;\n text-align: center;\n border: 1px dashed var(--ok_border);\n border-radius: var(--ok_space-xs);\n background: var(--ok_bg-muted);\n margin: var(--ok_space) 0;\n}\n\n[tag] .ok-theme-editor__grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n gap: var(--ok_space-sm);\n margin-top: 1rem;\n}\n\n[tag] .ok-theme-editor__var-card {\n border: var(--ok_border);\n border-radius: var(--ok_space-sm);\n background: var(--ok_bg-muted);\n box-shadow: var(--ok_shadow);\n padding: var(--ok_space);\n}\n\n[tag] .ok-theme-editor__var-head {\n display: flex;\n gap: .5rem;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: .5rem;\n}\n\n[tag] .ok-theme-editor__var-title {\n display: flex;\n flex-direction: column;\n gap: .25rem;\n flex: 1;\n}\n\n[tag] .ok-theme-editor__var-name {\n font-weight: 600;\n word-break: break-all;\n}\n\n[tag] .ok-theme-editor__var-source {\n font-size: var(--ok_size-xs);\n padding: 2px 6px;\n border-radius: var(--ok_space-xs);\n background: var(--ok_bg);\n width: fit-content;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n[tag] .ok-theme-editor__scope {\n display: inline-flex;\n gap: 2px;\n margin-left: 6px;\n vertical-align: middle;\n}\n\n[tag] .scope-btn {\n background: none;\n border: 1px solid var(--ok_border);\n border-radius: 3px;\n padding: 2px 6px;\n cursor: pointer;\n opacity: 0.5;\n transition: opacity 0.2s, background 0.2s;\n font-size: 12px;\n line-height: 1;\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: 2px;\n}\n\n[tag] .scope-btn .scope-check {\n font-size: 10px;\n color: var(--ok_fg-success, #4ade80);\n font-weight: bold;\n}\n\n[tag] .scope-btn.has-value {\n opacity: 0.8;\n border-color: var(--ok_fg-muted);\n}\n\n[tag] .scope-btn.active {\n opacity: 1;\n background: var(--ok_bg-accent);\n color: var(--ok_fg-accent);\n border-color: var(--ok_fg-accent);\n}\n\n[tag] .scope-btn.active .scope-check {\n color: var(--ok_fg-accent);\n}\n\n[tag] .scope-btn:hover:not(.active) {\n opacity: 0.7;\n}\n\n[tag] .ok-theme-editor__lock-icon-btn {\n padding: 0;\n margin: 0;\n border: none;\n background: none;\n cursor: pointer;\n font-size: 0.85em;\n line-height: 1;\n opacity: 0.6;\n transition: opacity 0.2s ease;\n}\n\n[tag] .ok-theme-editor__lock-icon-btn:hover {\n opacity: 1;\n}\n\n[tag] .ok-theme-editor__input {\n width: 100%;\n}\n\n[tag] button.active {\n background: var(--ok_bg-accent);\n color: var(--ok_fg-accent);\n font-weight: 600;\n}\n","35244510udHWcH","32872IOXaCm","75673JQDaJI","17896ciIWPN","8aSxbiF","1253kUdGfw","4654872OGGdkf","4126584YEdHJb","2397405fOOdha"];return(e=function(){return n})()}var r=n;!function(){for(var r=n,o=e();;)try{if(390187==parseInt(r(372))/1*(-parseInt(r(363))/2)+-parseInt(r(368))/3*(parseInt(r(362))/4)+-parseInt(r(367))/5+-parseInt(r(366))/6+parseInt(r(364))/7*(-parseInt(r(371))/8)+-parseInt(r(365))/9+parseInt(r(370))/10)break;o.push(o.shift())}catch(n){o.push(o.shift())}}();var o=r(369);export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e
|
|
1
|
+
const e=t;function t(e,t){return e-=132,f()[e]}function n(e,o=new Set){const r=t;if(Array[r(184)](e))for(let t of e)n(t,o);else if(e instanceof HTMLStyleElement)n(e[r(188)],o);else if(typeof e===r(159))for(let t of e[r(134)](/var\(\s*(--[\w-]+)\s*(?:,[^)]+)?\)/g))o[r(182)](t[1]);return o}function o(e,o,r={}){const s=t,i=n(o.style);for(let t of i)if(!e[t]){const n=e[t]?{...e[t]}:{ghost:!0,component:s(175),default:"",values:{}};n[s(176)][o[s(168)]]??={},n[s(176)][o[s(168)]][s(153)]="",(n[s(170)]??=[])[s(145)](o[s(168)]),r[t]=n}}function r(e,n,r={}){o(e,n,r),function(e,n,o={}){const r=t,s=n?.plugins?.[r(155)]?.[r(178)];if(s)for(const t of Object[r(150)](s))for(const i of Object[r(150)](s[t])){if(e[i]&&(void 0!==e[i][r(176)]?.[n[r(168)]]?.[t]||e[i][r(152)]===n[r(168)]))continue;const c=e[i]?{...e[i]}:{ghost:!0,component:r(175),default:"",values:{}};c[r(176)][n[r(168)]]??={},c[r(176)][n[r(168)]][t]=s[t][i]||"",(c[r(172)]??=[])[r(145)](n[r(168)]),o[i]=c}}(e,n,r)}!function(){const e=t,n=f();for(;;)try{if(628488==parseInt(e(140))/1*(-parseInt(e(137))/2)+-parseInt(e(158))/3*(-parseInt(e(183))/4)+-parseInt(e(144))/5*(-parseInt(e(162))/6)+parseInt(e(165))/7*(-parseInt(e(171))/8)+-parseInt(e(149))/9*(-parseInt(e(191))/10)+parseInt(e(147))/11*(parseInt(e(187))/12)+-parseInt(e(141))/13*(parseInt(e(132))/14))break;n.push(n.shift())}catch(e){n.push(n.shift())}}();const s=t=>e(146)+t,i=(t,n,o)=>"c|"+t+"|"+(n||e(153))+"|"+o,c=e=>e.startsWith("g|"),a=t=>t[e(190)]("c|"),u=t=>{const n=e,[o,r,s,i]=t[n(151)]("|");return{scope:n("g"===o?143:152),component:"-"!==r?r:null,variant:"-"!==s?s:null,var:i}};function l(t){const n=e,o={},r={};for(const[e,s]of t){if(null===s)continue;const{scope:t,component:i,variant:c,var:a}=u(e);t===n(143)?o[a]=s:(r[i]??={},r[i][c||n(153)]??={},r[i][c||n(153)][a]=s)}return{define:o,components:r}}function f(){const e=["split","component","default","entries","theme","meta","body","1050jgSskp","string","setAttribute","preset","6292554wBhDKG","live","get","770WGnjrp","length",'[data-ok-theme="',"tag",'style[data-ok-theme-editor-style="',"styleOrigin","43024EEqPZg","defineOrigin","components","/* @ok-theme-editor: ","__ghost__","values","style","define","removeChild","createElement","data-ok-theme-editor","add","2464HWfkci","isArray","set",'[data-ok-theme-editor="',"138444DjviMh","innerHTML",'"][data-ok-theme-editor="',"startsWith","2800kdPgdh","28PaQnEM","data-ok-theme-editor-style","matchAll","join","head","771142JjdBak",'[data-ok-variant="',"value","3HhdaxW","6441214XZkqeq","parentNode","global","5lZvhXU","push","g|-|-|","814nkqbQB","appendChild","40167OXmANe","keys"];return(f=function(){return e})()}function p({meta:t,ghostsMeta:n,live:o,preset:r,selectedComponent:c,selectedVariant:a,varName:u,scope:l,mode:f=e(139)}){const p=e;l??=a!==p(153)||c?p(152):p(143);const d=t[u]||n[u];if(l===p(152)){if(a!==p(153)){const e=o[p(164)](i(c,a,u));if(f===p(153));else if(null!=e)return{value:e,source:{scope:l,origin:"live",variant:a,key:u,component:c}};if(null!==e){const e=r?.[p(173)]?.[c]?.[a]?.[u];if(void 0!==e)return{value:e,source:{scope:l,origin:p(161),variant:a,key:u,component:c,preset:r}}}}const e=o[p(164)](i(c,p(153),u));if(f===p(153)&&a===p(153));else if(null!=e)return{value:e,source:{scope:l,origin:p(163),variant:p(153),key:u,component:c}};if(null!==e){const e=r?.[p(173)]?.[c]?.[p(153)]?.[u];if(void 0!==e)return{value:e,source:{scope:l,origin:p(161),variant:p(153),key:u,component:c,preset:r}}}if(a!==p(153)){const e=o.get(s(u));if(null!=e)return{value:e,source:{scope:p(143),origin:p(163),key:u,component:c}}}const t=d?.[p(176)][c]?.[p(153)];if(void 0!==t)return{value:t,source:{scope:l,origin:"meta",variant:"default",key:u,component:c}};if("default"!==a){const e=d?.values[c]?.[a];if(null!=e)return{value:e,source:{scope:l,origin:p(156),variant:a,key:u,component:c}}}}const m=o[p(164)](s(u));if(f===p(153)&&l===p(143));else if(null!=m)return{value:m,source:{scope:"global",origin:p(163),key:u,component:t.component}};if(null!==m){const e=r?.[p(178)]?.[u];if(void 0!==e)return{value:e,source:{scope:"global",origin:p(161),key:u,component:t[p(152)],preset:r}}}return{value:d?.[p(153)]??"",source:{scope:p(143),origin:p(156),key:u,component:t.component}}}function d(t=document[e(157)]){const n=e;let o=t;for(;o&&o[n(142)];){if(o.parentNode instanceof ShadowRoot)return o[n(142)];if(o[n(142)]instanceof Document)return o[n(142)];o=o.parentNode}return document}function m(t,n){const o=e,r=d(t),s=r.body||r;s.setAttribute(o(181),String(n));const i=s;let c=i.querySelector(o(169)+n+'"]');return!c&&(c=r[o(180)]?r[o(180)](o(177)):document[o(180)]("style"),c[o(160)](o(133),String(n)),i[o(148)](c)),c}function v(t,n){const o=e,r=d(t),s=r[o(136)]||r.querySelector(o(136))||r,i=r[o(157)]||r;i.removeAttribute("data-ok-theme-editor");const c=s||i,a=c.querySelector(o(169)+n+'"]');a&&c[o(179)](a)}function h({live:t,themeAttr:n,editorId:o}){const r=e,s=[],i=[];for(const[e,n]of t)null!==n&&c(e)&&i[r(145)]([u(e).var,n]);if(i[r(166)]){s[r(145)]("/* @ok-theme-editor: live define */");const e=n?r(167)+n+r(189)+o+'"]':r(186)+o+'"]';s[r(145)](e+" {");for(const[e,t]of i)s.push(" "+e+": "+t+";");s[r(145)]("}\n")}const l=new Map;for(const[e,n]of t){if(null===n||!a(e))continue;const{component:t,variant:o,var:s}=u(e),i=t+"|"+(o||r(153));(l[r(164)](i)??l[r(185)](i,[]).get(i)).push([s,n])}for(const[e,t]of l){const[i,c]=e.split("|"),[a,u]=c.split(":"),l=i+(u?":"+u:"")+(a!==r(153)?r(138)+a+'"]':"");s[r(145)](r(174)+i+" ("+c+") */");const f=(n?r(167)+n+'"][data-ok-theme-editor="'+o+'"]':'[data-ok-theme-editor="'+o+'"]')+" "+l;s.push(f+" {");for(const[e,n]of t)s.push(" "+e+": "+n+";");s[r(145)]("}\n")}return s[r(135)]("\n")}export{m as ensureOverlay,r as extractGhosts,d as getOverlayHost,a as isC,c as isG,i as keyC,s as keyG,u as pkey,v as removeOverlay,h as renderOverlayCSS,p as resolveValueFull,l as unflattenLive};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./ok-theme-editor-input.ok.js";import{keyG as t,keyC as s,resolveValueFull as
|
|
1
|
+
import e from"./ok-theme-editor-input.ok.js";import{keyG as t,keyC as s,resolveValueFull as n}from"./ok-theme-editor-utils.js";function a(){const e=["177PlBznS","π’ ","source","deleteLive","π Modified (global)","24Mhglzp","2798hBoMvk","setLive","ghostsMeta","type","1099870guovWb","meta","getPreset","selectedVariant","isLive","defaultValue","scope","origin","has"," (global)","default","5016179fNIQHj","currentPresetName","live","isDefaultVariant","resolvedDefault","hasPresetHere","variable","6TNYZqK",'\n <div class="ok-theme-editor__var-card">\n <div class="ok-theme-editor__var-head">\n <div class="ok-theme-editor__var-title">\n <strong class="ok-theme-editor__var-name">{{ varName }}</strong>\n\n <if :="isDefaultVariant">\n <span class="ok-theme-editor__scope">\n <button class="scope-btn"\n :class="{ active: activeScope===\'global\', \'has-value\': hasValueIn(\'global\') }"\n @click="toggleScope(\'global\')" title="Edit global">\n π<if :="hasValueIn(\'global\')"><span class="scope-check">β</span></if>\n </button>\n <button class="scope-btn"\n :class="{ active: activeScope===\'component\', \'has-value\': hasValueIn(\'component\') }"\n @click="toggleScope(\'component\')" title="Edit component">\n π§©<if :="hasValueIn(\'component\')"><span class="scope-check">β</span></if>\n </button>\n </span>\n </if>\n\n <span class="ok-theme-editor__var-source">\n {{ formattedSource }}\n <if :="isLockable && !isLocked">\n <button class="ok-theme-editor__lock-icon-btn" @click="lock" title="Lock current value">π</button>\n </if>\n </span>\n </div>\n <span class="ok-theme-editor__var-meta">{{ category }}</span>\n </div>\n\n <ok-theme-editor-input\n class="ok-theme-editor__input"\n :type="type"\n :value="value"\n :default="defaultValue"\n @value="setValue($event.detail)"\n @reset="reset"\n @clear="clear">\n </ok-theme-editor-input>\n </div>',"global","variant","412181QcKVci","ok-theme-editor-variable","π΅ Preset (global)","118CByMfZ","get","π Modified (","activeScope","scopeOverride","Unknown source","3393767TmlBfY","7844XZETmJ","delete","$memo","2215425TwjuVR","component","value","112VEbuPf","define","45QPEIkV","varName","selectedComponent","8Urnyrn","resolved"];return(a=function(){return e})()}function i(e,t){return e-=106,a()[e]}const o=i;!function(){const e=i,t=a();for(;;)try{if(404414==-parseInt(e(159))/1*(parseInt(e(130))/2)+-parseInt(e(124))/3*(-parseInt(e(111))/4)+parseInt(e(114))/5*(-parseInt(e(152))/6)+-parseInt(e(145))/7*(parseInt(e(122))/8)+-parseInt(e(119))/9*(parseInt(e(134))/10)+-parseInt(e(156))/11*(-parseInt(e(129))/12)+-parseInt(e(110))/13*(-parseInt(e(117))/14))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();var r={tag:o(157),dependencies:[e],attr:{vm:{type:"object",required:!0},variable:{type:"string",required:!0}},context:e=>({scopeOverride:null,get vm(){return e.$attr.vm},get varName(){const t=i;return e.$attr[t(151)]},get meta(){const e=i;return this.vm[e(135)][this.varName]||this.vm[e(132)][this[e(120)]]||{}},get category(){return this[i(135)].category||"General"},get type(){const e=i;return this[e(135)][e(133)]||"string"},get isDefaultVariant(){const e=i;return!this.vm[e(137)]||this.vm[e(137)]===e(144)},get activeScope(){const e=i;return this[e(148)]?this[e(108)]||e(115):"component"},get resolved(){const t=i;return e.$memo(()=>n({meta:this.vm.meta,ghostsMeta:this.vm[t(132)],live:this.vm[t(147)],preset:this.vm[t(136)](),selectedComponent:this.vm.selectedComponent,selectedVariant:this.vm[t(137)]||t(144),varName:this.varName,scope:this.activeScope,mode:t(116)}))[t(116)]},get resolvedDefault(){const t=i;return e[t(113)](()=>n({meta:this.vm[t(135)],ghostsMeta:this.vm[t(132)],live:this.vm[t(147)],preset:this.vm.getPreset(),selectedComponent:this.vm[t(121)],selectedVariant:this.vm[t(137)]||t(144),varName:this.varName,scope:this[t(107)],mode:t(144)}))[t(116)]},get value(){const e=i;return this[e(123)][e(116)]},get defaultValue(){const e=i;return this[e(149)][e(116)]},get source(){const e=i;return this.resolved[e(126)]},get formattedSource(){const e=i,t=this[e(126)];switch(t[e(140)]){case e(154):switch(t[e(141)]){case e(147):return e(128);case"preset":return e(158);default:return e(125)+this.meta[e(115)]+e(143)}case"component":switch(t[e(141)]){case e(147):return e(106)+t.variant+")";case"preset":return"π΅ "+this.vm[e(146)]+" ("+t.variant+")";case"meta":return"π’ "+t.component+" ("+t[e(155)]+")"}default:return e(109)}},get isLive(){const e=i;return this.source[e(141)]===e(147)},get isLockable(){const e=i;return!this[e(138)]||this.source[e(155)]!==this.vm[e(137)]||this[e(126)][e(115)]!==this.vm[e(121)]},get isLocked(){return this[i(138)]},get hasPresetHere(){const e=i,t=this.vm[e(136)]();if(!t)return!1;if("global"===this[e(107)])return void 0!==t[e(118)]?.[this[e(120)]];{const s=this.vm.selectedVariant||e(144);return void 0!==t.components?.[this.vm[e(121)]]?.[s]?.[this[e(120)]]}},toggleScope(e){this[i(108)]=e},hasValueIn(e){const n=i,a=this.vm.selectedVariant||n(144),o="global"===e?t(this.varName):s(this.vm[n(121)],a,this[n(120)]);if(this.vm.live[n(142)](o)){if(null!=this.vm.live[n(160)](o))return!0}const r=this.vm[n(136)]();return!!r&&(e===n(154)?void 0!==r[n(118)]?.[this.varName]:void 0!==r.components?.[this.vm[n(121)]]?.[a]?.[this[n(120)]])},setValue(e){const t=i;void 0===e||""===e||e===this[t(139)]?this.deleteLive():this[t(131)](e)},reset(){this[i(127)]()},clear(){const e=i;this[e(150)]?this[e(131)](null):this[e(127)]()},lock(){const e=i;this[e(131)](this[e(116)])},setLive(e){const n=i,a=this.vm[n(137)]||n(144),o="global"===this.activeScope?t(this.varName):s(this.vm.selectedComponent,a,this[n(120)]);void 0===e?this.vm[n(147)][n(112)](o):this.vm[n(147)].set(o,e),this.vm.updateStyle()},deleteLive(){const e=i,n=this.vm[e(137)]||e(144),a="global"===this[e(107)]?t(this[e(120)]):s(this.vm.selectedComponent,n,this.varName);this.vm[e(147)][e(112)](a),this.vm.updateStyle()}}),template:o(153)};export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{removeOverlay as e,ensureOverlay as t,extractGhosts as
|
|
1
|
+
import{removeOverlay as e,ensureOverlay as t,extractGhosts as r,renderOverlayCSS as s,unflattenLive as n,pkey as o,getOverlayHost as a}from"./ok-theme-editor-utils.js";const c=m;function l(){const e=["-copy","click","activateBusy","389898QrqVbW","variant","1310sbwEnp",'" loaded',"setItem","define","Export Preset","2568CIfBOe","General","size","object","parse","basePresetName","Cannot start with dash","$el","revokeObjectURL","modal","isDOMPreset","cache","shared","theme","confirm","get","2654644nstzdD","selectedPreset","target","live","createObjectURL","has","category","startsWith","mergePreset","Preset exported as ","themeEditor","config","selectedComponent","data-ok-theme-editor","getThemeAttr","Cannot save: not a local preset or no modifications","meta","Failed to load preset: ","forEach",".json","body",'Delete preset "',"data-ok-theme","host","498064XgjVgO",'" saved',"removeAttribute","Name too long (max 50 chars)","set","getSavedPresets","2496RWjAtM","clear","init","my-theme","dom","scope","toast","plugins","closest","keys","Cannot delete built-in presets","presets","56885pPOTxa","component","filename","setAttribute","$ok","237awfdeC","success","selectedCategory",'Preset "',"getItem","raw","ghostsMeta","href","warn","add","local","selectedVariant","overrideStyle","prompt","$memo",'Preset saved as "',"removeItem","entries","ready","sort","_savedPresetsVersion","value","isModified","stringify","$attr","length","filter","3394120LDFGYQ","values","isLocalPreset","updateStyle","__ghost__","remove","getAttribute","preset-name","default","basePresetSource","-copy-","componentRegistry","ok-theme-preset:"];return(l=function(){return e})()}!function(){const e=m,t=l();for(;;)try{if(392535==parseInt(e(263))/1+parseInt(e(251))/2*(parseInt(e(268))/3)+parseInt(e(221))/4+-parseInt(e(200))/5*(-parseInt(e(205))/6)+-parseInt(e(245))/7+-parseInt(e(295))/8+-parseInt(e(198))/9)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();const i=c(243),u=c(234);let d=0;function m(e,t){return e-=184,l()[e]}function g(l){const g=c,f=++d,p=l[g(267)].proxy({id:f,overrideStyle:null,ghostsMeta:{},live:new Map,selectedPreset:null,basePresetName:null,basePresetSource:null,selectedComponent:null,selectedVariant:g(190),selectedCategory:null,_savedPresetsVersion:0,activateBusy:!1}),P=l.$ok[g(217)][g(218)],v=l[g(267)][g(217)][g(231)],b=l[g(267)][g(217)][g(257)],y=l[g(267)][g(217)][g(214)],h={id:f,get target(){return l[g(282)](()=>{const e=g;return l[e(292)][e(223)]?"string"==typeof l[e(292)].target?l[e(212)][e(259)](l[e(292)][e(223)]):l[e(292)].target:l.$ok[e(232)].body})[g(289)]},get host(){return a(this[g(223)])},get overrideStyle(){return p[g(280)]},get meta(){const e=g;return l[e(267)][e(217)][e(218)][e(237)]},get ghostsMeta(){return p[g(274)]},get live(){return p[g(224)]},get selectedPreset(){return p.selectedPreset},get basePresetName(){return p[g(210)]},get currentPresetName(){return p[g(210)]},get basePresetSource(){return p[g(191)]},get selectedComponent(){return p[g(233)]},set selectedComponent(e){p.selectedComponent=e},get selectedVariant(){return p[g(279)]},set selectedVariant(e){p[g(279)]=e},get selectedCategory(){return p[g(270)]},set selectedCategory(e){p[g(270)]=e},get isModified(){const e=g;return p[e(224)][e(207)]>0},get isDOMPreset(){const e=g;return p[e(191)]===e(255)},get isLocalPreset(){return"local"===p[g(191)]},get canSave(){const e=g;return h[e(184)]&&h[e(290)]&&!!h.basePresetName},get canDelete(){return h[g(184)]&&!!h.basePresetName},get activateBusy(){return p[g(197)]},get presets(){const e=g;p._savedPresetsVersion;const t=[...P[e(262)][e(260)]()],r=new Set(v[e(250)]());return t[e(294)](t=>!r[e(226)](t)).sort()},get savedPresets(){const e=g;return p[e(288)],v[e(250)]()},get components(){const e=g,t=new Set;for(const r of Object[e(296)](h.meta)){t[e(277)](r[e(264)]||e(186));for(const[s,n]of Object[e(285)](r[e(296)]||{}))t[e(277)](s)}for(const r of Object[e(296)](p[e(274)])){t.add(r[e(264)]||"__ghost__");for(const[s,n]of Object.entries(r[e(296)]||{}))t[e(277)](s)}return[...t][e(287)]()},get variants(){const e=g,t=p[e(233)];if(!t)return["default"];const r=new Set(["default"]);for(const s of l.$ok[e(193)][e(216)][e(296)]()){const n=s[e(286)]||s.raw;if(n?.tag!==t)continue;const o=n?.[e(258)]?.[e(218)]?.[e(203)];o&&typeof o===e(208)&&Object.keys(o)[e(239)](t=>r[e(277)](t))}if(p.basePresetName){const s=P[e(262)][e(220)](p[e(210)]),n=s?.components?.[t];n&&Object[e(260)](n)[e(239)](t=>r[e(277)](t))}for(const s of p[e(224)][e(260)]()){const n=o(s);n[e(256)]===e(264)&&n[e(264)]===t&&r[e(277)](n[e(199)]||"default")}return[...r].sort()},get categories(){const e=g,t=p.selectedComponent;if(!t)return[];const r=new Set;for(const s of Object[e(296)](h[e(237)]))s[e(264)]===t&&r[e(277)](s.category||e(206));for(const s of Object[e(296)](p[e(274)]))s[e(264)]===t&&r[e(277)](s[e(227)]||e(206));return[...r][e(287)]()},get variables(){const e=g,t=p[e(233)],r=p[e(270)];if(!t)return[];const s=new Set;for(const[n,o]of Object[e(285)](h[e(237)]))o[e(264)]===t&&(r&&o[e(227)]!==r||s[e(277)](n));for(const[n,o]of Object[e(285)](h.meta))o[e(264)]!==t&&o[e(296)]?.[t]&&(r&&o[e(227)]!==r||s[e(277)](n));for(const[n,o]of Object[e(285)](p[e(274)]))o[e(296)]&&t in o[e(296)]&&(r&&o[e(227)]!==r||s.add(n));return[...s][e(287)]()},getPreset:()=>function(){const e=g,t=p[e(210)];return t?P[e(262)][e(220)](t):null}(),getThemeAttr(){const e=g;return h[e(244)][e(241)][e(188)](i)},selectPreset(e){const t=g,r=!e||e===p[t(222)];p[t(222)]=r?null:e,p[t(222)]?P[t(262)][t(220)](p.selectedPreset)&&(p[t(210)]=p[t(222)],p[t(191)]="dom",p[t(224)].clear(),h[t(244)][t(241)][t(266)](i,p[t(222)])):(p[t(210)]=null,p[t(191)]=null,p[t(224)][t(252)](),h.host.body[t(247)](i)),h.updateStyle()},selectComponent(e){const t=g;p[t(233)]=e,p[t(279)]=t(190),p[t(270)]=null},async loadSavedPreset(e){const t=g,r=localStorage[t(272)](t(194)+e);if(r)try{const s=JSON[t(209)](r);P.presets[t(249)](e,s),p.basePresetName=e,p[t(191)]=t(278),p.selectedPreset=null,p.live[t(252)](),h[t(244)][t(241)][t(266)](i,e),h[t(185)](),p._savedPresetsVersion++,b?.[t(269)]?.(t(271)+e+t(201))}catch(e){b?.error?.(t(238)+e.message)}},async savePreset(){const e=g;if(!h.isLocalPreset||!h[e(290)]||!h[e(210)])return;const t=v.mergePreset(p[e(210)],n(p.live));localStorage[e(202)](e(194)+p.basePresetName,JSON.stringify(t,null,2)),P[e(262)][e(249)](p[e(210)],t),p[e(224)][e(252)](),h.updateStyle(),p._savedPresetsVersion++,b?.success?.(e(271)+p.basePresetName+e(246))},async saveAsPreset(){const e=g,t=(()=>{const e=m;if(h[e(184)]&&h[e(210)])return h.basePresetName;if(h[e(215)]&&h.basePresetName){const t=new Set(v[e(250)]()),r=h[e(210)];let s=r+e(195),n=2;for(;t[e(226)](s);)s=r+e(192)+n++;return s}return e(254)})(),r=await(y.prompt?.("",{value:t,required:!0,canDrag:!0,placeholder:e(189),title:"Save Preset As",pattern:/^[a-zA-Z0-9-_]+$/,validate(t){const r=e;return t[r(228)]("-")?r(211):!(t[r(293)]>50)||r(248)}}));if(!r)return;const s=v.mergePreset(p[e(210)],n(p[e(224)]));localStorage.setItem(e(194)+r,JSON[e(291)](s,null,2)),P.presets[e(249)](r,s),p.basePresetName=r,p[e(191)]=e(278),p.selectedPreset=null,p[e(224)].clear(),h.host[e(241)][e(266)](i,r),h[e(185)](),p._savedPresetsVersion++,b?.[e(269)]?.(e(283)+r+'"')},async deletePreset(){const e=g,t=p[e(210)];t&&(new Set(v.getSavedPresets())[e(226)](t)?await(y[e(219)]?.(e(242)+t+'"?',{title:"Delete Preset",canDrag:!0}))&&(localStorage[e(284)]("ok-theme-preset:"+t),P[e(262)].delete(t),p.basePresetName=null,p[e(191)]=null,p[e(222)]=null,p[e(224)].clear(),h.host[e(241)].removeAttribute(i),h.updateStyle(),p[e(288)]++,b?.[e(269)]?.('Preset "'+t+'" deleted')):b?.error?.(e(261)))},async exportPreset(){const e=g,t=await(y[e(281)]?.("",{value:p.basePresetName||"theme-preset",required:!0,canDrag:!0,placeholder:e(265),title:e(204),pattern:/^[a-zA-Z0-9-_]+$/,validate(t){const r=e;return t[r(228)]("-")?"Cannot start with dash":!(t[r(293)]>50)||r(248)}}));if(!t)return;const r=v[e(229)](p[e(210)],n(p[e(224)])),s=new Blob([JSON.stringify(r,null,2)],{type:"application/json"}),o=URL[e(225)](s),a=document.createElement("a");a[e(275)]=o,a.download=t+e(240),a[e(196)](),URL[e(213)](o),b?.[e(269)]?.(e(230)+t+e(240))},updateStyle(){const e=g;(function(){const e=g;return p[e(280)]||=t(h[e(223)],f)}()).textContent=s({live:p[e(224)],themeAttr:h[e(235)](),editorId:f})},async activateAll(){const e=g;p[e(197)]=!0;for(const t of[...l[e(267)][e(193)].cache[e(296)]()])await l[e(267)][e(193)][e(253)](t),r(h.meta,t[e(273)],p[e(274)]);p.activateBusy=!1},init(){const e=g;!p[e(280)]&&(p[e(280)]=t(h[e(244)],f),h.host.body.setAttribute(u,String(f))),h[e(185)]()},removeOverlay(){const t=g;p.overrideStyle?.[t(187)](),e(h[t(244)],f)}};return h}export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./ok-theme-editor-input.ok.js";import t from"./ok-theme-editor-variable.ok.js";import n from"../ok-design.ok.js";import s from"./ok-theme-editor-vm.js";import a from"./ok-theme-editor-style.js";var o={
|
|
1
|
+
import e from"./ok-theme-editor-input.ok.js";import t from"./ok-theme-editor-variable.ok.js";import n from"../ok-design.ok.js";import s from"./ok-theme-editor-vm.js";import a from"./ok-theme-editor-style.js";var o=i;function r(){var e=["384378UBGvNC","theme","ok-theme-editor","6gTRwJS","removeOverlay","$ok","585ldIsCz","6230050yAQiZL","29152167BEpDbz","4207427bIRmmk","24lPhUlI","proxyInstance","29708rARSai","notify","meta","1395414CxGuOe","568670yhiOOZ","18pLTwkv"];return(r=function(){return e})()}function i(e,t){return e-=442,r()[e]}!function(){for(var e=i,t=r();;)try{if(699494==parseInt(e(457))/1+-parseInt(e(458))/2*(-parseInt(e(459))/3)+parseInt(e(453))/4*(parseInt(e(447))/5)+parseInt(e(444))/6*(parseInt(e(450))/7)+-parseInt(e(451))/8*(parseInt(e(456))/9)+parseInt(e(448))/10+-parseInt(e(449))/11)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();var l={tag:o(443),dependencies:[n,e,t],attr:{target:{}},context:e=>s(e),mount(e){var t=o;e.$observe(e[t(446)].shared[t(442)].meta,null,()=>{var n=t;e.$ok[n(452)][n(454)](()=>e.$ok.shared[n(442)][n(455)])}),this.init()},unmount(e){this[o(445)]()},template:'<div class="ok-theme-editor">\n <div class="ok-theme-editor__header"><strong class="ok-theme-editor__title"> Theme Editor\n <if :="currentPresetName && basePresetSource === \'local\'"><span class="ok-theme-editor__preset-name">[{{ currentPresetName }}]</span>\n </if>\n <if :="currentPresetName && basePresetSource === \'dom\'"><span class="ok-theme-editor__preset-name">[π {{ currentPresetName }}]</span>\n </if>\n <if :="isModified"><span class="ok-theme-editor__modified" title="You have unsaved changes">*</span></if>\n </strong>\n <div class="ok-theme-editor__actions">\n <if :="canSave">\n <button @click="savePreset" title="Save changes to current preset">πΎ Save</button>\n </if>\n <if :="!canSave && isDOMPreset">\n <button disabled title="Built-in presets can\'t be modified. Use Save Asβ¦ to create a copy">πΎ Save</button>\n </if>\n <button @click="saveAsPreset" title="Save as new preset">πΎ Save As...</button>\n <if :="canDelete">\n <button @click="deletePreset" class="ok-theme-editor__delete-btn" title="Delete this preset">ποΈ Delete\n </button>\n </if>\n <button @click="exportPreset" title="Export preset as JSON file">π₯ Export</button>\n <button @click="activateAll" :disabled="activateBusy">{{ activateBusy ? \'Activatingβ¦\' : \'Activate All\' }}\n </button>\n </div>\n </div>\n <if :="savedPresets.length">\n <div class="ok-theme-editor__filter-bar"><strong>πΎ Saved Presets:</strong>\n <each :="savedPresets" let:item="preset">\n <button @click="loadSavedPreset(preset)"\n :class="{ active: currentPresetName === preset && basePresetSource === \'local\' }"\n class="ok-theme-editor__preset-btn"\n :title="\'Load local preset: \' + preset"> {{ preset }}\n </button>\n </each>\n </div>\n </if>\n <div class="ok-theme-editor__filter-bar"><strong class="ok-theme-editor__label">π Base Presets (DOM):</strong>\n <each :="presets" let:item="preset">\n <button @click="selectPreset(preset)" \n :class="{ active: selectedPreset === preset }"\n :title="\'Load DOM preset: \' + preset"> {{ preset }}</button>\n </each>\n <if :="!presets.length"><span class="ok-theme-editor__empty">No presets available</span></if>\n </div>\n <div class="ok-theme-editor__filter-bar"><label class="ok-theme-editor__label"> <strong>Component:</strong> <select\n @change="selectComponent($event.target.value)" class="ok-theme-editor__select">\n <option value="">Select a component...</option>\n <option as="repeat" :of="components" let:item="component" :value="component" :selected="component === selectedComponent">{{ component }}</option>\n </select> </label></div>\n <if :="selectedComponent">\n <div class="ok-theme-editor__filter-bar"><strong>Variant:</strong>\n <each :="variants" let:item="variant">\n <button @click="selectedVariant = variant" :class="{ active: variant === selectedVariant }"> {{ variant\n }}\n </button>\n </each>\n </div>\n <if :="categories.length > 1">\n <div class="ok-theme-editor__filter-bar"><strong>Category:</strong>\n <button @click="selectedCategory = null" :class="{ active: !selectedCategory }"> All</button>\n <each :="categories" let:item="category">\n <button @click="selectedCategory = category" :class="{ active: category === selectedCategory }"> {{\n category }}\n </button>\n </each>\n </div>\n </if>\n <div class="ok-theme-editor__info"><strong>Editing:</strong> {{ selectedComponent }}\n <if :="selectedVariant && selectedVariant !== \'default\'"><span class="ok-theme-editor__variant-label">({{ selectedVariant }} variant)</span>\n </if>\n </div>\n <div class="ok-theme-editor__grid">\n <each :="variables" let:item="variable">\n <ok-theme-editor-variable :vm="$context" :variable />\n </each>\n <if :="!variables.length">\n <div class="ok-theme-editor__empty-state"> No variables found for this component\n <if :="selectedCategory"> in category "{{ selectedCategory }}"</if>\n .\n </div>\n </if>\n </div>\n </if>\n <if :="!selectedComponent">\n <div class="ok-theme-editor__empty-state"><p>π Select a component above to start editing its theme\n variables.</p></div>\n </if>\n</div>',style:a};export{l as default};
|