@chaibuilder/pages 0.4.6-beta.2 → 0.4.6-beta.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/dist/{B4MFY5CR-CgKmoZhy.cjs → B4MFY5CR-C8daQItO.cjs} +1 -1
- package/dist/{B4MFY5CR-Doi8QlXL.js → B4MFY5CR-DuN0t56f.js} +1 -1
- package/dist/{HO4MOOFI-4Q-h7u6O.cjs → HO4MOOFI-CsPcqhcs.cjs} +1 -1
- package/dist/{HO4MOOFI-CWU4gOCj.js → HO4MOOFI-oec0xpE4.js} +2 -2
- package/dist/{HUY7CZI3-CEnI5Lww.cjs → HUY7CZI3-B8Ze2vSD.cjs} +1 -1
- package/dist/{HUY7CZI3-BuVBFUXg.js → HUY7CZI3-CPhM1Xo9.js} +2 -2
- package/dist/{asset-metadata-editor-CEFwXx62.js → asset-metadata-editor-B5xHNQG_.js} +6 -6
- package/dist/{asset-metadata-editor-YXDey62L.cjs → asset-metadata-editor-Bzt3zj6x.cjs} +1 -1
- package/dist/{digital-asset-manager-Scnvw98W.js → digital-asset-manager-DPEusw_C.js} +220 -233
- package/dist/digital-asset-manager-Dg6416gA.cjs +1 -0
- package/dist/{image-editor-BQ6_F-iv.js → image-editor-CwVua57o.js} +13 -13
- package/dist/{image-editor-BKUmqgv0.cjs → image-editor-D8wu5UNM.cjs} +1 -1
- package/dist/{index-sSI8ulEa.cjs → index-BosOek7g.cjs} +1 -1
- package/dist/{index-Ci9oNrDB.js → index-CHnFBKHF.js} +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/digital-asset-manager-CE2qYOMT.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ps = Object.defineProperty;
|
|
2
2
|
var xs = (e, t, n) => t in e ? ps(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var qe = (e, t, n) => xs(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { s as Vn, m as Gn, b as R, d as rr, e as U, a as m, f as W, h as oe, S as B, c as D, i as we, u as $e, j as V, k as A, l as Ne, o as ut, P as zo, n as j, D as ws, t as q, p as Ft, q as ln, r as k, v as F, w as $s, x as Rt, y as Cs, z as Ss, A as wn, F as ks, B as Es, C as Ds, E as Kt, G as Ms, H as As, I as Fs, J as or, K as Kr, L as Ts, M as qt, $ as Ro, N as Br, O as Is, Q as Ps, R as zn, T as Ls, U as Os, V as qs } from "./index-
|
|
4
|
+
import { s as Vn, m as Gn, b as R, d as rr, e as U, a as m, f as W, h as oe, S as B, c as D, i as we, u as $e, j as V, k as A, l as Ne, o as ut, P as zo, n as j, D as ws, t as q, p as Ft, q as ln, r as k, v as F, w as $s, x as Rt, y as Cs, z as Ss, A as wn, F as ks, B as Es, C as Ds, E as Kt, G as Ms, H as As, I as Fs, J as or, K as Kr, L as Ts, M as qt, $ as Ro, N as Br, O as Is, Q as Ps, R as zn, T as Ls, U as Os, V as qs } from "./index-CHnFBKHF.js";
|
|
5
5
|
var _s = (e) => e != null, zs = (e) => e.filter(_s);
|
|
6
6
|
function Rs(e) {
|
|
7
7
|
return (...t) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./B4MFY5CR-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./B4MFY5CR-C8daQItO.cjs"),t=require("./index-BosOek7g.cjs");var s=c=>{const[r,o]=e.createLocalStorage({prefix:"TanstackQueryDevtools"}),l=t.getPreferredColorScheme(),a=t.createMemo(()=>{const n=r.theme_preference||e.THEME_PREFERENCE;return n!=="system"?n:l()});return t.createComponent(e.QueryDevtoolsContext.Provider,{value:c,get children(){return t.createComponent(e.PiPProvider,{localStore:r,setLocalStore:o,get children(){return t.createComponent(e.ThemeContext.Provider,{value:a,get children(){return t.createComponent(e.Devtools,{localStore:r,setLocalStore:o})}})}})}})},u=s;exports.default=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./B4MFY5CR-
|
|
2
|
-
import { g as d, c as f, a as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./B4MFY5CR-DuN0t56f.js";
|
|
2
|
+
import { g as d, c as f, a as e } from "./index-CHnFBKHF.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./B4MFY5CR-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./B4MFY5CR-C8daQItO.cjs"),t=require("./index-BosOek7g.cjs");var u=o=>{const[r,n]=e.createLocalStorage({prefix:"TanstackQueryDevtools"}),c=t.getPreferredColorScheme(),a=t.createMemo(()=>{const l=r.theme_preference||e.THEME_PREFERENCE;return l!=="system"?l:c()});return t.createComponent(e.QueryDevtoolsContext.Provider,{value:o,get children(){return t.createComponent(e.PiPProvider,{disabled:!0,localStore:r,setLocalStore:n,get children(){return t.createComponent(e.ThemeContext.Provider,{value:a,get children(){return t.createComponent(e.ParentPanel,{get children(){return t.createComponent(e.ContentView,{localStore:r,setLocalStore:n,get onClose(){return o.onClose},showPanelViewOnly:!0})}})}})}})}})},i=u;exports.default=i;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./B4MFY5CR-
|
|
2
|
-
import { g as v, c as C, a as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./B4MFY5CR-DuN0t56f.js";
|
|
2
|
+
import { g as v, c as C, a as e } from "./index-CHnFBKHF.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Dialog as b, DialogContent as w, DialogHeader as F, DialogTitle as C, Label as l, Input as S, Textarea as y, DialogFooter as A, Button as g } from "@chaibuilder/sdk/ui";
|
|
3
|
+
import { useState as d } from "react";
|
|
4
4
|
function E({
|
|
5
5
|
asset: e,
|
|
6
6
|
onSave: r,
|
|
7
7
|
onCancel: o
|
|
8
8
|
}) {
|
|
9
|
-
const i = e.name.lastIndexOf("."), f = i > 0 ? e.name.substring(0, i) : e.name, c = i > 0 ? e.name.substring(i) : "", [m, x] =
|
|
9
|
+
const i = e.name.lastIndexOf("."), f = i > 0 ? e.name.substring(0, i) : e.name, c = i > 0 ? e.name.substring(i) : "", [m, x] = d(f), [s, v] = d(e.description || ""), [u, h] = d(!1), N = async () => {
|
|
10
10
|
h(!0);
|
|
11
11
|
try {
|
|
12
12
|
const D = {
|
|
@@ -22,7 +22,7 @@ function E({
|
|
|
22
22
|
/* @__PURE__ */ a(F, { children: /* @__PURE__ */ a(C, { children: "Edit Asset Details" }) }),
|
|
23
23
|
/* @__PURE__ */ t("div", { className: "grid gap-3 py-2", children: [
|
|
24
24
|
/* @__PURE__ */ t("div", { className: "grid gap-2", children: [
|
|
25
|
-
/* @__PURE__ */ a(
|
|
25
|
+
/* @__PURE__ */ a(l, { htmlFor: "name", children: "Name" }),
|
|
26
26
|
/* @__PURE__ */ t("div", { className: "flex", children: [
|
|
27
27
|
/* @__PURE__ */ a(
|
|
28
28
|
S,
|
|
@@ -38,7 +38,7 @@ function E({
|
|
|
38
38
|
/* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children: "Only the file name can be changed, not the extension." })
|
|
39
39
|
] }),
|
|
40
40
|
/* @__PURE__ */ t("div", { className: "grid gap-2", children: [
|
|
41
|
-
/* @__PURE__ */ a(
|
|
41
|
+
/* @__PURE__ */ a(l, { htmlFor: "description", children: "Description" }),
|
|
42
42
|
/* @__PURE__ */ a(
|
|
43
43
|
y,
|
|
44
44
|
{
|
|
@@ -61,7 +61,7 @@ function E({
|
|
|
61
61
|
{ label: "Created", value: p(e.createdAt) },
|
|
62
62
|
{ label: "Updated", value: p((e == null ? void 0 : e.updatedAt) || "") }
|
|
63
63
|
].map((n) => /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
64
|
-
/* @__PURE__ */ a(
|
|
64
|
+
/* @__PURE__ */ a(l, { className: "w-max text-left px-2 w-1/4 font-normal text-gray-700", children: n.label }),
|
|
65
65
|
":",
|
|
66
66
|
/* @__PURE__ */ a("div", { className: "w-max text-left font-medium text-gray-900 capitalize", children: n.value })
|
|
67
67
|
] })) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("@chaibuilder/sdk/ui"),l=require("react");function j({asset:e,onSave:r,onCancel:d}){const i=e.name.lastIndexOf("."),h=i>0?e.name.substring(0,i):e.name,o=i>0?e.name.substring(i):"",[s,g]=l.useState(h),[c,f]=l.useState(e.description||""),[m,u]=l.useState(!1),p=async()=>{u(!0);try{const v={name:s+o,description:c||void 0};await r(v)}finally{u(!1)}};return t.jsx(a.Dialog,{open:!0,onOpenChange:()=>d(),children:t.jsxs(a.DialogContent,{className:"sm:max-w-[500px]",children:[t.jsx(a.DialogHeader,{children:t.jsx(a.DialogTitle,{children:"Edit Asset Details"})}),t.jsxs("div",{className:"grid gap-3 py-2",children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx(a.Label,{htmlFor:"name",children:"Name"}),t.jsxs("div",{className:"flex",children:[t.jsx(a.Input,{id:"name",value:s,onChange:n=>g(n.target.value),className:"rounded-r-none"}),t.jsx("div",{className:"px-3 py-1 text-sm font-medium bg-muted text-muted-foreground rounded-r-md border border-l-0 flex items-center",children:o||""})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Only the file name can be changed, not the extension."})]}),t.jsxs("div",{className:"grid gap-2",children:[t.jsx(a.Label,{htmlFor:"description",children:"Description"}),t.jsx(a.Textarea,{id:"description",value:c,placeholder:"Enter a description for the asset",onChange:n=>f(n.target.value),rows:3})]}),t.jsx("div",{className:"grid grid-cols-1 gap-2 text-sm border rounded-md p-2",children:[{label:"Type",value:e.type},{label:"Format",value:e.format},{label:"Size",value:N(e.size)},{label:"Dimensions",value:`${e.width} × ${e.height}`},{label:"Created",value:x(e.createdAt)},{label:"Updated",value:x((e==null?void 0:e.updatedAt)||"")}].map(n=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(a.Label,{className:"w-max text-left px-2 w-1/4 font-normal text-gray-700",children:n.label}),":",t.jsx("div",{className:"w-max text-left font-medium text-gray-900 capitalize",children:n.value})]}))})]}),t.jsxs(a.DialogFooter,{children:[t.jsx(a.Button,{variant:"outline",onClick:d,children:"Cancel"}),t.jsx(a.Button,{onClick:p,disabled:m,children:m?"Saving...":"Save Changes"})]})]})})}function N(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":e<1024*1024*1024?(e/(1024*1024)).toFixed(1)+" MB":(e/(1024*1024*1024)).toFixed(1)+" GB"}function x(e){if(!e)return"N/A";const r=new Date(e);return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(r)}exports.default=j;
|