@snowcone-app/canvas 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advanced.js +1 -1
- package/dist/advanced.mjs +2 -2
- package/dist/{compose-Dqh2f8tS.js → compose-DCYerzAx.js} +3135 -3121
- package/dist/compose-DCYerzAx.js.map +1 -0
- package/dist/{compose-HDJp4Z_d.cjs → compose-qXEnDNMp.cjs} +15 -15
- package/dist/compose-qXEnDNMp.cjs.map +1 -0
- package/dist/icons/registry.d.ts +28 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +82 -80
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/dist/compose-Dqh2f8tS.js.map +0 -1
- package/dist/compose-HDJp4Z_d.cjs.map +0 -1
package/dist/advanced.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./compose-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./compose-qXEnDNMp.cjs"),$=require("./ThemeContext-BMNQKl1c.cjs"),h=require("./HybridHistoryManager-BXD93pp8.cjs"),M=require("./ImportManager-W1eWhfyM.cjs"),u=require("react"),n=require("react/jsx-runtime"),C=require("@snowcone-app/ui");require("clsx");require("tailwind-merge");const Q=({title:e,icon:t,children:r,enableable:a=!1,enabled:o=!1,onEnabledChange:s,collapsible:l=!1,expanded:x=!0,onExpandChange:d,className:p=""})=>{const E=a?o&&x:l?x:!0,g=a&&o||l,m=()=>{s&&s(!o)},c=()=>{d&&d(!x)};return n.jsxs("div",{className:`rounded-xl border border-border-primary bg-bg-secondary p-xl ${p}`,children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-md",children:[a&&n.jsx("label",{className:"flex cursor-pointer items-center",children:n.jsx("input",{type:"checkbox",checked:o,onChange:m,className:"h-4 w-4 cursor-pointer rounded border-border-primary bg-bg-input accent-accent-primary"})}),n.jsxs("div",{className:"flex items-center gap-md",children:[t&&n.jsx("span",{className:"flex items-center text-text-secondary",children:t}),n.jsx("h3",{className:"text-xl font-semibold text-text-primary",children:e})]})]}),g&&n.jsx("button",{onClick:c,className:"rounded-lg border-none bg-transparent px-md py-xs text-base text-text-muted transition-colors duration-fast hover:text-text-primary",title:x?"Collapse":"Expand",children:x?"▼":"▶"})]}),E&&n.jsx("div",{className:"mt-xl flex flex-col gap-xl",children:r})]})},ee=({label:e,labelSuffix:t,children:r,inline:a=!1,className:o=""})=>n.jsxs("div",{className:`flex ${a?"items-center justify-between":"flex-col"} gap-sm ${o}`,children:[n.jsxs("label",{className:"flex items-center justify-between text-base font-medium text-text-secondary",children:[n.jsx("span",{children:e}),t&&n.jsx("span",{className:"font-semibold text-accent-primary",children:t})]}),n.jsx("div",{className:a?"flex-shrink-0":"",children:r})]});function te({options:e,value:t,onChange:r,fullWidth:a=!0,className:o=""}){return n.jsx("div",{className:`flex gap-sm ${o}`,children:e.map(s=>{const l=s.value===t;return n.jsxs("button",{onClick:()=>!s.disabled&&r(s.value),disabled:s.disabled,title:s.tooltip,className:` ${a?"flex-1":""} flex items-center justify-center gap-xs rounded-lg border px-md py-sm text-base font-medium transition-all duration-fast ${l?"border-accent-primary bg-accent-primary text-text-on-accent":"border-border-primary bg-bg-tertiary text-text-secondary hover:border-border-secondary hover:bg-bg-hover hover:text-text-primary"} ${s.disabled?"cursor-not-allowed opacity-disabled":"cursor-pointer"} `,children:[s.icon&&n.jsx("span",{className:"flex items-center",children:s.icon}),n.jsx("span",{children:s.label})]},String(s.value))})})}const re=({label:e,icon:t,checked:r,onChange:a,disabled:o=!1,className:s=""})=>{const l=x=>{a(x.target.checked)};return n.jsxs("label",{className:`flex cursor-pointer items-center gap-md ${o?"cursor-not-allowed opacity-disabled":""} ${s}`,children:[n.jsx("input",{type:"checkbox",checked:r,onChange:l,disabled:o,className:"h-4 w-4 cursor-pointer rounded border-border-primary bg-bg-input accent-accent-primary disabled:cursor-not-allowed"}),n.jsxs("span",{className:"flex items-center gap-sm text-base font-medium text-text-primary",children:[t&&n.jsx("span",{className:"flex items-center text-text-secondary",children:t}),n.jsx("span",{children:e})]})]})},ne=({checked:e,onChange:t,label:r,disabled:a=!1,className:o=""})=>{const s=()=>{a||t(!e)};return n.jsxs("label",{className:`flex items-center gap-md cursor-pointer select-none ${a?"opacity-50 cursor-not-allowed":""} ${o}`.trim(),children:[n.jsx("input",{type:"checkbox",checked:e,onChange:s,disabled:a,className:"absolute opacity-0 w-0 h-0 peer"}),n.jsx("span",{className:`
|
|
2
2
|
relative inline-block w-9 h-5 rounded-[999px] transition-colors
|
|
3
3
|
${e?"bg-accent-primary":"bg-bg-tertiary"}
|
|
4
4
|
after:content-[''] after:absolute after:top-[2px] after:left-[2px]
|
package/dist/advanced.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as te, t as q, e as re, p as ne, o as oe, v as ae, w as se, j as ie } from "./compose-
|
|
2
|
-
import { x as st, A as it, d as lt, B as ct, y as dt, h as ut, z as mt, F as ft, C as ht, c as pt, D as gt, H as xt, E as bt, b as yt, J as vt, N as wt, G as St, I as Ct, O as Tt, Q as Et, R as $t, K as kt, L as At, U as Ft, M as Pt, V as Nt, W as Rt, X as Bt, Y as Mt, _ as Dt, S as zt, $ as It, a0 as Ot, a1 as Lt, a2 as Wt, a3 as Kt, a4 as _t, a5 as Gt, Z as Ut, a6 as jt, g as Jt, a7 as qt, a8 as Vt, r as Xt, a as Yt, a9 as Zt, aa as Ht, ab as Qt, ac as er, ad as tr, ae as rr } from "./compose-
|
|
1
|
+
import { s as te, t as q, e as re, p as ne, o as oe, v as ae, w as se, j as ie } from "./compose-DCYerzAx.js";
|
|
2
|
+
import { x as st, A as it, d as lt, B as ct, y as dt, h as ut, z as mt, F as ft, C as ht, c as pt, D as gt, H as xt, E as bt, b as yt, J as vt, N as wt, G as St, I as Ct, O as Tt, Q as Et, R as $t, K as kt, L as At, U as Ft, M as Pt, V as Nt, W as Rt, X as Bt, Y as Mt, _ as Dt, S as zt, $ as It, a0 as Ot, a1 as Lt, a2 as Wt, a3 as Kt, a4 as _t, a5 as Gt, Z as Ut, a6 as jt, g as Jt, a7 as qt, a8 as Vt, r as Xt, a as Yt, a9 as Zt, aa as Ht, ab as Qt, ac as er, ad as tr, ae as rr } from "./compose-DCYerzAx.js";
|
|
3
3
|
import { u as V } from "./ThemeContext-wj-wSO7J.js";
|
|
4
4
|
import { E as or, P as ar, T as sr, p as ir, s as lr, b as cr, a as dr, d as ur, e as mr, f as fr, g as hr, c as pr } from "./ThemeContext-wj-wSO7J.js";
|
|
5
5
|
import { c as le, G as ce, F as de, g as ue, r as me, u as fe } from "./HybridHistoryManager-jBBnVim8.js";
|