@lattice-php/lattice 0.68.0 → 0.69.0
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/page.js.map +1 -1
- package/dist-standalone/chunks/{chart-view-DGg5xdMH.js → chart-view-BZ7MsGOE.js} +1 -1
- package/dist-standalone/chunks/{date-picker-view-BteNbMEy.js → date-picker-view-CLyZ_5cP.js} +1 -1
- package/dist-standalone/chunks/pattern-input-view-Do3ys2Q0.js +4 -0
- package/dist-standalone/chunks/{rich-editor-view-tuOXu5Bi.js → rich-editor-view-DJDMH7X-.js} +1 -1
- package/dist-standalone/chunks/{runtime-B0w_If9U.js → runtime-C7vlSeTd.js} +16 -16
- package/dist-standalone/chunks/{subscriptions-_pe6h-Og.js → subscriptions-C9uqBVk7.js} +1 -1
- package/dist-standalone/lattice.js +1 -1
- package/dist-standalone/manifest.json +1 -1
- package/dist-standalone/runtime.js +1 -1
- package/package.json +6 -6
- package/dist-standalone/chunks/pattern-input-view-QymBSdZR.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{$ as n,Cn as r,Q as i}from"./runtime-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{$ as n,Cn as r,Q as i}from"./runtime-C7vlSeTd.js";import{t as a}from"./jsx-runtime-NZYk81nU.js";import{c as o}from"./instance-D6cXaqIT.js";import{useEcho as s,useEchoPresence as c,useEchoPublic as l}from"./dist-D2qBbka0.js";var u=e(t(),1);function d(e,t,n){return e.map(e=>f(e,t,n))}function f(e,t,r){if(e.type!==`toast`)return e;let a=e.props;if(typeof a!=`object`||!a)return e;let o=a.message;return i(o)?{...e,props:{...a,message:n(o,t,r)}}:e}var p=e(a(),1);function m(e){let{t}=o(`lattice`),n=r();return(0,u.useCallback)(r=>{let i=typeof r==`object`&&r?r:{};n(d(e.effects,i,t))},[n,e,t])}function h({listener:e}){return l(e.channel,e.events,m(e)),null}function g({listener:e}){return s(e.channel,e.events,m(e)),null}function _({listener:e}){return c(e.channel,e.events,m(e)),null}function v({listener:e}){switch(e.visibility){case`private`:return(0,p.jsx)(g,{listener:e});case`presence`:return(0,p.jsx)(_,{listener:e});default:return(0,p.jsx)(h,{listener:e})}}function y({listeners:e}){return(0,p.jsx)(p.Fragment,{children:e.map((e,t)=>(0,p.jsx)(v,{listener:e},`${e.visibility}:${e.channel}:${t}`))})}export{y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./chunks/dist-D2qBbka0.js","./chunks/rolldown-runtime-hePW80VL.js","./chunks/react-CwJFpaho.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{C as e,gr as t,hr as n,pn as r,v as i}from"./chunks/runtime-
|
|
2
|
+
import{C as e,gr as t,hr as n,pn as r,v as i}from"./chunks/runtime-C7vlSeTd.js";function a(){return console.warn(`[lattice] The data-lattice-config script holds invalid JSON; booting with defaults.`),{}}function o(e){let t=e.querySelector(`script[data-lattice-config]`);if(!t?.textContent)return{};try{let e=JSON.parse(t.textContent);return typeof e!=`object`||!e||Array.isArray(e)?a():e}catch{return a()}}var s=o(document);async function c(){let a=await n(s.plugins??[]);if(s.refreshRefUrl&&r(s.refreshRefUrl),s.echo)try{let{configureEcho:e}=await t(async()=>{let{configureEcho:e}=await import(`./chunks/dist-D2qBbka0.js`);return{configureEcho:e}},__vite__mapDeps([0,1,2]),import.meta.url);e(s.echo)}catch(e){console.warn(`[lattice] Failed to load the realtime chunk; continuing without Echo.`,e)}i({plugins:a,...s.spriteUrl?{sprite:{href:s.spriteUrl}}:{},defaults:{visitOptions:e}})}var l=c();export{l as booted};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$t as e,An as t,B as n,Bn as r,Bt as i,C as a,Cn as o,Ct as s,D as c,Dn as l,E as u,En as d,F as f,Fn as p,Ft as m,G as h,Gn as g,Gt as _,H as v,Hn as y,Ht as b,I as x,In as S,It as C,J as w,Jn as T,Jt as E,K as D,Kn as O,Kt as k,L as A,Ln as j,Lt as M,M as N,Mn as P,Nn as F,Nt as I,O as L,On as R,P as z,Pn as B,Pt as V,Qt as H,R as U,Rn as W,Rt as G,S as K,Sn as q,St as J,T as Y,Tn as X,U as Z,Un as Q,Ut as $,V as ee,Vn as te,Vt as ne,W as re,Wn as ie,Wt as ae,X as oe,Xt as se,Y as ce,Yt as le,Z as ue,Zt as de,_ as fe,_n as pe,_t as me,a as he,an as ge,at as _e,b as ve,bn as ye,bt as be,c as xe,cn as Se,ct as Ce,dn as we,dr as Te,dt as Ee,en as De,et as Oe,fn as ke,fr as Ae,ft as je,g as Me,gn as Ne,gt as Pe,h as Fe,hn as Ie,hr as Le,ht as Re,i as ze,in as Be,j as Ve,jn as He,k as Ue,kn as We,l as Ge,ln as Ke,lt as qe,mn as Je,mr as Ye,mt as Xe,n as Ze,nn as Qe,nt as $e,o as et,on as tt,ot as nt,pn as rt,pr as it,pt as at,q as ot,qn as st,qt as ct,r as lt,rn as ut,s as dt,sn as ft,st as pt,t as mt,tn as ht,tt as gt,un as _t,ut as vt,v as yt,vn as bt,w as xt,wn as St,wt as Ct,x as wt,xn as Tt,xt as Et,y as Dt,yn as Ot,yt as kt,z as At,zn as jt,zt as Mt}from"./chunks/runtime-
|
|
1
|
+
import{$t as e,An as t,B as n,Bn as r,Bt as i,C as a,Cn as o,Ct as s,D as c,Dn as l,E as u,En as d,F as f,Fn as p,Ft as m,G as h,Gn as g,Gt as _,H as v,Hn as y,Ht as b,I as x,In as S,It as C,J as w,Jn as T,Jt as E,K as D,Kn as O,Kt as k,L as A,Ln as j,Lt as M,M as N,Mn as P,Nn as F,Nt as I,O as L,On as R,P as z,Pn as B,Pt as V,Qt as H,R as U,Rn as W,Rt as G,S as K,Sn as q,St as J,T as Y,Tn as X,U as Z,Un as Q,Ut as $,V as ee,Vn as te,Vt as ne,W as re,Wn as ie,Wt as ae,X as oe,Xt as se,Y as ce,Yt as le,Z as ue,Zt as de,_ as fe,_n as pe,_t as me,a as he,an as ge,at as _e,b as ve,bn as ye,bt as be,c as xe,cn as Se,ct as Ce,dn as we,dr as Te,dt as Ee,en as De,et as Oe,fn as ke,fr as Ae,ft as je,g as Me,gn as Ne,gt as Pe,h as Fe,hn as Ie,hr as Le,ht as Re,i as ze,in as Be,j as Ve,jn as He,k as Ue,kn as We,l as Ge,ln as Ke,lt as qe,mn as Je,mr as Ye,mt as Xe,n as Ze,nn as Qe,nt as $e,o as et,on as tt,ot as nt,pn as rt,pr as it,pt as at,q as ot,qn as st,qt as ct,r as lt,rn as ut,s as dt,sn as ft,st as pt,t as mt,tn as ht,tt as gt,un as _t,ut as vt,v as yt,vn as bt,w as xt,wn as St,wt as Ct,x as wt,xn as Tt,xt as Et,y as Dt,yn as Ot,yt as kt,z as At,zn as jt,zt as Mt}from"./chunks/runtime-C7vlSeTd.js";import{a as Nt,n as Pt,r as Ft,s as It,t as Lt}from"./chunks/locale-BZOrJtMq.js";import{i as Rt,r as zt}from"./chunks/registry-context-gXwNT8GJ.js";import{f as Bt,h as Vt,p as Ht}from"./chunks/floating-ui.dom-C6CLKWO6.js";import{a as Ut,c as Wt,n as Gt,s as Kt}from"./chunks/instance-D6cXaqIT.js";import{i as qt,n as Jt,r as Yt,t as Xt}from"./chunks/timezone-Ckl1gbqB.js";import{t as Zt}from"./chunks/input-BIm8kbcS.js";import{i as Qt,n as $t,t as en}from"./chunks/color-CXV-Y5Qv.js";export{Be as ActionConfirmOverlay,Ct as ActionsDropdown,Pe as AddRowMenu,h as BOARD_OWNED_QUERY_KEYS,f as Badge,r as Button,be as Checkbox,N as CodeBlock,Ce as Combobox,ge as ConfirmDialog,_e as CopyButton,t as DateTime,tt as Dialog,ft as DialogContent,Se as DialogHeader,Ke as DialogTitle,Dt as EventBridge,ne as FieldScopeProvider,At as FilterBar,n as FilterMenu,Et as FormFieldFrame,Bt as Icon,kt as IconButton,te as IconRenderer,y as IconRendererProvider,s as InfoTooltip,Zt as Input,It as LATTICE_EVENT,Ne as LATTICE_REF_HEADER,J as Label,B as LocaleReload,bt as MODAL_MISSING_ERROR,ee as NativeSelect,p as NavigationProvider,gt as OutletProvider,z as PreviewableImage,fe as Provider,Ge as RICH_EDITOR_EXTENSION,$ as ROW_ID_KEY,xt as RealtimeListeners,Tt as RenderNode,q as Renderer,Re as RowKeyInputs,Y as SchemaLayout,je as SegmentedControl,Ee as SimpleField,We as Spinner,Ht as SpriteProvider,U as TableSearch,pt as Textarea,xe as ToolbarIconButton,Gt as UI_NAMESPACE,ae as addRow,Ze as announce,we as apiFetch,ke as apiJson,de as appendPath,w as appendTableFilters,lt as attachTreeItemInstruction,g as builtinEffectHandlers,Me as callAction,mt as cancelDragStartFromInteractive,D as claimUrlSyncScope,Vt as cn,en as coerceColor,$t as colorValue,x as columnCell,dt as combine,W as configureI18n,He as configureI18nFromPageProps,nt as copyToClipboard,yt as createLatticeApp,ve as createLayoutResolver,wt as createPageResolver,Te as createRegistry,Lt as currentLocale,Xt as currentTimezone,S as defaultNavigation,St as dispatchActionError,X as dispatchEffects,he as draggable,et as dropTargetForElements,_ as duplicateRow,Ae as eagerComponent,O as effectHandler,jt as enableBackend,k as ensureRowIds,it as extendRegistry,ze as extractTreeItemInstruction,ce as fetchFilterOptions,ht as fieldProps,qt as formatDateValue,d as getActionEffects,v as getBulkActionNodes,H as getPath,oe as getUrlQueryParams,Ut as i18n,P as i18nConfigFromPageProps,Q as inertiaNavigation,u as initializeAppearance,l as isActionEffect,ue as isActiveFilterValue,Oe as layoutComponents,Ye as lazyComponent,Le as loadPluginModules,Pt as localeHeader,st as mergeEffectHandlers,ct as moveRow,ie as navigationPlugin,R as nodeIdentity,K as pageComponentName,Ue as registry,E as removeRow,qe as requestSignedUpload,T as router,m as rowSchemaFor,C as rowTemplatesOf,_t as runAction,le as seedRows,Ft as setLocale,e as setPath,rt as setRefRefreshEndpoint,Jt as setTimezone,De as toHtmlName,Qt as toneProps,Kt as translate,c as updateAppearance,I as useAction,L as useAppearance,Fe as useCallAction,A as useColumnRegistry,zt as useComponentRegistry,V as useDebouncedCallback,me as useDependentField,o as useEffectDispatcher,Ot as useEmbeddedModal,Rt as useExtensionRegistry,M as useFieldCommit,b as useFieldScope,ut as useFormContext,G as useFormValue,Mt as useFormValues,Ve as useFormatContext,Nt as useLocale,F as useLocaleOptions,ye as useModal,j as useNavigation,$e as useOutlet,Xe as usePersistentState,at as useRowCollection,i as useSetFormValue,Wt as useT,re as useTable,Z as useTableSelection,Yt as useTimezone,Qe as walkFields,Ie as withHeaders,pe as withRefHeader,se as withRowId,a as withVisitHeaders,ot as writeQueryToUrl,vt as xhrTransfer,Je as xsrfToken};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lattice-php/lattice",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.69.0",
|
|
4
4
|
"description": "Server-driven React components for Laravel and Inertia.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Manuel Christlieb <manuel@christlieb.eu>",
|
|
@@ -118,11 +118,11 @@
|
|
|
118
118
|
"typecheck": "tsc --noEmit"
|
|
119
119
|
},
|
|
120
120
|
"dependencies": {
|
|
121
|
-
"@lattice-php/action": "0.
|
|
122
|
-
"@lattice-php/core": "0.
|
|
123
|
-
"@lattice-php/form": "0.
|
|
124
|
-
"@lattice-php/table": "0.
|
|
125
|
-
"@lattice-php/ui": "0.
|
|
121
|
+
"@lattice-php/action": "0.69.0",
|
|
122
|
+
"@lattice-php/core": "0.69.0",
|
|
123
|
+
"@lattice-php/form": "0.69.0",
|
|
124
|
+
"@lattice-php/table": "0.69.0",
|
|
125
|
+
"@lattice-php/ui": "0.69.0",
|
|
126
126
|
"@lattice-php/vite-svg-sprite": "^0.3.0",
|
|
127
127
|
"@atlaskit/pragmatic-drag-and-drop": "^2.0.2",
|
|
128
128
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CwJFpaho.js";import{At as n,Dt as r,Et as i,F as a,Ht as o,Lt as s,Mt as c,Ot as l,Rt as u,Tt as d,V as f,_t as p,jt as m,rn as h,vt as g,xt as _}from"./runtime-B0w_If9U.js";import{t as v}from"./jsx-runtime-NZYk81nU.js";import{f as y,h as b}from"./floating-ui.dom-C6CLKWO6.js";import{c as x}from"./instance-D6cXaqIT.js";import{t as S}from"./input-BIm8kbcS.js";import{W as C,a as w,c as T,f as E,n as D,o as O,r as k,s as A,t as j}from"./dist-CBO25w6A.js";var M=e(t(),1),N=e(v(),1);function P({config:e,onChange:t,schema:n}){return(0,N.jsx)(N.Fragment,{children:n.map(n=>{let r=n.props?.name,i=n.props?.label??r,a=e[r]??n.props?.value??``,o=n=>t({...e,[r]:n});if(n.type===`field.choice`||n.type===`field.select`){let e=n.props?.options??[];return(0,N.jsxs)(`label`,{className:`flex flex-col gap-1 text-sm`,children:[i,(0,N.jsx)(f,{onChange:e=>o(e.target.value),value:a,children:e.map(e=>(0,N.jsx)(`option`,{value:e.value,children:e.label},e.value))})]},r)}return n.type===`field.number-input`||n.type===`field.text-input`?(0,N.jsxs)(`label`,{className:`flex flex-col gap-1 text-sm`,children:[i,(0,N.jsx)(S,{onChange:e=>o(e.target.value),type:n.type===`field.number-input`?`number`:`text`,value:a})]},r):null})})}function F({editor:e,extension:t,node:r,selected:i,updateAttributes:o}){let[s,l]=(0,M.useState)(!1),u=t.options.tokens,d=r.attrs.token,f=u.find(e=>e.name===d),p=r.attrs.config??{},h=f?.label??d,g=f?.schema??[],_=(0,N.jsx)(a,{className:b(`cursor-default select-none`,i&&`ring-2 ring-lt-ring`),"data-test":`pattern-token-${d}`,children:h});return g.length===0||!e.isEditable?(0,N.jsx)(D,{as:`span`,children:_}):(0,N.jsx)(D,{as:`span`,children:(0,N.jsxs)(n,{onOpenChange:l,open:s,children:[(0,N.jsx)(c,{asChild:!0,children:(0,N.jsx)(`button`,{"data-test":`pattern-token-${d}-trigger`,type:`button`,children:_})}),(0,N.jsx)(m,{className:`flex w-56 flex-col gap-2 p-3`,"data-test":`pattern-token-${d}-config`,children:(0,N.jsx)(P,{config:p,onChange:e=>o({config:e}),schema:g})})]})})}var I=E.create({name:`patternToken`,group:`inline`,inline:!0,atom:!0,selectable:!0,addOptions(){return{tokens:[]}},addAttributes(){return{token:{default:null},config:{default:{}}}},parseHTML(){return[{tag:`span[data-pattern-token]`}]},renderHTML({node:e,HTMLAttributes:t}){return[`span`,C(t,{"data-pattern-token":e.attrs.token}),e.attrs.token]},addNodeView(){return k(F)}});function L(e){return{type:`doc`,content:[{type:`paragraph`,content:e.flatMap(e=>e.type===`text`?e.value===``?[]:[{type:`text`,text:e.value}]:[{type:`patternToken`,attrs:{token:e.token,config:e.config}}])}]}}function R(e){return(e.content?.[0]?.content??[]).flatMap(e=>{if(e.type===`text`)return e.text?[{type:`text`,value:e.text}]:[];if(e.type===`patternToken`){let t=e.attrs??{};return[{type:`token`,token:t.token,config:t.config??{}}]}return[]})}function z(e){let t=new Set;return e.state.doc.descendants(e=>{e.type.name===`patternToken`&&typeof e.attrs.token==`string`&&t.add(e.attrs.token)}),t}function B(e){return Object.fromEntries(e.schema.map(e=>[e.props?.name,e.props?.value??``]))}function V({editor:e,separator:t,tokens:n}){let{t:a}=x(`lattice`),[o,s]=(0,M.useState)(!1),c=o?z(e):new Set,u=n.filter(e=>!c.has(e.name)),f=n=>{let r=e.chain().focus();t!==``&&r.insertContent(t),r.insertContent({type:`patternToken`,attrs:{token:n.name,config:B(n)}}).run()};return(0,N.jsxs)(d,{onOpenChange:s,open:o,children:[(0,N.jsx)(l,{asChild:!0,children:(0,N.jsxs)(`button`,{className:`inline-flex items-center gap-1 rounded-lt-sm border border-lt-input px-2 py-1 text-sm hover:bg-lt-accent`,"data-test":`pattern-input-insert-token`,type:`button`,children:[(0,N.jsx)(y,{"aria-hidden":`true`,name:`plus`}),a(`form.pattern-input.insert-token`,`Insert token`)]})}),(0,N.jsx)(i,{children:u.map(e=>(0,N.jsx)(r,{"data-test":`pattern-input-insert-token-${e.name}`,onClick:()=>f(e),children:e.label},e.name))})]})}var H=({node:e})=>{let{errors:t}=h(),{hidden:n,required:r,readOnly:i,disabled:a}=p(e),{change:c,blur:l}=s(),d=e.props.name,f=o(),m=u(d),v=f?f.getValue(d):m,y=f?f.scopedName(d):d,x=f?f.errorKey(d):d,S=i||a,C=(0,M.useMemo)(()=>v??[],[v]),E=(0,M.useMemo)(()=>[T,A,O,I.configure({tokens:e.props.tokens})],[e.props.tokens]),D=w({extensions:E,content:L(C),editable:!S,immediatelyRender:!1,editorProps:{attributes:{class:`px-3 py-2 outline-none`},handleKeyDown:(e,t)=>t.key===`Enter`},onUpdate:({editor:e})=>{c(d,R(e.getJSON()))},onBlur:()=>{l(d)}});if((0,M.useEffect)(()=>{D?.setEditable(!S)},[D,S]),n)return null;let k=C.length>0?JSON.stringify(C):``;return(0,N.jsx)(_,{error:t[x],helperText:e.props.helperText??void 0,tooltip:e.props.tooltip??void 0,labelAction:g(e.props.labelAction),label:e.props.label??``,id:y,required:r,children:t=>(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`div`,{...t,className:b(`overflow-hidden rounded-lt-sm border border-lt-input bg-transparent shadow-lt-xs focus-within:border-lt-ring focus-within:ring-[length:var(--lt-ring-width)] focus-within:ring-lt-ring/50`,S&&`opacity-60`),role:`group`,children:[D&&!S&&(0,N.jsx)(`div`,{className:`border-b border-lt-border p-1`,children:(0,N.jsx)(V,{editor:D,separator:e.props.separator,tokens:e.props.tokens})}),(0,N.jsx)(j,{editor:D})]}),(0,N.jsx)(`input`,{name:y,type:`hidden`,value:k})]})})};export{H as default};
|