@cyclone-ui/state 0.0.5 → 0.0.7
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/CHANGELOG.md +10 -0
- package/dist/base/atoms/atom-with-broadcast.cjs +1 -1
- package/dist/base/atoms/atom-with-broadcast.mjs +1 -1
- package/dist/base/atoms/atom-with-broadcast.mjs.map +1 -1
- package/dist/base/atoms/atom-with-compare.mjs.map +1 -1
- package/dist/base/atoms/atom-with-debounce.mjs.map +1 -1
- package/dist/base/atoms/atom-with-effect.cjs +1 -1
- package/dist/base/atoms/atom-with-effect.mjs +1 -1
- package/dist/base/atoms/atom-with-effect.mjs.map +1 -1
- package/dist/base/atoms/atom-with-listeners.mjs.map +1 -1
- package/dist/base/atoms/atom-with-pending.mjs.map +1 -1
- package/dist/base/atoms/atom-with-refresh-and-default.mjs.map +1 -1
- package/dist/base/atoms/atom-with-refresh.mjs.map +1 -1
- package/dist/base/atoms/atom-with-toggle.mjs.map +1 -1
- package/dist/base/atoms/atom-with-web-storage.d.cts.map +1 -1
- package/dist/base/atoms/atom-with-web-storage.d.mts.map +1 -1
- package/dist/base/atoms/atom-with-web-storage.mjs.map +1 -1
- package/dist/base/atoms/atom-with-wrapper.mjs.map +1 -1
- package/dist/base/atoms/base-atom.mjs.map +1 -1
- package/dist/base/hooks/use-atom-effect.mjs.map +1 -1
- package/dist/base/hooks/use-hydrate-molecule.mjs.map +1 -1
- package/dist/base/hooks/use-prepare-atoms.mjs.map +1 -1
- package/dist/base/hooks/use-sync-molecule.cjs +1 -1
- package/dist/base/hooks/use-sync-molecule.d.cts +5 -0
- package/dist/base/hooks/use-sync-molecule.d.cts.map +1 -1
- package/dist/base/hooks/use-sync-molecule.d.mts +5 -0
- package/dist/base/hooks/use-sync-molecule.mjs +1 -1
- package/dist/base/hooks/use-sync-molecule.mjs.map +1 -1
- package/dist/base/utilities/create-molecule.d.cts.map +1 -1
- package/dist/base/utilities/create-molecule.d.mts.map +1 -1
- package/dist/base/utilities/create-molecule.mjs.map +1 -1
- package/dist/base/utilities/create-web-storage.mjs.map +1 -1
- package/dist/base/utilities/debounce.mjs.map +1 -1
- package/dist/base/utilities/is-atom.mjs.map +1 -1
- package/dist/base/utilities/set-atom-debug.mjs.map +1 -1
- package/dist/form/atoms/atom-with-field.mjs.map +1 -1
- package/dist/form/atoms/atom-with-messages.mjs.map +1 -1
- package/dist/form/hooks/use-field-actions.mjs.map +1 -1
- package/dist/form/hooks/use-field-ref.mjs.map +1 -1
- package/dist/form/hooks/use-form-actions.mjs.map +1 -1
- package/dist/form/molecules/field-molecule.cjs +1 -1
- package/dist/form/molecules/field-molecule.d.cts.map +1 -1
- package/dist/form/molecules/field-molecule.d.mts.map +1 -1
- package/dist/form/molecules/field-molecule.mjs +1 -1
- package/dist/form/molecules/field-molecule.mjs.map +1 -1
- package/dist/form/molecules/form-molecule.d.cts.map +1 -1
- package/dist/form/molecules/form-molecule.d.mts.map +1 -1
- package/dist/form/molecules/form-molecule.mjs.map +1 -1
- package/dist/form/providers/FieldProvider.mjs.map +1 -1
- package/dist/form/providers/FormProvider.mjs.map +1 -1
- package/dist/form/types.cjs +1 -1
- package/dist/form/types.d.cts +6 -5
- package/dist/form/types.d.cts.map +1 -1
- package/dist/form/types.d.mts +6 -5
- package/dist/form/types.d.mts.map +1 -1
- package/dist/form/types.mjs +1 -1
- package/dist/form/types.mjs.map +1 -1
- package/dist/form/utilities/abort-error.mjs.map +1 -1
- package/dist/form/utilities/is-validation-results.mjs.map +1 -1
- package/dist/form/utilities/validators.mjs.map +1 -1
- package/dist/message/components/MessageViewport.cjs +6 -1
- package/dist/message/components/MessageViewport.d.cts +11 -4
- package/dist/message/components/MessageViewport.d.cts.map +1 -1
- package/dist/message/components/MessageViewport.d.mts +11 -4
- package/dist/message/components/MessageViewport.mjs +6 -1
- package/dist/message/components/MessageViewport.mjs.map +1 -1
- package/dist/message/hooks/use-message-actions.cjs +1 -1
- package/dist/message/hooks/use-message-actions.mjs +1 -1
- package/dist/message/hooks/use-message-actions.mjs.map +1 -1
- package/dist/message/index.cjs +1 -1
- package/dist/message/index.d.cts +2 -2
- package/dist/message/index.d.mts +2 -2
- package/dist/message/index.mjs +1 -1
- package/dist/message/providers/MessageProvider.mjs.map +1 -1
- package/dist/message/types.d.cts +2 -2
- package/dist/message/types.d.cts.map +1 -1
- package/dist/message/types.d.mts +2 -2
- package/dist/theme/hooks/use-theme-actions.mjs.map +1 -1
- package/dist/theme/hooks/use-theme-store.mjs.map +1 -1
- package/dist/theme/molecules/theme-molecule.d.cts.map +1 -1
- package/dist/theme/molecules/theme-molecule.d.mts.map +1 -1
- package/dist/theme/molecules/theme-molecule.mjs.map +1 -1
- package/dist/theme/providers/ThemeProvider.mjs.map +1 -1
- package/dist/theme/utilities/theme-helpers.mjs.map +1 -1
- package/package.json +18 -17
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Cyclone UI - State
|
|
4
4
|
|
|
5
|
+
## [0.0.6](https://github.com/storm-software/cyclone-ui/releases/tag/state%400.0.6) (09/21/2026)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- **field:** Added `size` property to form field components ([380e416b](https://github.com/storm-software/cyclone-ui/commit/380e416b))
|
|
10
|
+
|
|
11
|
+
### Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated **helpers** to **v0.3.5**
|
|
14
|
+
|
|
5
15
|
## [0.0.3](https://github.com/storm-software/cyclone-ui/releases/tag/state%400.0.3) (09/06/2026)
|
|
6
16
|
|
|
7
17
|
### Features
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../utilities/is-atom.cjs"),t=require("./base-atom.cjs");let n=require("@stryke/type-checks/is-function");function r(r,i){let a=e.isAtom(i)?i:t.baseAtom(i),o
|
|
1
|
+
const e=require("../utilities/is-atom.cjs"),t=require("./base-atom.cjs");let n=require("@stryke/type-checks/is-function");function r(r,i){let a=e.isAtom(i)?i:t.baseAtom(i),o=/* @__PURE__ */ new Set,s=typeof BroadcastChannel>`u`?void 0:new BroadcastChannel(r);s&&(s.onmessage=e=>{for(let t of o)t(e)});let c=t.baseAtom(e=>e(a),(e,t,r)=>{t(a,(0,n.isFunction)(r.value)?r.value(e(a)):r.value),!r.isEvent&&s&&s.postMessage(JSON.stringify(e(a)))});return c.onMount=e=>{let t=t=>{e({isEvent:!0,value:JSON.parse(t.data)})};return o.add(t),()=>{o.delete(t)}},t.baseAtom(e=>e(c),(e,t,n)=>{t(c,{isEvent:!1,value:n})})}exports.atomWithBroadcast=r;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{isAtom as e}from"../utilities/is-atom.mjs";import{baseAtom as t}from"./base-atom.mjs";import{isFunction as n}from"@stryke/type-checks/is-function";function r(r,i){let a=e(i)?i:t(i),o
|
|
1
|
+
import{isAtom as e}from"../utilities/is-atom.mjs";import{baseAtom as t}from"./base-atom.mjs";import{isFunction as n}from"@stryke/type-checks/is-function";function r(r,i){let a=e(i)?i:t(i),o=/* @__PURE__ */ new Set,s=typeof BroadcastChannel>`u`?void 0:new BroadcastChannel(r);s&&(s.onmessage=e=>{for(let t of o)t(e)});let c=t(e=>e(a),(e,t,r)=>{t(a,n(r.value)?r.value(e(a)):r.value),!r.isEvent&&s&&s.postMessage(JSON.stringify(e(a)))});return c.onMount=e=>{let t=t=>{e({isEvent:!0,value:JSON.parse(t.data)})};return o.add(t),()=>{o.delete(t)}},t(e=>e(c),(e,t,n)=>{t(c,{isEvent:!1,value:n})})}export{r as atomWithBroadcast};
|
|
2
2
|
//# sourceMappingURL=atom-with-broadcast.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-broadcast.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-broadcast.mjs","names":["atomWithBroadcast","valueAtom","isAtom","initialValueOrAtom","baseAtom","listeners","channel","key","listener","message","broadcastAtom","get","set","isFunction","update","setAtom","event"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-compare.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-compare.mjs","names":["atomWithCompare","atomWithReducer","initialValue","areEqual","prev","next"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-debounce.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-debounce.mjs","names":["atomWithDebounce","prevTimeoutAtom","baseAtom","initialValueAtom","isAtom","initialValueOrAtom","atomWithWrapper","innerValueAtom","_currentValueAtom","innerValue","get","set","update","isDebouncingAtom","debouncedValueAtom","prevValue","nextValue","RESET","isFunction","onDebounceStart","onDebounceEnd","shouldDebounceOnReset","nextTimeoutId","debounceMs"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=require("jotai/vanilla"),t=require("@stryke/helpers/is-equal");function n(n){let r=(0,e.atom)(0),i=(0,e.atom)(()=>({inProgress:0,mounted:!1,promise:void 0,pendingError:void 0,cleanup:void 0,fromCleanup:!1,isRecursing:!1,isRefreshing:!1,get:(()=>{}),set:(()=>{})}),(e,t)=>{let n=e(i);return Object.assign(n,{mounted:!0,get:e,set:t}),t(r,e=>e+1),()=>{n.mounted=!1,l(n),u(n)}});i.onMount=e=>e();let a=(0,e.atom)(async e=>{e(r);let a=e(i);if(!a.mounted||a.isRecursing||a.inProgress&&!a.isRefreshing)return a.promise;u(a);let o
|
|
1
|
+
let e=require("jotai/vanilla"),t=require("@stryke/helpers/is-equal");function n(n){let r=(0,e.atom)(0),i=(0,e.atom)(()=>({inProgress:0,mounted:!1,promise:void 0,pendingError:void 0,cleanup:void 0,fromCleanup:!1,isRecursing:!1,isRefreshing:!1,get:(()=>{}),set:(()=>{})}),(e,t)=>{let n=e(i);return Object.assign(n,{mounted:!0,get:e,set:t}),t(r,e=>e+1),()=>{n.mounted=!1,l(n),u(n)}});i.onMount=e=>e();let a=(0,e.atom)(async e=>{e(r);let a=e(i);if(!a.mounted||a.isRecursing||a.inProgress&&!a.isRefreshing)return a.promise;u(a);let o=/* @__PURE__ */ new Map,s=t=>{let n=e(t);return o.set(t,n),n};s.peek=e=>a.get(e);let d=(...t)=>{try{return++a.inProgress,a.set(...t)}finally{Array.from(o.keys(),e),--a.inProgress}};d.recurse=(n,...r)=>{if(a.fromCleanup){if(process.env.NODE_ENV!==`production`)throw Error(`set.recurse is not allowed in cleanup`);return}try{return a.isRecursing=!0,a.set(n,...r)}finally{a.isRecursing=!1,Array.from(o).some(([n,r])=>!(0,t.isEqual)(e(n),r))&&c(a)}},++a.inProgress;function f(){try{if(a.isRefreshing=!1,!a.mounted)return;l(a),a.cleanup=n(s,d)}catch(e){a.pendingError=e,c(a)}finally{a.promise=void 0,--a.inProgress}}return a.isRefreshing?f():a.promise=Promise.resolve().then(f)});if(process.env.NODE_ENV!==`production`){function o(e,t){Object.defineProperty(e,"debugLabel",{get:()=>`${s.debugLabel??`effect`}:${t}`}),e.debugPrivate=!0}o(r,`refresh`),o(i,`ref`),o(a,`base`)}let s=(0,e.atom)(e=>void e(a));return s;function c(e){try{e.isRefreshing=!0,e.set(r,e=>e+1)}finally{e.isRefreshing=!1}}function l(e){if(e.cleanup)try{e.fromCleanup=!0,e.cleanup()}finally{e.fromCleanup=!1,e.cleanup=void 0}}function u(e){if(`e`in e){let t=e.pendingError;throw delete e.pendingError,t}}}exports.atomWithEffect=n;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{atom as e}from"jotai/vanilla";import{isEqual as t}from"@stryke/helpers/is-equal";function n(n){let r=e(0),i=e(()=>({inProgress:0,mounted:!1,promise:void 0,pendingError:void 0,cleanup:void 0,fromCleanup:!1,isRecursing:!1,isRefreshing:!1,get:(()=>{}),set:(()=>{})}),(e,t)=>{let n=e(i);return Object.assign(n,{mounted:!0,get:e,set:t}),t(r,e=>e+1),()=>{n.mounted=!1,s(n),c(n)}});i.onMount=e=>e();let a=e(async e=>{e(r);let a=e(i);if(!a.mounted||a.isRecursing||a.inProgress&&!a.isRefreshing)return a.promise;c(a);let l
|
|
1
|
+
import{atom as e}from"jotai/vanilla";import{isEqual as t}from"@stryke/helpers/is-equal";function n(n){let r=e(0),i=e(()=>({inProgress:0,mounted:!1,promise:void 0,pendingError:void 0,cleanup:void 0,fromCleanup:!1,isRecursing:!1,isRefreshing:!1,get:(()=>{}),set:(()=>{})}),(e,t)=>{let n=e(i);return Object.assign(n,{mounted:!0,get:e,set:t}),t(r,e=>e+1),()=>{n.mounted=!1,s(n),c(n)}});i.onMount=e=>e();let a=e(async e=>{e(r);let a=e(i);if(!a.mounted||a.isRecursing||a.inProgress&&!a.isRefreshing)return a.promise;c(a);let l=/* @__PURE__ */ new Map,u=t=>{let n=e(t);return l.set(t,n),n};u.peek=e=>a.get(e);let d=(...t)=>{try{return++a.inProgress,a.set(...t)}finally{Array.from(l.keys(),e),--a.inProgress}};d.recurse=(n,...r)=>{if(!a.fromCleanup)try{return a.isRecursing=!0,a.set(n,...r)}finally{a.isRecursing=!1,Array.from(l).some(([n,r])=>!t(e(n),r))&&o(a)}},++a.inProgress;function f(){try{if(a.isRefreshing=!1,!a.mounted)return;s(a),a.cleanup=n(u,d)}catch(e){a.pendingError=e,o(a)}finally{a.promise=void 0,--a.inProgress}}return a.isRefreshing?f():a.promise=Promise.resolve().then(f)});return e(e=>void e(a));function o(e){try{e.isRefreshing=!0,e.set(r,e=>e+1)}finally{e.isRefreshing=!1}}function s(e){if(e.cleanup)try{e.fromCleanup=!0,e.cleanup()}finally{e.fromCleanup=!1,e.cleanup=void 0}}function c(e){if(`e`in e){let t=e.pendingError;throw delete e.pendingError,t}}}export{n as atomWithEffect};
|
|
2
2
|
//# sourceMappingURL=atom-with-effect.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-effect.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-effect.mjs","names":["atomWithEffect","refreshAtom","atom","refAtom","ref","get","set","c","cleanup","throwPendingError","mount","baseAtom","currDeps","getter","value","a","anAtom","setter","args","isEqual","refresh","runEffect","effect","error"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-listeners.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-listeners.mjs","names":["atomWithListeners","rootAtom","isAtom","initialValue","baseAtom","listenersAtom","get","prevVal","set","arg","newVal","callback","setListeners","useSetAtom","useEffect","prev","index"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-pending.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-pending.mjs","names":["pendingPromise","noop","atomWithPending","baseAtom"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-refresh-and-default.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-refresh-and-default.mjs","names":["atomWithRefreshAndDefault","overwrittenAtom","baseAtom","lastState","get","refreshAtom","getDefault","set","update"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-refresh.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-refresh.mjs","names":["atomWithRefresh","refreshCounter","baseAtom","get","fn","set","i"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-toggle.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-toggle.mjs","names":["atomWithToggle","anAtom","baseAtom","initialValue","update","nextValue","get","set"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-web-storage.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-web-storage.ts"],"mappings":";;;;;cAiCa,gBAAiB,aAC5B,aAAa,UAAU,YAAY;;;;;;;;;iBAWrB,mBAAmB,QACjC,aACA,oBACI,cAAc,UACd,SACA,aAAa,
|
|
1
|
+
{"version":3,"file":"atom-with-web-storage.d.cts","names":["SetStateAction"],"sources":["../../../src/base/atoms/atom-with-web-storage.ts"],"mappings":";;;;;cAiCa,gBAAiB,aAC5B,aAAa,UAAU,YAAY;;;;;;;;;iBAWrB,mBAAmB,QACjC,aACA,oBACI,cAAc,UACd,SACA,aAAa,SAASA,iBAAe,iBACzC,aACE,aAAa,UAAU,YAAY,SACrC;EAAY;IAAwB,kBAAkB,sBACrD,aAAa,SAASA,iBAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-web-storage.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-web-storage.ts"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-web-storage.d.mts","names":["SetStateAction"],"sources":["../../../src/base/atoms/atom-with-web-storage.ts"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-web-storage.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-web-storage.mjs","names":["getWebStorage","createWebStorage","atomWithWebStorage","debounceMs","options","getOnInit","valueAtom","isAtom","initialValueOrAtom","baseAtom","debouncedStorageAtom","atomWithDebounce","atomWithStorage","key","webStorage","debouncedBroadcastAtom","atomWithBroadcast","wrapperAtom","get","nextValue","isFunction","update","set","effectAtom","atomWithEffect","next"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-wrapper.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-wrapper.mjs","names":["wrapFn","isFunction","fnOrValue","unwrapFn","wrappedFnOrValue","atomWithWrapper","rootAtom","baseAtom","initialValue","get","set","value"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-atom.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"base-atom.mjs","names":["jotaiAtom","baseAtom","result","atom","readOrInitialValue","write","setAtomDebugLabel","label"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-atom-effect.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"use-atom-effect.mjs","names":["useAtomEffect","useAtomValue","loadable","useMemoStable","atomWithEffect","effectFn","deps"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-hydrate-molecule.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"use-hydrate-molecule.mjs","names":["useHydrateMolecule","values","key","atoms","initialValue","initialValues","useHydrateAtoms"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-prepare-atoms.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"use-prepare-atoms.mjs","names":["useMemoList","a","b","state","setState","useState","list","listChanged","compareFn","arg","index","usePrepareAtoms","stableAtoms","atoms","useAtomValue","useMemo","atom","get","stableAtom","options"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../utilities/is-atom.cjs");let t=require("
|
|
1
|
+
const e=require("../utilities/is-atom.cjs");let t=require("@stryke/helpers/is-equal"),n=require("jotai"),r=require("react");const i=e=>{let n=(0,r.useRef)(e);return(0,t.isEqual)(n.current,e)||(n.current=e),n.current},a=(t,a,o)=>{for(let s of Object.keys(t)){let c=a[s];e.isAtom(c)&&(c=(0,n.useAtomValue)(c)),c=i(c);let l=(0,n.useSetAtom)(t[s],{store:o});(0,r.useEffect)(()=>{c!==void 0&&l(c)},[l,c])}};exports.useSyncMolecule=a;
|
|
@@ -3,6 +3,11 @@ import { JotaiStore, WritableAtomRecord } from "../../types.cjs";
|
|
|
3
3
|
type UseSyncAtoms<T> = (values: Partial<Record<keyof T, any>>, store?: JotaiStore) => void;
|
|
4
4
|
/**
|
|
5
5
|
* Update atoms with new values on changes.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Values are compared deeply, so a provider that re-renders with equivalent
|
|
9
|
+
* `initialState` does not write to its atoms again. Without this, two
|
|
10
|
+
* providers sharing a molecule scope overwrite each other on every render.
|
|
6
11
|
*/
|
|
7
12
|
declare const useSyncMolecule: <T extends object>(atoms: WritableAtomRecord<T>, values: Partial<Record<keyof T, unknown>>, store?: JotaiStore) => void;
|
|
8
13
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sync-molecule.d.cts","names":[],"sources":["../../../src/base/hooks/use-sync-molecule.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"use-sync-molecule.d.cts","names":[],"sources":["../../../src/base/hooks/use-sync-molecule.ts"],"mappings":";;KA6BY,aAAa,MACvB,QAAQ,QAAQ,aAAa,UAC7B,QAAQ;;;;;;;;;cAwBG,kBAAmB,kBAC9B,OAAO,mBAAmB,IAC1B,QAAQ,QAAQ,aAAa,cAC7B,QAAQ"}
|
|
@@ -3,6 +3,11 @@ import { JotaiStore, WritableAtomRecord } from "../../types.mjs";
|
|
|
3
3
|
type UseSyncAtoms<T> = (values: Partial<Record<keyof T, any>>, store?: JotaiStore) => void;
|
|
4
4
|
/**
|
|
5
5
|
* Update atoms with new values on changes.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Values are compared deeply, so a provider that re-renders with equivalent
|
|
9
|
+
* `initialState` does not write to its atoms again. Without this, two
|
|
10
|
+
* providers sharing a molecule scope overwrite each other on every render.
|
|
6
11
|
*/
|
|
7
12
|
declare const useSyncMolecule: <T extends object>(atoms: WritableAtomRecord<T>, values: Partial<Record<keyof T, unknown>>, store?: JotaiStore) => void;
|
|
8
13
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{isAtom as e}from"../utilities/is-atom.mjs";import{useAtomValue as
|
|
1
|
+
import{isAtom as e}from"../utilities/is-atom.mjs";import{isEqual as t}from"@stryke/helpers/is-equal";import{useAtomValue as n,useSetAtom as r}from"jotai";import{useEffect as i,useRef as a}from"react";const o=e=>{let n=a(e);return t(n.current,e)||(n.current=e),n.current},s=(t,a,s)=>{for(let c of Object.keys(t)){let l=a[c];e(l)&&(l=n(l)),l=o(l);let u=r(t[c],{store:s});i(()=>{l!==void 0&&u(l)},[u,l])}};export{s as useSyncMolecule};
|
|
2
2
|
//# sourceMappingURL=use-sync-molecule.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sync-molecule.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"use-sync-molecule.mjs","names":["useDeepStable","ref","useRef","value","isEqual","useSyncMolecule","key","atoms","values","isAtom","useAtomValue","setAtom","useSetAtom","useEffect"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-molecule.d.cts","names":[],"sources":["../../../src/base/utilities/create-molecule.tsx"],"mappings":";;;;;KAoDY,SAAS;EACnB;IACE;KAEQ,oBAAoB;EAC9B;EACA;;KAGU,cACV,eAAe,qBAAqB,UAAU,wBAC5C,oBAAoB;cAEX;;;;;;;;iBASG,YACd,uBACA;EACE;IACD;;;;;;;iBAWa,IAAI,QAClB,YAAY,SAAS,UAAU,cAAc,UAC5C;KAIE,iBACH,eAAe,qBAAqB,UAAU,2BAE7C,cAAc;EACb,KAAK,OAAO,cAAc,WAAW,WAChC,
|
|
1
|
+
{"version":3,"file":"create-molecule.d.cts","names":["MoleculeScopeOptions","MoleculeScopeOptionsBase"],"sources":["../../../src/base/utilities/create-molecule.tsx"],"mappings":";;;;;KAoDY,SAAS;EACnB;IACE;KAEQ,oBAAoB;EAC9B;EACA;;KAGU,cACV,eAAe,qBAAqB,UAAU,wBAC5C,oBAAoB;cAEX;;;;;;;;iBASG,YACd,uBACA;EACE;IACD;;;;;;;iBAWa,IAAI,QAClB,YAAY,SAAS,UAAU,cAAc,UAC5C;KAIE,iBACH,eAAe,qBAAqB,UAAU,2BAE7C,cAAc;EACb,KAAK,OAAO,cAAc,WAAW,WAChC,OAAOA,2BAAyB;EAErC,KAAK,OAAO,cAAc,mBAClB,eACA,aACA,YAEH,OAAOA,+BAA6B,MAAM,UAAU;EAEzD,OAAO,YAAY,OAAO,uBACrB,OAAOA;;KAKJA,yBAAuBC;UAElB,YACf,eAAe,qBAAqB,UAAU;EAE9C,UAAU,SAAS,cAAc;EACjC,UAAU,MAAM,GAAG,sBAAsB;EACzC,OAAO;EACP,cAAc,OAAOD,2BAAyB,cAAc;EAC5D,MAAM,OAAOA,2BAAyB,iBAAiB;;KAG7C,iBAAiB,qBAAqB,oBAChD,WAAW;KAED,sBACV,eAAe,qBAAqB,UAAU,wBAC5C,KAAK;EACP;EACA,eAAe,QAAQ,wBAAwB;;KAGrC;KACA,cACV,eAAe,qBAAqB,UAAU,yBAC3C,OAAO,cAAc,YAAY;UAErB,gBACf,eAAe,qBAAqB,UAAU;EAE9C;EACA,QAAQ;EACR,UAAU,cAAc;EACxB,YAAY;;;;;;;;;iBAUE,kBACd,eAAe,qBAAqB,UAAU,sBAE9C,cAAc,kBAAkB,QAChC,SAAS,gBAAgB,UACxB,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-molecule.d.mts","names":[],"sources":["../../../src/base/utilities/create-molecule.tsx"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"create-molecule.d.mts","names":["createScope","use","MoleculeScopeOptions","MoleculeScopeOptionsBase"],"sources":["../../../src/base/utilities/create-molecule.tsx"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-molecule.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"create-molecule.mjs","names":["createScope","createScopeBase","use","useBase","useMolecule","useMoleculeBase","DEFAULT_SCOPE","createScope$1","createScope","defaultValue","options","use$1","use","dependency","createMoleculeApi","Scope","isString","Molecule","molecule","currentScope","scope","result","constructFn","atom","key","isAtom","setAtomDebugLabel","onMount","unmount","isFunction","onUnmount","useMolecule$1","useMolecule","opts","atoms","keys","k","proxyKey","useAtomValue","isWritableAtom","useSetAtom","isResetAtom","setAtom","useCallback","RESET","MoleculeStateManager","useSyncMolecule","initialState","Provider","props","ScopeProvider","children"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-web-storage.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"create-web-storage.mjs","names":["StormParser","createWebStorage","lastStrValue","lastValue","storage","parse","strValue","nextValue","isPromise","result","initialValue","getStringStorage","key","isPromiseLike","value","StormJSON","newValue","storageEventCallback","e","callback"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"debounce.mjs","names":["DEBOUNCE_DEFAULTS","debounce","options","wait","leadingValue","timeout","resolveList","currentPromise","trailingArgs","applyFn","_applyPromised","fn","_this","args","promise","shouldCallNow","_resolve","resolve"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-atom.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"is-atom.mjs","names":["isAtom","isPlainObject","value","isFunction","isWritableAtom","isResetAtom"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-atom-debug.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"set-atom-debug.mjs","names":["setAtomDebugLabel","isDevelopment","label","setAtomDebugPrivate"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-field.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-field.mjs","names":["atomWithFieldItems","atomWithDefault","options","get","optionsAtom","value","valueAtom","disabled","disabledAtom","ret","existing","item"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom-with-messages.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"atom-with-messages.mjs","names":["getMessageType","messages","validationResults","type","message","existing","getFieldsMessageTypes","isValidationResults","messageMap","field","ret","atomWithFieldsMessageTypes","atom","get","validationResultsAtom","getFieldsMessageList","_","isSetObject","atomWithFieldsMessageList","atomWithMessageTypes","atomWithMessages","dangerMessages","dangerMessagesAtom","warningMessages","warningMessagesAtom","infoMessages","infoMessagesAtom","discoveryMessages","discoveryMessagesAtom","successMessages","successMessagesAtom","positiveMessages","positiveMessagesAtom","negativeMessages","negativeMessagesAtom","atomWithTheme","options","optionsAtom"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-field-actions.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"use-field-actions.mjs","names":["useFieldActions","field","FieldApi","validate","useAtomCallback","useCallback","options","get","upperCaseFirst","cause","ValidationCause","previousValue","results","validator","nextValue","set","messages","promises","result","isPromise","prev","reset","RESET","initialize","skipIfDirty","initialValue","change","touch","value","nextParsed","focus","blur","setFocused","focused","toggleFocused","ref","tabIndex"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-field-ref.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"use-field-ref.mjs","names":["useFieldRef","ref","useRef","options","FieldApi","refs","useMaskito","forwardedRef","useComposedRefs"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-form-actions.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"use-form-actions.mjs","names":["useFormActions","form","FormApi","useAtomCallback","useCallback","options","get","upperCaseFirst","cause","ValidationCause","previousValues","results","validator","nextValues","set","messages","promises","result","isPromise","prev","values"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../base/utilities/create-molecule.cjs");require("../../base/index.cjs");const t=require("../atoms/atom-with-field.cjs"),n=require("../atoms/atom-with-messages.cjs"),r=require("../utilities/validators.cjs"),i=require("./form-molecule.cjs");let a=require("@stryke/type-checks/is-function"),o=require("jotai/utils"),s=require("@stryke/helpers/is-equal"),c=require("jotai"),l=require("@stryke/type-checks/is-string"),u=require("@stryke/helpers/deep-merge"),ee=require("@stryke/helpers/get-field"),d=require("@stryke/helpers/to-path"),f=require("@stryke/type-checks/is-set"),p=require("jotai-optics");const m={theme:`base`,size
|
|
1
|
+
const e=require("../../base/utilities/create-molecule.cjs");require("../../base/index.cjs");const t=require("../atoms/atom-with-field.cjs"),n=require("../atoms/atom-with-messages.cjs"),r=require("../utilities/validators.cjs"),i=require("./form-molecule.cjs");let a=require("@stryke/type-checks/is-function"),o=require("jotai/utils"),s=require("@stryke/helpers/is-equal"),c=require("jotai"),l=require("@stryke/type-checks/is-string"),u=require("@stryke/helpers/deep-merge"),ee=require("@stryke/helpers/get-field"),d=require("@stryke/helpers/to-path"),f=require("@stryke/type-checks/is-set"),p=require("jotai-optics");const m={theme:`base`,size:`md`,debounceMs:100,isEqual:s.isEqual,required:!1,disabled:!1,clearable:!1,initialValue:null},h=e.createMoleculeApi(s=>{let h=e.use(i.FormApi.Scope),g=(0,c.atom)(()=>h),_=e.use(i.FormApi.Molecule),v=(0,c.atom)(m),y=(0,c.atom)(e=>{let t=e(_.options),n=e(v),i=(0,u.deepMerge)(t.defaultFieldOptions,n);return(0,u.deepMerge)({validate:{onBlur:i.required?[r.requiredValidator]:[]}},i)},(e,t,n)=>{let r={};r=(0,a.isFunction)(n)?n(e(v)):n===o.RESET?{}:n,t(v,(0,u.deepMerge)(m,r))}),b=`${h}-`,x=(0,d.toPath)(s.startsWith(b)?s.slice(b.length):s.includes(`-`)?s.slice(s.indexOf(`-`)+1):s),S=(0,c.atom)(()=>x),C=(0,c.atom)(e=>e(S).slice(-1)[0]),w=(0,p.focusAtom)(_.focusedFields,e=>e.path(...x)),T=(0,p.focusAtom)(_.requiredFields,e=>e.path(...x)),E=(0,p.focusAtom)(_.disabledFields,e=>e.path(...x)),D=(0,c.atom)(e=>e(T)??e(y).required,(e,t,n)=>{t(T,n)}),O=(0,c.atom)(e=>e(E)??e(y).disabled,(e,t,n)=>{t(E,n)}),k=(0,c.atom)(e=>e(y).clearable),A=(0,p.focusAtom)(_.touchedFields,e=>e.path(...x)),j=(0,p.focusAtom)(_.blurredFields,e=>e.path(...x)),te=(0,p.focusAtom)(_.validatingFields,e=>e.path(...x)),M=(0,p.focusAtom)(_.validationResultsFields,e=>e.path(...x)),ne=(0,p.focusAtom)(_.tabIndexes,e=>e.path(...x)),N=(0,p.focusAtom)(_.refs,e=>e.path(...x)),P=(0,p.focusAtom)(_.initialValues,e=>e.path(...x)),F=(0,p.focusAtom)(_.values,e=>e.path(...x)),I=(0,c.atom)(e=>e(y).isEqual(e(F),e(P))),L=n.atomWithFieldsMessageTypes(M,`danger`),R=n.atomWithFieldsMessageTypes(M,`warning`),z=n.atomWithFieldsMessageTypes(M,`info`),B=n.atomWithFieldsMessageTypes(M,`discovery`),V=n.atomWithFieldsMessageTypes(M,`success`),H=n.atomWithFieldsMessageTypes(M,`positive`),U=n.atomWithFieldsMessageTypes(M,`negative`),W=n.atomWithFieldsMessageList(M,`danger`),G=n.atomWithFieldsMessageList(M,`warning`),K=n.atomWithFieldsMessageList(M,`info`),q=n.atomWithFieldsMessageList(M,`discovery`),J=n.atomWithFieldsMessageList(M,`success`),Y=n.atomWithFieldsMessageList(M,`positive`),X=n.atomWithFieldsMessageList(M,`negative`),Z=(0,c.atom)(e=>e(W).length>0),Q=(0,c.atom)(e=>!e(Z)),re=(0,c.atom)(e=>{let t=e(y),n=e(F),r;return r=t?.format?t.format(n):n,(0,f.isSet)(r)?(0,l.isString)(r)?r:String(r):``}),$=t.atomWithFieldItems(y,F,O),ie=(0,o.splitAtom)($),ae=(0,o.atomWithDefault)(e=>e(y).size??`md`);return{options:y,form:g,name:C,path:S,initialValue:P,previousValue:(0,c.atom)(e=>{let t=e(_.previousValues);return(0,ee.getField)(t,e(S).join(`.`))??null}),value:F,formattedValue:re,focused:w,required:D,disabled:O,clearable:k,touched:A,blurred:j,validating:te,validationResults:M,tabIndex:ne,ref:N,pristine:(0,c.atom)(e=>!e(I)),dirty:I,items:$,itemsAtoms:ie,size:ae,errors:L,warnings:R,info:z,discovery:B,success:V,positive:H,negative:U,dangerMessages:W,warningMessages:G,infoMessages:K,discoveryMessages:q,successMessages:J,positiveMessages:Y,negativeMessages:X,theme:n.atomWithTheme(y,W,G,K,q,J,Y,X),messages:n.atomWithMessages(W,G,K,q,J,Y,X),invalid:Z,valid:Q}},{type:`field`});exports.DEFAULT_FIELD_OPTIONS=m,exports.FieldApi=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-molecule.d.cts","names":[],"sources":["../../../src/form/molecules/field-molecule.ts"],"mappings":";;;;cA+Ca,uBAAuB;cAWvB,
|
|
1
|
+
{"version":3,"file":"field-molecule.d.cts","names":["_$_____0.MoleculeApi"],"sources":["../../../src/form/molecules/field-molecule.ts"],"mappings":";;;;cA+Ca,uBAAuB;cAWvB,UAAQA,YAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-molecule.d.mts","names":[],"sources":["../../../src/form/molecules/field-molecule.ts"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"field-molecule.d.mts","names":["_$_____0.MoleculeApi"],"sources":["../../../src/form/molecules/field-molecule.ts"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createMoleculeApi as e,use as t}from"../../base/utilities/create-molecule.mjs";import"../../base/index.mjs";import{atomWithFieldItems as n}from"../atoms/atom-with-field.mjs";import{atomWithFieldsMessageList as r,atomWithFieldsMessageTypes as i,atomWithMessages as ee,atomWithTheme as
|
|
1
|
+
import{createMoleculeApi as e,use as t}from"../../base/utilities/create-molecule.mjs";import"../../base/index.mjs";import{atomWithFieldItems as n}from"../atoms/atom-with-field.mjs";import{atomWithFieldsMessageList as r,atomWithFieldsMessageTypes as i,atomWithMessages as ee,atomWithTheme as te}from"../atoms/atom-with-messages.mjs";import{requiredValidator as a}from"../utilities/validators.mjs";import{FormApi as o}from"./form-molecule.mjs";import{isFunction as ne}from"@stryke/type-checks/is-function";import{RESET as re,atomWithDefault as ie,splitAtom as s}from"jotai/utils";import{isEqual as c}from"@stryke/helpers/is-equal";import{atom as l}from"jotai";import{isString as ae}from"@stryke/type-checks/is-string";import{deepMerge as u}from"@stryke/helpers/deep-merge";import{getField as d}from"@stryke/helpers/get-field";import{toPath as f}from"@stryke/helpers/to-path";import{isSet as p}from"@stryke/type-checks/is-set";import{focusAtom as m}from"jotai-optics";const h={theme:`base`,size:`md`,debounceMs:100,isEqual:c,required:!1,disabled:!1,clearable:!1,initialValue:null},g=e(e=>{let c=t(o.Scope),g=l(()=>c),_=t(o.Molecule),v=l(h),y=l(e=>{let t=e(_.options),n=e(v),r=u(t.defaultFieldOptions,n);return u({validate:{onBlur:r.required?[a]:[]}},r)},(e,t,n)=>{let r={};r=ne(n)?n(e(v)):n===re?{}:n,t(v,u(h,r))}),b=`${c}-`,x=f(e.startsWith(b)?e.slice(b.length):e.includes(`-`)?e.slice(e.indexOf(`-`)+1):e),S=l(()=>x),C=l(e=>e(S).slice(-1)[0]),w=m(_.focusedFields,e=>e.path(...x)),T=m(_.requiredFields,e=>e.path(...x)),E=m(_.disabledFields,e=>e.path(...x)),oe=l(e=>e(T)??e(y).required,(e,t,n)=>{t(T,n)}),D=l(e=>e(E)??e(y).disabled,(e,t,n)=>{t(E,n)}),O=l(e=>e(y).clearable),k=m(_.touchedFields,e=>e.path(...x)),A=m(_.blurredFields,e=>e.path(...x)),j=m(_.validatingFields,e=>e.path(...x)),M=m(_.validationResultsFields,e=>e.path(...x)),N=m(_.tabIndexes,e=>e.path(...x)),P=m(_.refs,e=>e.path(...x)),F=m(_.initialValues,e=>e.path(...x)),I=m(_.values,e=>e.path(...x)),L=l(e=>e(y).isEqual(e(I),e(F))),R=i(M,`danger`),z=i(M,`warning`),B=i(M,`info`),V=i(M,`discovery`),H=i(M,`success`),U=i(M,`positive`),W=i(M,`negative`),G=r(M,`danger`),K=r(M,`warning`),q=r(M,`info`),J=r(M,`discovery`),Y=r(M,`success`),X=r(M,`positive`),Z=r(M,`negative`),Q=l(e=>e(G).length>0),se=l(e=>!e(Q)),ce=l(e=>{let t=e(y),n=e(I),r;return r=t?.format?t.format(n):n,p(r)?ae(r)?r:String(r):``}),$=n(y,I,D),le=s($),ue=ie(e=>e(y).size??`md`);return{options:y,form:g,name:C,path:S,initialValue:F,previousValue:l(e=>{let t=e(_.previousValues);return d(t,e(S).join(`.`))??null}),value:I,formattedValue:ce,focused:w,required:oe,disabled:D,clearable:O,touched:k,blurred:A,validating:j,validationResults:M,tabIndex:N,ref:P,pristine:l(e=>!e(L)),dirty:L,items:$,itemsAtoms:le,size:ue,errors:R,warnings:z,info:B,discovery:V,success:H,positive:U,negative:W,dangerMessages:G,warningMessages:K,infoMessages:q,discoveryMessages:J,successMessages:Y,positiveMessages:X,negativeMessages:Z,theme:te(y,G,K,q,J,Y,X,Z),messages:ee(G,K,q,J,Y,X,Z),invalid:Q,valid:se}},{type:`field`});export{h as DEFAULT_FIELD_OPTIONS,g as FieldApi};
|
|
2
2
|
//# sourceMappingURL=field-molecule.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-molecule.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"field-molecule.mjs","names":["DEFAULT_FIELD_OPTIONS","FieldApi","createMoleculeApi","formScope","use","FormApi","formScopeAtom","atom","form","optionsBaseAtom","optionsAtom","formOptions","get","options","result","deepMerge","requiredValidator","nextValue","isFunction","update","RESET","set","formPrefix","path","toPath","scope","pathAtom","nameAtom","focusedAtom","focusAtom","optic","requiredStateAtom","disabledStateAtom","requiredAtom","disabledAtom","clearableAtom","touchedAtom","blurredAtom","validatingAtom","validationResultsAtom","tabIndexAtom","refAtom","initialValueAtom","valueAtom","dirtyAtom","errorsAtom","atomWithFieldsMessageTypes","warningsAtom","infoAtom","discoveryAtom","successesAtom","positivesAtom","negativesAtom","errorMessagesAtom","atomWithFieldsMessageList","warningMessagesAtom","infoMessagesAtom","discoveryMessagesAtom","successMessagesAtom","positiveMessagesAtom","negativeMessagesAtom","invalidAtom","validAtom","formattedValueAtom","value","formattedValue","isSet","isString","itemsAtom","atomWithFieldItems","itemsAtomsAtom","splitAtom","sizeAtom","atomWithDefault","previousValues","getField","atomWithTheme","atomWithMessages"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-molecule.d.cts","names":[],"sources":["../../../src/form/molecules/form-molecule.ts"],"mappings":";;;;cA8Ca,sBAAsB;cAStB,
|
|
1
|
+
{"version":3,"file":"form-molecule.d.cts","names":["_$_____0.MoleculeApi"],"sources":["../../../src/form/molecules/form-molecule.ts"],"mappings":";;;;cA8Ca,sBAAsB;cAStB,SAAOA,YAAA,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-molecule.d.mts","names":[],"sources":["../../../src/form/molecules/form-molecule.ts"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"form-molecule.d.mts","names":["_$_____0.MoleculeApi"],"sources":["../../../src/form/molecules/form-molecule.ts"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-molecule.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"form-molecule.mjs","names":["DEFAULT_FORM_OPTIONS","FormApi","createMoleculeApi","optionsBaseAtom","atomWithReset","optionsAtom","atom","get","nextValue","isFunction","update","RESET","set","deepMerge","nameAtom","scope","disabledAtom","atomWithDefault","formValidatingAtom","previousValuesBaseAtom","previousValuesAtom","initialValuesAtom","valuesBaseAtom","valuesAtom","validationResultsAtom","submittingAtom","submittedAtom","submitAttemptsAtom","focusedFieldsAtom","requiredFieldsAtom","disabledFieldsAtom","touchedFieldsAtom","blurredFieldsAtom","validatingFieldsAtom","validationResultsFieldsAtom","refsAtom","tabIndexesBaseAtom","tabIndexesAtom","tabIndexes","isString","tabIndex","isNumber","flat","flattenObject","lastIndex","key","setField","dirtyAtom","pristineAtom","blurredAtom","blurredFields","touchedAtom","touchedFields","validatingAtom","validatingFields","formErrorsAtom","atomWithMessageTypes","formWarningsAtom","formInfoAtom","formHelpAtom","formSuccessesAtom","formPositivesAtom","formNegativesAtom","isFormInvalidAtom","errorFieldsAtom","atomWithFieldsMessageTypes","warningFieldsAtom","infoFieldsAtom","helpFieldsAtom","successFieldsAtom","fieldErrorMessagesAtom","atomWithFieldsMessageList","fieldWarningMessagesAtom","fieldInfoMessagesAtom","fieldHelpMessagesAtom","fieldsSuccessMessagesAtom","invalidAtom","validAtom","canSubmitAtom","atomWithMessages","atomWithTheme"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldProvider.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"FieldProvider.mjs","names":["FieldStateManager","useFieldActions","form","FormApi","field","FieldApi","useAtomEffect","value","get","abortController","options","delay","promises","validate","ValidationCause","AbortError","focused","isBoolean","set","FieldProvider","props","formName","theme","useThemeName","name","children"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormProvider.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"FormProvider.mjs","names":["FormStateManager","useFormActions","molecule","FormApi","theme","useThemeName","setOptions","useEffect","props","useAtomEffect","values","get","options","abortController","delay","promises","validate","ValidationCause","AbortError","FormProvider","name","children"],"sources":[],"mappings":""}
|
package/dist/form/types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={INITIALIZE:`initialize`,CHANGE:`change`,BLUR:`blur`,SUBMIT:`submit`,SERVER:`server`};exports.ValidationCause=e;
|
|
1
|
+
require("@cyclone-ui/helpers");const e={INITIALIZE:`initialize`,CHANGE:`change`,BLUR:`blur`,SUBMIT:`submit`,SERVER:`server`};exports.ValidationCause=e;
|
package/dist/form/types.d.cts
CHANGED
|
@@ -3,6 +3,7 @@ import { MoleculeState } from "../base/utilities/create-molecule.cjs";
|
|
|
3
3
|
import { Atom, Getter, PrimitiveAtom, SetStateAction, Setter, WritableAtom } from "jotai";
|
|
4
4
|
import { RESET } from "jotai/utils";
|
|
5
5
|
import { Ref } from "react";
|
|
6
|
+
import { FormControlSize } from "@cyclone-ui/helpers";
|
|
6
7
|
import { MaskitoOptions } from "@maskito/core";
|
|
7
8
|
import { MaybePromise } from "@stryke/types/base";
|
|
8
9
|
import { SelectOption, SelectOptionValue } from "@stryke/types/form";
|
|
@@ -56,7 +57,7 @@ interface FormOptions<TFormValues extends Record<string, any> = Record<string, a
|
|
|
56
57
|
/**
|
|
57
58
|
* The validations to run on the form when certain events occur.
|
|
58
59
|
*/
|
|
59
|
-
validate?: Record<`on${Capitalize<ValidationCause>}`, Validator<FormValuesState<TFormValues>>[] | undefined
|
|
60
|
+
validate?: Partial<Record<`on${Capitalize<ValidationCause>}`, Validator<FormValuesState<TFormValues>>[] | undefined>>;
|
|
60
61
|
/**
|
|
61
62
|
* How long to debounce the `onChange` event and validation calls in milliseconds.
|
|
62
63
|
*
|
|
@@ -153,9 +154,9 @@ interface FieldOptions<TFieldValue> {
|
|
|
153
154
|
/**
|
|
154
155
|
* The default size of the field.
|
|
155
156
|
*
|
|
156
|
-
* @defaultValue "
|
|
157
|
+
* @defaultValue "md"
|
|
157
158
|
*/
|
|
158
|
-
size?:
|
|
159
|
+
size?: FormControlSize;
|
|
159
160
|
/**
|
|
160
161
|
* The default required status of the field.
|
|
161
162
|
*
|
|
@@ -184,7 +185,7 @@ interface FieldOptions<TFieldValue> {
|
|
|
184
185
|
/**
|
|
185
186
|
* The validations to run on the field when certain events occur.
|
|
186
187
|
*/
|
|
187
|
-
validate?: Record<`on${Capitalize<ValidationCause>}`, Validator<TFieldValue>[] | undefined
|
|
188
|
+
validate?: Partial<Record<`on${Capitalize<ValidationCause>}`, Validator<TFieldValue>[] | undefined>>;
|
|
188
189
|
/**
|
|
189
190
|
* How long to debounce the `onChange` event and validation calls in milliseconds.
|
|
190
191
|
*
|
|
@@ -263,7 +264,7 @@ interface FieldAtoms<TFieldValue> {
|
|
|
263
264
|
formattedValue: Atom<string>;
|
|
264
265
|
items: WritableAtom<SelectOption<SelectOptionValue, string>[], [SetStateAction<SelectOption<SelectOptionValue, string>[]>], void>;
|
|
265
266
|
itemsAtoms: WritableAtom<PrimitiveAtom<SelectOption<SelectOptionValue, string>>[], [SplitAtomAction<SelectOption<SelectOptionValue, string>>], void>;
|
|
266
|
-
size: WritableAtom
|
|
267
|
+
size: WritableAtom<FormControlSize, [SetStateAction<FormControlSize>], void>;
|
|
267
268
|
errors: Atom<ValidationDetail<"danger">[]>;
|
|
268
269
|
warnings: Atom<ValidationDetail<"warning">[]>;
|
|
269
270
|
info: Atom<ValidationDetail<"info">[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/form/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":["ValidationDetails"],"sources":["../../src/form/types.ts"],"mappings":"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"}
|
package/dist/form/types.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ import { MoleculeState } from "../base/utilities/create-molecule.mjs";
|
|
|
3
3
|
import { RESET } from "jotai/utils";
|
|
4
4
|
import { Atom, Getter, PrimitiveAtom, SetStateAction, Setter, WritableAtom } from "jotai";
|
|
5
5
|
import { Ref } from "react";
|
|
6
|
+
import { FormControlSize } from "@cyclone-ui/helpers";
|
|
6
7
|
import { MaskitoOptions } from "@maskito/core";
|
|
7
8
|
import { MaybePromise } from "@stryke/types/base";
|
|
8
9
|
import { SelectOption, SelectOptionValue } from "@stryke/types/form";
|
|
@@ -56,7 +57,7 @@ interface FormOptions<TFormValues extends Record<string, any> = Record<string, a
|
|
|
56
57
|
/**
|
|
57
58
|
* The validations to run on the form when certain events occur.
|
|
58
59
|
*/
|
|
59
|
-
validate?: Record<`on${Capitalize<ValidationCause>}`, Validator<FormValuesState<TFormValues>>[] | undefined
|
|
60
|
+
validate?: Partial<Record<`on${Capitalize<ValidationCause>}`, Validator<FormValuesState<TFormValues>>[] | undefined>>;
|
|
60
61
|
/**
|
|
61
62
|
* How long to debounce the `onChange` event and validation calls in milliseconds.
|
|
62
63
|
*
|
|
@@ -153,9 +154,9 @@ interface FieldOptions<TFieldValue> {
|
|
|
153
154
|
/**
|
|
154
155
|
* The default size of the field.
|
|
155
156
|
*
|
|
156
|
-
* @defaultValue "
|
|
157
|
+
* @defaultValue "md"
|
|
157
158
|
*/
|
|
158
|
-
size?:
|
|
159
|
+
size?: FormControlSize;
|
|
159
160
|
/**
|
|
160
161
|
* The default required status of the field.
|
|
161
162
|
*
|
|
@@ -184,7 +185,7 @@ interface FieldOptions<TFieldValue> {
|
|
|
184
185
|
/**
|
|
185
186
|
* The validations to run on the field when certain events occur.
|
|
186
187
|
*/
|
|
187
|
-
validate?: Record<`on${Capitalize<ValidationCause>}`, Validator<TFieldValue>[] | undefined
|
|
188
|
+
validate?: Partial<Record<`on${Capitalize<ValidationCause>}`, Validator<TFieldValue>[] | undefined>>;
|
|
188
189
|
/**
|
|
189
190
|
* How long to debounce the `onChange` event and validation calls in milliseconds.
|
|
190
191
|
*
|
|
@@ -263,7 +264,7 @@ interface FieldAtoms<TFieldValue> {
|
|
|
263
264
|
formattedValue: Atom<string>;
|
|
264
265
|
items: WritableAtom<SelectOption<SelectOptionValue, string>[], [SetStateAction<SelectOption<SelectOptionValue, string>[]>], void>;
|
|
265
266
|
itemsAtoms: WritableAtom<PrimitiveAtom<SelectOption<SelectOptionValue, string>>[], [SplitAtomAction<SelectOption<SelectOptionValue, string>>], void>;
|
|
266
|
-
size: WritableAtom
|
|
267
|
+
size: WritableAtom<FormControlSize, [SetStateAction<FormControlSize>], void>;
|
|
267
268
|
errors: Atom<ValidationDetail<"danger">[]>;
|
|
268
269
|
warnings: Atom<ValidationDetail<"warning">[]>;
|
|
269
270
|
info: Atom<ValidationDetail<"info">[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/form/types.ts"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":["ValidationDetails"],"sources":["../../src/form/types.ts"],"mappings":""}
|
package/dist/form/types.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e={INITIALIZE:`initialize`,CHANGE:`change`,BLUR:`blur`,SUBMIT:`submit`,SERVER:`server`};export{e as ValidationCause};
|
|
1
|
+
import"@cyclone-ui/helpers";const e={INITIALIZE:`initialize`,CHANGE:`change`,BLUR:`blur`,SUBMIT:`submit`,SERVER:`server`};export{e as ValidationCause};
|
|
2
2
|
//# sourceMappingURL=types.mjs.map
|
package/dist/form/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.mjs","names":["ValidationCause"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abort-error.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"abort-error.mjs","names":["AbortError","message"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-validation-results.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"is-validation-results.mjs","names":["isValidationResults","isSetObject","value"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"validators.mjs","names":["requiredValidator","value"],"sources":[],"mappings":""}
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
let e=require("@tamagui/toast
|
|
1
|
+
let e=require("@tamagui/toast");const t=({label:t=`Storm Messages`,children:n,...r})=><e.Toast duration={3e4} position="top-right" swipeDirection="horizontal" swipeThreshold={50}{...r}>
|
|
2
|
+
<e.Toast.Viewport label={t}>
|
|
3
|
+
<e.Toast.List/>
|
|
4
|
+
</e.Toast.Viewport>
|
|
5
|
+
{n}
|
|
6
|
+
</e.Toast>;exports.MessageViewport=t;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToastRootProps } from "@tamagui/toast";
|
|
2
2
|
//#region src/message/components/MessageViewport.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* The properties provided to the MessageViewport component.
|
|
5
5
|
*/
|
|
6
|
-
type MessageViewportProps =
|
|
6
|
+
type MessageViewportProps = Partial<ToastRootProps> & {
|
|
7
|
+
/**
|
|
8
|
+
* The accessible label of the toast region
|
|
9
|
+
*
|
|
10
|
+
* @defaultValue "Storm Messages"
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
};
|
|
7
14
|
/**
|
|
8
|
-
* The MessageViewport component configures Tamagui Toast
|
|
15
|
+
* The MessageViewport component configures Tamagui's composable Toast for messages.
|
|
9
16
|
*
|
|
10
17
|
* @example
|
|
11
18
|
* <MessageProvider>
|
|
@@ -13,7 +20,7 @@ type MessageViewportProps = ToasterProps;
|
|
|
13
20
|
* <MessageViewport />
|
|
14
21
|
* </MessageProvider>
|
|
15
22
|
*/
|
|
16
|
-
declare const MessageViewport: (props: MessageViewportProps) => import("react").JSX.Element;
|
|
23
|
+
declare const MessageViewport: ({ label, children, ...props }: MessageViewportProps) => import("react").JSX.Element;
|
|
17
24
|
//#endregion
|
|
18
25
|
export { MessageViewport, MessageViewportProps };
|
|
19
26
|
//# sourceMappingURL=MessageViewport.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageViewport.d.cts","names":[],"sources":["../../../src/message/components/MessageViewport.tsx"],"mappings":";;;;;KAwBY,uBAAuB
|
|
1
|
+
{"version":3,"file":"MessageViewport.d.cts","names":[],"sources":["../../../src/message/components/MessageViewport.tsx"],"mappings":";;;;;KAwBY,uBAAuB,QAAQ;;;;;;EAMzC;;;;;;;;;;;cAYW,oBAAmB,OAAA,aAAA,SAI7B,yCAAoB,IAAA"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToastRootProps } from "@tamagui/toast";
|
|
2
2
|
//#region src/message/components/MessageViewport.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* The properties provided to the MessageViewport component.
|
|
5
5
|
*/
|
|
6
|
-
type MessageViewportProps =
|
|
6
|
+
type MessageViewportProps = Partial<ToastRootProps> & {
|
|
7
|
+
/**
|
|
8
|
+
* The accessible label of the toast region
|
|
9
|
+
*
|
|
10
|
+
* @defaultValue "Storm Messages"
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
};
|
|
7
14
|
/**
|
|
8
|
-
* The MessageViewport component configures Tamagui Toast
|
|
15
|
+
* The MessageViewport component configures Tamagui's composable Toast for messages.
|
|
9
16
|
*
|
|
10
17
|
* @example
|
|
11
18
|
* <MessageProvider>
|
|
@@ -13,7 +20,7 @@ type MessageViewportProps = ToasterProps;
|
|
|
13
20
|
* <MessageViewport />
|
|
14
21
|
* </MessageProvider>
|
|
15
22
|
*/
|
|
16
|
-
declare const MessageViewport: (props: MessageViewportProps) => import("react").JSX.Element;
|
|
23
|
+
declare const MessageViewport: ({ label, children, ...props }: MessageViewportProps) => import("react").JSX.Element;
|
|
17
24
|
//#endregion
|
|
18
25
|
export { MessageViewport, MessageViewportProps };
|
|
19
26
|
//# sourceMappingURL=MessageViewport.d.mts.map
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Toast as e}from"@tamagui/toast";const t=({label:t=`Storm Messages`,children:n,...r})=><e duration={3e4} position="top-right" swipeDirection="horizontal" swipeThreshold={50}{...r}>
|
|
2
|
+
<e.Viewport label={t}>
|
|
3
|
+
<e.List/>
|
|
4
|
+
</e.Viewport>
|
|
5
|
+
{n}
|
|
6
|
+
</e>;export{t as MessageViewport};
|
|
2
7
|
//# sourceMappingURL=MessageViewport.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageViewport.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"MessageViewport.mjs","names":["MessageViewport","props","Toast","label","children"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=require("@tamagui/toast
|
|
1
|
+
let e=require("@tamagui/toast");const t=()=>{let t=(t,n={})=>{let{heading:r,type:i,...a}=n,o=r||t,s={...a,data:{messageType:i},description:r?t:void 0};switch(i){case`error`:e.toast.error(o,s);break;case`warning`:e.toast.warning(o,s);break;case`info`:e.toast.info(o,s);break;case`success`:e.toast.success(o,s);break;default:(0,e.toast)(o,s)}};return{hide:()=>e.toast.dismiss(),show:t,showInfo:(e,n={})=>{t(e,{...n,type:`info`})},showSuccess:(e,n={})=>{t(e||`Process completed successfully`,{...n,type:`success`})},showWarning:(e,n={})=>{t(e,{...n,type:`warning`})},showError:(e,n={})=>{t(e||`An error occured during processing`,{...n,type:`error`})},showHelp:(e,n={})=>{t(e,n)}}};exports.useMessageActions=t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{toast as e}from"@tamagui/toast
|
|
1
|
+
import{toast as e}from"@tamagui/toast";const t=()=>{let t=(t,n={})=>{let{heading:r,type:i,...a}=n,o=r||t,s={...a,data:{messageType:i},description:r?t:void 0};switch(i){case`error`:e.error(o,s);break;case`warning`:e.warning(o,s);break;case`info`:e.info(o,s);break;case`success`:e.success(o,s);break;default:e(o,s)}};return{hide:()=>e.dismiss(),show:t,showInfo:(e,n={})=>{t(e,{...n,type:`info`})},showSuccess:(e,n={})=>{t(e||`Process completed successfully`,{...n,type:`success`})},showWarning:(e,n={})=>{t(e,{...n,type:`warning`})},showError:(e,n={})=>{t(e||`An error occured during processing`,{...n,type:`error`})},showHelp:(e,n={})=>{t(e,n)}}};export{t as useMessageActions};
|
|
2
2
|
//# sourceMappingURL=use-message-actions.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-message-actions.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"use-message-actions.mjs","names":["useMessageActions","show","toastOptions","options","title","heading","message","data","type","toast"],"sources":[],"mappings":""}
|
package/dist/message/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components/MessageViewport.cjs");require("./components/index.cjs");const t=require("./hooks/use-message-actions.cjs");require("./hooks/index.cjs");const n=require("./providers/MessageProvider.cjs");let r=require("@tamagui/toast
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components/MessageViewport.cjs");require("./components/index.cjs");const t=require("./hooks/use-message-actions.cjs");require("./hooks/index.cjs");const n=require("./providers/MessageProvider.cjs");let r=require("@tamagui/toast");exports.MessageProvider=n.MessageProvider,exports.MessageViewport=e.MessageViewport,Object.defineProperty(exports,"Toast",{enumerable:!0,get:function(){return r.Toast}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return r.toast}}),exports.useMessageActions=t.useMessageActions;
|
package/dist/message/index.d.cts
CHANGED
|
@@ -5,5 +5,5 @@ import "./hooks/index.cjs";
|
|
|
5
5
|
import { MessageProvider, MessageProviderProps } from "./providers/MessageProvider.cjs";
|
|
6
6
|
import "./providers/index.cjs";
|
|
7
7
|
import { BaseMessageViewportProps } from "./types.cjs";
|
|
8
|
-
import { ExternalToast,
|
|
9
|
-
export { BaseMessageViewportProps, type ExternalToast, MessageOptions, MessageProvider, MessageProviderProps, MessageViewport, MessageViewportProps,
|
|
8
|
+
import { ExternalToast, Toast, ToastRootProps, toast } from "@tamagui/toast";
|
|
9
|
+
export { BaseMessageViewportProps, type ExternalToast, MessageOptions, MessageProvider, MessageProviderProps, MessageViewport, MessageViewportProps, Toast, type ToastRootProps, UseMessageActionsResult, toast, useMessageActions };
|
package/dist/message/index.d.mts
CHANGED
|
@@ -5,5 +5,5 @@ import "./hooks/index.mjs";
|
|
|
5
5
|
import { MessageProvider, MessageProviderProps } from "./providers/MessageProvider.mjs";
|
|
6
6
|
import "./providers/index.mjs";
|
|
7
7
|
import { BaseMessageViewportProps } from "./types.mjs";
|
|
8
|
-
import { ExternalToast,
|
|
9
|
-
export { BaseMessageViewportProps, type ExternalToast, MessageOptions, MessageProvider, MessageProviderProps, MessageViewport, MessageViewportProps,
|
|
8
|
+
import { ExternalToast, Toast, ToastRootProps, toast } from "@tamagui/toast";
|
|
9
|
+
export { BaseMessageViewportProps, type ExternalToast, MessageOptions, MessageProvider, MessageProviderProps, MessageViewport, MessageViewportProps, Toast, type ToastRootProps, UseMessageActionsResult, toast, useMessageActions };
|
package/dist/message/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MessageViewport as e}from"./components/MessageViewport.mjs";import"./components/index.mjs";import{useMessageActions as t}from"./hooks/use-message-actions.mjs";import"./hooks/index.mjs";import{MessageProvider as n}from"./providers/MessageProvider.mjs";import{
|
|
1
|
+
import{MessageViewport as e}from"./components/MessageViewport.mjs";import"./components/index.mjs";import{useMessageActions as t}from"./hooks/use-message-actions.mjs";import"./hooks/index.mjs";import{MessageProvider as n}from"./providers/MessageProvider.mjs";import{Toast as r,toast as i}from"@tamagui/toast";export{n as MessageProvider,e as MessageViewport,r as Toast,i as toast,t as useMessageActions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageProvider.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"MessageProvider.mjs","names":["MessageProvider","children"],"sources":[],"mappings":""}
|
package/dist/message/types.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToastRootProps } from "@tamagui/toast";
|
|
2
2
|
//#region src/message/types.d.ts
|
|
3
|
-
type BaseMessageViewportProps =
|
|
3
|
+
type BaseMessageViewportProps = Partial<ToastRootProps>;
|
|
4
4
|
//#endregion
|
|
5
5
|
export { BaseMessageViewportProps };
|
|
6
6
|
//# sourceMappingURL=types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/message/types.ts"],"mappings":";;KAoBY,2BAA2B"}
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/message/types.ts"],"mappings":";;KAoBY,2BAA2B,QAAQ"}
|
package/dist/message/types.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToastRootProps } from "@tamagui/toast";
|
|
2
2
|
//#region src/message/types.d.ts
|
|
3
|
-
type BaseMessageViewportProps =
|
|
3
|
+
type BaseMessageViewportProps = Partial<ToastRootProps>;
|
|
4
4
|
//#endregion
|
|
5
5
|
export { BaseMessageViewportProps };
|
|
6
6
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-theme-actions.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"use-theme-actions.mjs","names":["useThemeActions","themeMolecule","ThemeApi","opts","changeMode","useAtomCallback","useCallback","get","mode","set","RESET"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-theme-store.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"use-theme-store.mjs","names":["useColorThemeName","theme","useThemeName","getThemeColorThemeName","useColorThemeNameExists","themeColorThemeNameExists","useThemeMode","ThemeApi","options"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-molecule.d.cts","names":[],"sources":["../../../src/theme/molecules/theme-molecule.ts"],"mappings":";;;cAsBa,
|
|
1
|
+
{"version":3,"file":"theme-molecule.d.cts","names":["_$_____0.MoleculeApi"],"sources":["../../../src/theme/molecules/theme-molecule.ts"],"mappings":";;;cAsBa,UAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-molecule.d.mts","names":[],"sources":["../../../src/theme/molecules/theme-molecule.ts"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"theme-molecule.d.mts","names":["_$_____0.MoleculeApi"],"sources":["../../../src/theme/molecules/theme-molecule.ts"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-molecule.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"theme-molecule.mjs","names":["ThemeApi","createMoleculeApi","atom","atomWithReset"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ThemeProvider.mjs","names":["ThemeStateManager","props","mode","ThemeApi","TamaguiProvider","disableInjectCSS","children","DEFAULT_ITEMS","ThemeProvider","useMemo","defaultMode"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-helpers.mjs","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"theme-helpers.mjs","names":["getThemeColorThemeName","theme","themeColorThemeNameExists"],"sources":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyclone-ui/state",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A state management package used to handle state in Storm Software applications.",
|
|
6
6
|
"repository": {
|
|
@@ -114,27 +114,28 @@
|
|
|
114
114
|
"dependencies": {
|
|
115
115
|
"@maskito/core": "^3.11.1",
|
|
116
116
|
"@maskito/react": "^3.11.1",
|
|
117
|
-
"@stryke/async": "^0.1.
|
|
118
|
-
"@stryke/env": "^0.20.
|
|
119
|
-
"@stryke/helpers": "^0.10.
|
|
120
|
-
"@stryke/hooks": "^0.4.
|
|
121
|
-
"@stryke/json": "^0.15.
|
|
122
|
-
"@stryke/string-format": "^0.17.
|
|
123
|
-
"@stryke/type-checks": "^0.6.
|
|
124
|
-
"@stryke/types": "^0.12.
|
|
125
|
-
"@stryke/unique-id": "^0.3.
|
|
126
|
-
"@tamagui/core": "
|
|
127
|
-
"@tamagui/portal": "
|
|
128
|
-
"@tamagui/toast": "
|
|
117
|
+
"@stryke/async": "^0.1.44",
|
|
118
|
+
"@stryke/env": "^0.20.135",
|
|
119
|
+
"@stryke/helpers": "^0.10.56",
|
|
120
|
+
"@stryke/hooks": "^0.4.133",
|
|
121
|
+
"@stryke/json": "^0.15.40",
|
|
122
|
+
"@stryke/string-format": "^0.17.58",
|
|
123
|
+
"@stryke/type-checks": "^0.6.49",
|
|
124
|
+
"@stryke/types": "^0.12.44",
|
|
125
|
+
"@stryke/unique-id": "^0.3.129",
|
|
126
|
+
"@tamagui/core": "3.0.0-beta.1422.1",
|
|
127
|
+
"@tamagui/portal": "3.0.0-beta.1422.1",
|
|
128
|
+
"@tamagui/toast": "3.0.0-beta.1422.1",
|
|
129
129
|
"bunshi": "^2.2.0",
|
|
130
130
|
"jotai-optics": "^0.4.0",
|
|
131
|
-
"maska": "^3.2.
|
|
131
|
+
"maska": "^3.2.2",
|
|
132
132
|
"optics-ts": "^2.4.1",
|
|
133
133
|
"react-native-safe-area-context": "^4.14.1",
|
|
134
|
-
"valibot": "^0.42.1"
|
|
134
|
+
"valibot": "^0.42.1",
|
|
135
|
+
"@cyclone-ui/helpers": "0.3.6"
|
|
135
136
|
},
|
|
136
137
|
"devDependencies": {
|
|
137
|
-
"@powerlines/plugin-tsdown": "^0.1.
|
|
138
|
+
"@powerlines/plugin-tsdown": "^0.1.614",
|
|
138
139
|
"jotai": "^2.20.3",
|
|
139
140
|
"react": "^19.3.0",
|
|
140
141
|
"react-dom": "^19.3.0",
|
|
@@ -142,5 +143,5 @@
|
|
|
142
143
|
},
|
|
143
144
|
"publishConfig": { "access": "public" },
|
|
144
145
|
"module": "./dist/index.mjs",
|
|
145
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "412579df17e67065159aa56be66d968e19429eea"
|
|
146
147
|
}
|