sekisho 0.5.0 → 0.6.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/factory.cjs +1 -1
- package/dist/factory.d.ts +1 -1
- package/dist/factory.mjs +1 -1
- package/package.json +3 -3
package/dist/factory.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use client";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react/jsx-runtime"),e=require("foxact/create-stackless-error"),t=require("foxact/nullthrow"),n=require("react");exports.createSekisho=function(o){let s=new WeakSet;class u extends Error{constructor(r){super(r),this.digest="BAILOUT_TO_CLIENT_SIDE_RENDERING",this.name=o??"SekishoGuardError",s.add(this)}}function i(r){return"object"==typeof r&&null!==r&&s.has(r)}let c=n.createContext(null);function l({error:e,children:o}){let s=t.nullthrow(n.useContext(c),"<ErrorWrapper /> must be used within its corresponding container component");if(i(e)){let{fallback:t,fallbackComponent:n}=s;return n?r.jsx(n,{error:e}):t}return o}class a extends n.Component{constructor(r){super(r),this.state={error:null}}static getDerivedStateFromError(r){return{error:r}}render(){let e=this.state.error;if(null===e)return this.props.children;if(i(e))return r.jsx(l,{error:e});throw e}}return[function(r){throw e.createStacklessError(()=>new u(r))},function({children:e,...t}){return r.jsx(c.Provider,{value:t,children:r.jsx(a,{children:e})})},l,i,u]};
|
package/dist/factory.d.ts
CHANGED
package/dist/factory.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r}from"react/jsx-runtime";import{createStacklessError as
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";import{createStacklessError as t}from"foxact/create-stackless-error";import{nullthrow as e}from"foxact/nullthrow";import{useContext as o,createContext as n,Component as i}from"react";function s(s){let c=new WeakSet;class u extends Error{constructor(r){super(r),this.digest="BAILOUT_TO_CLIENT_SIDE_RENDERING",this.name=s??"SekishoGuardError",c.add(this)}}function l(r){return"object"==typeof r&&null!==r&&c.has(r)}let a=n(null);function f({error:t,children:n}){let i=e(o(a),"<ErrorWrapper /> must be used within its corresponding container component");if(l(t)){let{fallback:e,fallbackComponent:o}=i;return o?r(o,{error:t}):e}return n}class h extends i{constructor(r){super(r),this.state={error:null}}static getDerivedStateFromError(r){return{error:r}}render(){let t=this.state.error;if(null===t)return this.props.children;if(l(t))return r(f,{error:t});throw t}}return[function(r){throw t(()=>new u(r))},function({children:t,...e}){return r(a.Provider,{value:e,children:r(h,{children:t})})},f,l,u]}export{s as createSekisho};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sekisho",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Authentication and Access Control for any React app",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"author": "Sukka <https://skk.moe>",
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"foxact": "^0.3.
|
|
35
|
+
"foxact": "^0.3.4"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@swc/core": "^1.15.33",
|
|
39
|
-
"@types/react": "^19.2.
|
|
39
|
+
"@types/react": "^19.2.15",
|
|
40
40
|
"bunchee": "^6.10.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|