@powerhousedao/connect 6.0.0-dev.32 → 6.0.0-dev.33
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/assets/{AddDriveModal-nG8xQ7h9.js → AddDriveModal-OXMDcTkb.js} +1 -1
- package/dist/assets/{ClearStorageModal-BSqnTCnl.js → ClearStorageModal-D7SSEfHO.js} +1 -1
- package/dist/assets/{CookiesPolicyModal-CJYiHAo4.js → CookiesPolicyModal-B6IvC-dh.js} +1 -1
- package/dist/assets/{CreateDocumentModal-BudTm0tQ.js → CreateDocumentModal-De7HFzqG.js} +1 -1
- package/dist/assets/{DebugSettingsModal-CJH95vK4.js → DebugSettingsModal-BPQtmD9d.js} +1 -1
- package/dist/assets/{DeleteDriveModal-BfpIraPg.js → DeleteDriveModal-CGKiLFVF.js} +1 -1
- package/dist/assets/DeleteItemModal-BAmScid_.js +1 -0
- package/dist/assets/{DisclaimerModal-BzUXyQg8.js → DisclaimerModal-zIDDMFY9.js} +1 -1
- package/dist/assets/DriveSettingsModal-z-nwyn2J.js +1 -0
- package/dist/assets/{ExportDocumentWithErrorsModal-u-rZZ7qf.js → ExportDocumentWithErrorsModal-wcQL_cnZ.js} +1 -1
- package/dist/assets/{SettingsModal-CgPxn6YH.js → SettingsModal-ffV7JjcT.js} +1 -1
- package/dist/assets/{UpgradeDriveModal-D2pYm9T3.js → UpgradeDriveModal-C2bwCout.js} +1 -1
- package/dist/assets/{design_system-CbKpL5o0.js → design_system-Da5LZxVT.js} +1 -1
- package/dist/assets/design_system_connect-DpO_P60g.js +47 -0
- package/dist/assets/{design_system_ui-Bn6ciBPp.js → design_system_ui-D9cdBaZ3.js} +1 -1
- package/dist/assets/{document_engineering-D8B_COCq.js → document_engineering-DR9pe4U5.js} +1 -1
- package/dist/assets/{document_model_editor-q_rpXFeo.js → document_model_editor-CIde2Bem.js} +4 -4
- package/dist/assets/{drive_explorer-DX_TIKpa.js → drive_explorer-DYvuYHTD.js} +2 -2
- package/dist/assets/{graphql-editor-CQF1oSdG.js → graphql-editor-CuSth38N.js} +1 -1
- package/dist/assets/{hooks-CpljrJ1Y.js → hooks-NgdYiMof.js} +1 -1
- package/dist/assets/index-B9vSDZIB.js +28 -0
- package/dist/assets/index-CCYUx14G.css +1 -0
- package/dist/assets/{index-8z2-bIkw.js → index-D09b1OOv.js} +3 -3
- package/dist/assets/{json-editor-HXfzSBgs.js → json-editor-Di9_h65O.js} +1 -1
- package/dist/assets/{nodefs-DrazL_g6.js → nodefs-C0bNYofw.js} +1 -1
- package/dist/assets/{opfs-ahp-SIxFz2dI.js → opfs-ahp-Be-APU_0.js} +1 -1
- package/dist/assets/{reactor_browser-CvXKqna7.js → reactor_browser-BvhdfFT9.js} +10 -10
- package/dist/assets/{state-schemas-C80GQfNa.js → state-schemas-DtEEuBHc.js} +2 -2
- package/dist/index.html +8 -8
- package/lib/package.copy.json +1 -1
- package/lib/src/components/modal/modals/InspectorModal/InspectorModal.d.ts.map +1 -1
- package/lib/src/components/modal/modals/InspectorModal/InspectorModal.js +3 -1
- package/lib/src/components/modal/modals/InspectorModal/InspectorModal.js.map +1 -1
- package/lib/src/components/modal/modals/InspectorModal/useQueueInspector.d.ts +3 -0
- package/lib/src/components/modal/modals/InspectorModal/useQueueInspector.d.ts.map +1 -0
- package/lib/src/components/modal/modals/InspectorModal/useQueueInspector.js +61 -0
- package/lib/src/components/modal/modals/InspectorModal/useQueueInspector.js.map +1 -0
- package/lib/style.css +81 -9
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.copy.json +1 -1
- package/package.json +10 -10
- package/dist/assets/DeleteItemModal-DszpS6oc.js +0 -1
- package/dist/assets/DriveSettingsModal-Cc4tptzo.js +0 -1
- package/dist/assets/design_system_connect-ChxuhOdJ.js +0 -47
- package/dist/assets/index-B6fwBGP_.css +0 -1
- package/dist/assets/index-C9IDIPwc.js +0 -28
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graphql-editor-
|
|
2
|
-
import{_ as L}from"./drive_explorer-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graphql-editor-CuSth38N.js","assets/document_model_editor-CIde2Bem.js","assets/graphql-DwmBvzSo.js","assets/drive_explorer-DYvuYHTD.js","assets/sentry_react-cODD7zWc.js","assets/react-DQSxOgtG.js","assets/sentry_browser-B4YoBIIG.js","assets/react/jsx-runtime-DldvXD6N.js","assets/document_model-CPsSXf7O.js","assets/zod-9j67vCAu.js","assets/design_system-Da5LZxVT.js","assets/tailwind_merge-Dr4f9Rms.js","assets/react-dom-D6zQJsh6.js","assets/reactor_browser-BvhdfFT9.js","assets/document_drive-BCSa7iW6.js","assets/design_system_connect-DpO_P60g.js","assets/design_system_ui-D9cdBaZ3.js","assets/hooks-NgdYiMof.js","assets/json-editor-Di9_h65O.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as L}from"./drive_explorer-DYvuYHTD.js";import{j as e,l as g,m as U,p as A,q as C,t as B,v as G,w as Y,x as J,y as K,z as W}from"./document_model_editor-CIde2Bem.js";import{C as Z}from"./design_system_ui-D9cdBaZ3.js";import{r}from"./sentry_react-cODD7zWc.js";import{N as q,O as I,Q as k,U as O}from"./design_system_connect-DpO_P60g.js";import{K as E}from"./graphql-DwmBvzSo.js";import{c as Q}from"./design_system-Da5LZxVT.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-CPsSXf7O.js";import"./zod-9j67vCAu.js";import"./react-DQSxOgtG.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./reactor_browser-BvhdfFT9.js";import"./document_drive-BCSa7iW6.js";import"./sentry_browser-B4YoBIIG.js";const V=r.forwardRef((a,s)=>{const{className:n,...c}=a;return e.jsx("button",{ref:s,...c,className:g("h-10 whitespace-nowrap rounded-md border border-gray-200 bg-gray-50 px-4 py-2 text-sm font-medium text-gray-800 transition-colors hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",n)})});function $({error:a}){const{payload:s}=a;switch(s.kind){case"MISSING":return e.jsxs("span",{children:["Field ",e.jsx("strong",{children:s.field})," is missing."]});case"MISSING_OPTIONAL":return e.jsxs("span",{children:["Optional field ",e.jsx("strong",{children:s.field})," is not defined."]});case"UNKNOWN_FIELD":return e.jsxs("span",{children:["Field ",e.jsx("strong",{children:s.field})," is not a known field."]});case"NON_NULL":return e.jsxs("span",{children:["Field ",e.jsx("strong",{children:s.field})," cannot be null."]});case"TYPE":return e.jsxs("span",{children:["Field ",e.jsx("strong",{children:s.field}),s.expectedType?e.jsxs(e.Fragment,{children:[" ","must be a"," ",e.jsx("strong",{children:s.expectedType.replace(/!/g,"")}),"."]}):e.jsx(e.Fragment,{children:" has an invalid value."})]});case"RECURSIVE_TYPE":return e.jsxs("span",{children:["Field ",e.jsx("strong",{children:s.typeName})," has a recursive type. It must be optional."]});default:return e.jsx("span",{children:"Invalid value."})}}const X=q,D=r.forwardRef(({className:a,...s},n)=>e.jsx(I,{ref:n,className:g("flex items-center justify-center rounded-xl bg-slate-50 p-1 shadow-[inset_0px_0px_2px_rgba(255,255,255,0.50)]",a),...s}));D.displayName=I.displayName;const v=r.forwardRef(({className:a,...s},n)=>e.jsx(k,{ref:n,className:g("flex w-full items-center justify-center whitespace-nowrap rounded-lg p-1 text-sm text-gray-500 transition-all disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-gray-50 data-[state=active]:text-gray-800 data-[state=active]:shadow-[0px_16px_16px_-4px_rgba(0,0,0,0.10)]",a),...s}));v.displayName=k.displayName;const y=r.forwardRef(({className:a,...s},n)=>e.jsx(O,{ref:n,className:g("",a),...s}));y.displayName=O.displayName;const _=r.lazy(()=>L(()=>import("./graphql-editor-CuSth38N.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))),ee=r.lazy(()=>L(()=>import("./json-editor-Di9_h65O.js"),__vite__mapDeps([18,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])));function T({modelName:a,stateSchema:s,initialValue:n,setStateSchema:c,setInitialState:d,scope:t}){const{sharedSchema:l,error:x}=A(),[h,j]=r.useState(!1),[o,F]=r.useState(!0),M=r.useCallback(i=>C(i,a,t),[a,t]),N=r.useMemo(()=>{const i=C(s,a,t);return x?[...i,x]:i},[s,a,t,x]),R=r.useCallback(()=>{j(i=>!i)},[]),P=r.useCallback(i=>c(i,t),[c,t]),H=r.useCallback(i=>d(i,t),[d,t]),b=r.useRef(!1),{initialValueErrors:z,fixedState:f}=r.useMemo(()=>{const i=n||"{}",m=B(l);if(!m)return{initialValueErrors:[],fixedState:null};const S=G(a,t);if(!S)return{initialValueErrors:[],fixedState:null};const p=m.definitions.find(u=>u.kind===E.OBJECT_TYPE_DEFINITION&&u.name.value===S);if(!p||p.kind!==E.OBJECT_TYPE_DEFINITION)return{initialValueErrors:[],fixedState:null};const w=Y(m,p,i);if(w.length&&o){const u=J({sharedSchemaDocumentNode:m,stateTypeDefinitionNode:p,existingValue:i});if(n!==u)return{initialValueErrors:[],fixedState:u}}return{initialValueErrors:w,fixedState:null}},[l,n,o,t,a]);return r.useEffect(()=>{f&&!b.current?(b.current=!0,d(f,t)):f||(b.current=!1)},[f,d,t]),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"mb-2 text-lg capitalize",children:[t," state schema *"]}),e.jsxs(V,{onClick:R,className:"mb-2 flex w-fit items-center gap-2",children:[h?"Hide":"Show"," standard library",e.jsx("svg",{className:Q("inline-block transition-transform",h?"rotate-180":"rotate-0"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:e.jsx("path",{d:"M11.9883 6.01172C11.4363 6.01172 10.9883 6.45972 10.9883 7.01172V13.0117H6.98828L11.9883 18.0117L16.9883 13.0117H12.9883V7.01172C12.9883 6.45972 12.5403 6.01172 11.9883 6.01172Z",fill:"black"})})]}),e.jsxs(r.Suspense,{children:[h&&e.jsx(_,{doc:K,readonly:!0}),e.jsx(_,{doc:s,updateDocumentInModel:P,customLinter:M}),N.length>0&&e.jsx("p",{className:"mt-2 text-sm text-red-600",children:N[0].message})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-col items-end",children:[e.jsxs("h3",{className:"mb-2 text-right text-lg capitalize",children:[t," state initial value *"]}),e.jsx(Z,{value:o,onChange:F,className:"mb-2 w-fit whitespace-nowrap rounded-md border border-gray-200 bg-gray-50 pl-2 text-sm font-medium text-gray-800 transition-colors hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",label:e.jsxs("div",{className:"flex items-center gap-2 py-2 pr-2",children:["Sync with schema"," ",e.jsx("svg",{className:"inline-block",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M8.00521 1.99219C6.63588 1.99219 5.32788 2.45152 4.27588 3.28419C3.98721 3.51219 3.94321 3.93285 4.17188 4.22151C4.40054 4.51018 4.82055 4.55418 5.10921 4.32552C5.92721 3.67819 6.93921 3.32552 8.00521 3.32552C10.5825 3.32552 12.6719 5.41485 12.6719 7.99218H11.3385L13.3385 10.6588L15.3385 7.99218H14.0052C14.0052 4.67818 11.3192 1.99219 8.00521 1.99219ZM2.67188 5.32552L0.671875 7.99218H2.00521C2.00521 11.3062 4.69121 13.9922 8.00521 13.9922C9.37521 13.9922 10.6825 13.5335 11.7345 12.7002C12.0232 12.4722 12.0672 12.0515 11.8385 11.7628C11.6099 11.4742 11.1899 11.4302 10.9012 11.6588C10.0825 12.3068 9.07188 12.6588 8.00521 12.6588C5.42788 12.6588 3.33854 10.5695 3.33854 7.99218H4.67188L2.67188 5.32552Z",fill:"#343839"})})]})})]}),e.jsxs(r.Suspense,{children:[e.jsx(ee,{doc:n,updateDocumentInModel:H}),z.map((i,m)=>e.jsx("p",{className:"mt-2 text-sm text-red-600",children:i instanceof W?e.jsx($,{error:i}):i.message},m))]})]})]})}function ge({modelName:a,globalStateSchema:s,localStateSchema:n,globalStateInitialValue:c,localStateInitialValue:d,setStateSchema:t,setInitialState:l,currentScope:x,onScopeChange:h}){const j=r.useCallback(()=>{const o=U(a,"local");t(o,"local"),l("","local")},[a,t,l]);return e.jsxs(X,{className:"pb-8",activationMode:"manual",value:x,onValueChange:o=>h(o),children:[e.jsx("div",{className:"my-6",children:e.jsxs(D,{className:"mx-auto flex max-w-sm",children:[e.jsx(v,{value:"global",children:"Global"}),e.jsx(v,{value:"local",children:"Local"})]})}),e.jsx(y,{value:"global",tabIndex:-1,children:e.jsx(T,{modelName:a,stateSchema:s,initialValue:c,setStateSchema:t,setInitialState:l,scope:"global"})}),e.jsx(y,{value:"local",tabIndex:-1,children:n?e.jsx(T,{modelName:a,stateSchema:n,initialValue:d,setStateSchema:t,setInitialState:l,scope:"local"}):e.jsxs("div",{className:"",children:[e.jsx("h3",{className:"mb-2 text-lg capitalize",children:"local state schema *"}),e.jsx(V,{onClick:j,children:"Add local state"})]})})]})}export{ge as default};
|
package/dist/index.html
CHANGED
|
@@ -22,26 +22,26 @@
|
|
|
22
22
|
<meta name="twitter:image" content="https://cf-ipfs.com/ipfs/bafkreigrmclndf2jpbolaq22535q2sw5t44uad3az3dpvkzrnt4lpjt63e">
|
|
23
23
|
<meta name="twitter:title" content="Connect">
|
|
24
24
|
<meta name="twitter:description" content="Navigate your organisation’s toughest operational challenges and steer your contributors to success with Connect. A navigation, collaboration and reporting tool for decentralised and open organisation.">
|
|
25
|
-
<script type="module" crossorigin src="/assets/index-
|
|
25
|
+
<script type="module" crossorigin src="/assets/index-D09b1OOv.js"></script>
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/graphql-DwmBvzSo.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/react-DQSxOgtG.js">
|
|
28
28
|
<link rel="modulepreload" crossorigin href="/assets/sentry_browser-B4YoBIIG.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/sentry_react-cODD7zWc.js">
|
|
30
|
-
<link rel="modulepreload" crossorigin href="/assets/drive_explorer-
|
|
30
|
+
<link rel="modulepreload" crossorigin href="/assets/drive_explorer-DYvuYHTD.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/react/jsx-runtime-DldvXD6N.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/zod-9j67vCAu.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/document_model-CPsSXf7O.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="/assets/tailwind_merge-Dr4f9Rms.js">
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/design_system-
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/design_system-Da5LZxVT.js">
|
|
36
36
|
<link rel="modulepreload" crossorigin href="/assets/react-dom-D6zQJsh6.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="/assets/document_drive-BCSa7iW6.js">
|
|
38
|
-
<link rel="modulepreload" crossorigin href="/assets/reactor_browser-
|
|
39
|
-
<link rel="modulepreload" crossorigin href="/assets/design_system_ui-
|
|
40
|
-
<link rel="modulepreload" crossorigin href="/assets/design_system_connect-
|
|
41
|
-
<link rel="modulepreload" crossorigin href="/assets/document_model_editor-
|
|
38
|
+
<link rel="modulepreload" crossorigin href="/assets/reactor_browser-BvhdfFT9.js">
|
|
39
|
+
<link rel="modulepreload" crossorigin href="/assets/design_system_ui-D9cdBaZ3.js">
|
|
40
|
+
<link rel="modulepreload" crossorigin href="/assets/design_system_connect-DpO_P60g.js">
|
|
41
|
+
<link rel="modulepreload" crossorigin href="/assets/document_model_editor-CIde2Bem.js">
|
|
42
42
|
<link rel="modulepreload" crossorigin href="/assets/react-dom/client-BVPiT_FE.js">
|
|
43
43
|
<link rel="modulepreload" crossorigin href="/assets/graphql_request-G5F4jsaa.js">
|
|
44
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
44
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CCYUx14G.css">
|
|
45
45
|
</head>
|
|
46
46
|
|
|
47
47
|
<body>
|
package/lib/package.copy.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InspectorModal.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/InspectorModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InspectorModal.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/InspectorModal.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EA+BlC,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { InspectorModal as ConnectInspectorModal } from "@powerhousedao/design-s
|
|
|
3
3
|
import { REACTOR_SCHEMA } from "@powerhousedao/reactor";
|
|
4
4
|
import { closePHModal, usePHModal } from "@powerhousedao/reactor-browser";
|
|
5
5
|
import { useDbExplorer } from "./useDbExplorer.js";
|
|
6
|
+
import { useQueueInspector } from "./useQueueInspector.js";
|
|
6
7
|
import { useRemotesInspector } from "./useRemotesInspector.js";
|
|
7
8
|
const DEFAULT_PAGE_SIZE = 25;
|
|
8
9
|
export const InspectorModal = () => {
|
|
@@ -10,6 +11,7 @@ export const InspectorModal = () => {
|
|
|
10
11
|
const open = phModal?.type === "inspector";
|
|
11
12
|
const { getTables, getTableRows, getDefaultSort, onExportDb, onImportDb } = useDbExplorer();
|
|
12
13
|
const { getRemotes } = useRemotesInspector();
|
|
14
|
+
const queueInspectorProps = useQueueInspector();
|
|
13
15
|
return (_jsx(ConnectInspectorModal, { open: open, onOpenChange: (status) => {
|
|
14
16
|
if (!status)
|
|
15
17
|
closePHModal();
|
|
@@ -24,6 +26,6 @@ export const InspectorModal = () => {
|
|
|
24
26
|
onImportDb,
|
|
25
27
|
}, remotesInspectorProps: {
|
|
26
28
|
getRemotes,
|
|
27
|
-
} }));
|
|
29
|
+
}, queueInspectorProps: queueInspectorProps }));
|
|
28
30
|
};
|
|
29
31
|
//# sourceMappingURL=InspectorModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InspectorModal.js","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/InspectorModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,MAAM,CAAC,MAAM,cAAc,GAAa,GAAG,EAAE;IAC3C,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,KAAK,WAAW,CAAC;IAE3C,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,GACvE,aAAa,EAAE,CAAC;IAClB,MAAM,EAAE,UAAU,EAAE,GAAG,mBAAmB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"InspectorModal.js","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/InspectorModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,MAAM,CAAC,MAAM,cAAc,GAAa,GAAG,EAAE;IAC3C,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,KAAK,WAAW,CAAC;IAE3C,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,GACvE,aAAa,EAAE,CAAC;IAClB,MAAM,EAAE,UAAU,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAC7C,MAAM,mBAAmB,GAAG,iBAAiB,EAAE,CAAC;IAEhD,OAAO,CACL,KAAC,qBAAqB,IACpB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE;YACvB,IAAI,CAAC,MAAM;gBAAE,YAAY,EAAE,CAAC;QAC9B,CAAC,EACD,eAAe,EAAE;YACf,MAAM,EAAE,cAAc;YACtB,SAAS;YACT,YAAY;YACZ,mEAAmE;YACnE,cAAc;YACd,QAAQ,EAAE,iBAAiB;YAC3B,UAAU;YACV,UAAU;SACX,EACD,qBAAqB,EAAE;YACrB,UAAU;SACX,EACD,mBAAmB,EAAE,mBAAmB,GACxC,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useQueueInspector.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/useQueueInspector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,sCAAsC,CAAC;AAK9C,wBAAgB,iBAAiB,IAAI,mBAAmB,GAAG,SAAS,CAiEnE"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { InMemoryQueue } from "@powerhousedao/reactor";
|
|
2
|
+
import { useReactorClientModule } from "@powerhousedao/reactor-browser/connect";
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
4
|
+
export function useQueueInspector() {
|
|
5
|
+
const reactorClientModule = useReactorClientModule();
|
|
6
|
+
const queue = reactorClientModule?.reactorModule?.queue;
|
|
7
|
+
const inMemoryQueue = useMemo(() => {
|
|
8
|
+
if (queue instanceof InMemoryQueue) {
|
|
9
|
+
return queue;
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}, [queue]);
|
|
13
|
+
const getQueueState = useCallback(async () => {
|
|
14
|
+
if (!inMemoryQueue) {
|
|
15
|
+
return {
|
|
16
|
+
isPaused: false,
|
|
17
|
+
pendingJobs: [],
|
|
18
|
+
executingJobs: [],
|
|
19
|
+
totalPending: 0,
|
|
20
|
+
totalExecuting: 0,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const pendingJobs = inMemoryQueue.getPendingJobs();
|
|
24
|
+
const executingJobIds = inMemoryQueue.getExecutingJobIds();
|
|
25
|
+
const executingJobs = [];
|
|
26
|
+
for (const jobIdSet of executingJobIds.values()) {
|
|
27
|
+
for (const jobId of jobIdSet) {
|
|
28
|
+
const job = inMemoryQueue.getJob(jobId);
|
|
29
|
+
if (job) {
|
|
30
|
+
executingJobs.push(job);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
isPaused: inMemoryQueue.paused,
|
|
36
|
+
pendingJobs,
|
|
37
|
+
executingJobs,
|
|
38
|
+
totalPending: pendingJobs.length,
|
|
39
|
+
totalExecuting: executingJobs.length,
|
|
40
|
+
};
|
|
41
|
+
}, [inMemoryQueue]);
|
|
42
|
+
const onPause = useCallback(async () => {
|
|
43
|
+
if (inMemoryQueue) {
|
|
44
|
+
inMemoryQueue.pause();
|
|
45
|
+
}
|
|
46
|
+
}, [inMemoryQueue]);
|
|
47
|
+
const onResume = useCallback(async () => {
|
|
48
|
+
if (inMemoryQueue) {
|
|
49
|
+
await inMemoryQueue.resume();
|
|
50
|
+
}
|
|
51
|
+
}, [inMemoryQueue]);
|
|
52
|
+
if (!inMemoryQueue) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
getQueueState,
|
|
57
|
+
onPause,
|
|
58
|
+
onResume,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=useQueueInspector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useQueueInspector.js","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/useQueueInspector.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAY,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7C,MAAM,UAAU,iBAAiB;IAC/B,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IACrD,MAAM,KAAK,GAAG,mBAAmB,EAAE,aAAa,EAAE,KAAK,CAAC;IAExD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE;QACjC,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,MAAM,aAAa,GAAG,WAAW,CAAC,KAAK,IAAyB,EAAE;QAChE,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,EAAE;gBACf,aAAa,EAAE,EAAE;gBACjB,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,CAAC;aAClB,CAAC;QACJ,CAAC;QAED,MAAM,WAAW,GAAG,aAAa,CAAC,cAAc,EAAE,CAAC;QACnD,MAAM,eAAe,GAAG,aAAa,CAAC,kBAAkB,EAAE,CAAC;QAE3D,MAAM,aAAa,GAAU,EAAE,CAAC;QAChC,KAAK,MAAM,QAAQ,IAAI,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC;YAChD,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;gBAC7B,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACxC,IAAI,GAAG,EAAE,CAAC;oBACR,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC1B,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO;YACL,QAAQ,EAAE,aAAa,CAAC,MAAM;YAC9B,WAAW;YACX,aAAa;YACb,YAAY,EAAE,WAAW,CAAC,MAAM;YAChC,cAAc,EAAE,aAAa,CAAC,MAAM;SACrC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,IAAmB,EAAE;QACpD,IAAI,aAAa,EAAE,CAAC;YAClB,aAAa,CAAC,KAAK,EAAE,CAAC;QACxB,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,IAAmB,EAAE;QACrD,IAAI,aAAa,EAAE,CAAC;YAClB,MAAM,aAAa,CAAC,MAAM,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,aAAa;QACb,OAAO;QACP,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
package/lib/style.css
CHANGED
|
@@ -23,13 +23,17 @@
|
|
|
23
23
|
--color-amber-200: oklch(92.4% 0.12 95.746);
|
|
24
24
|
--color-amber-700: oklch(55.5% 0.163 48.998);
|
|
25
25
|
--color-amber-800: oklch(47.3% 0.137 46.201);
|
|
26
|
+
--color-yellow-50: oklch(98.7% 0.026 102.212);
|
|
26
27
|
--color-yellow-100: oklch(97.3% 0.071 103.193);
|
|
27
28
|
--color-yellow-300: oklch(90.5% 0.182 98.111);
|
|
28
29
|
--color-yellow-400: oklch(85.2% 0.199 91.936);
|
|
29
30
|
--color-yellow-500: oklch(79.5% 0.184 86.047);
|
|
31
|
+
--color-yellow-600: oklch(68.1% 0.162 75.834);
|
|
30
32
|
--color-yellow-700: oklch(55.4% 0.135 66.442);
|
|
31
33
|
--color-yellow-900: oklch(42.1% 0.095 57.708);
|
|
34
|
+
--color-green-50: oklch(98.2% 0.018 155.826);
|
|
32
35
|
--color-green-100: oklch(96.2% 0.044 156.743);
|
|
36
|
+
--color-green-300: oklch(87.1% 0.15 154.449);
|
|
33
37
|
--color-green-500: oklch(72.3% 0.219 149.579);
|
|
34
38
|
--color-green-600: oklch(62.7% 0.194 149.214);
|
|
35
39
|
--color-green-700: oklch(52.7% 0.154 150.069);
|
|
@@ -59,6 +63,8 @@
|
|
|
59
63
|
--color-indigo-50: oklch(96.2% 0.018 272.314);
|
|
60
64
|
--color-indigo-800: oklch(39.8% 0.195 277.366);
|
|
61
65
|
--color-violet-400: oklch(70.2% 0.183 293.541);
|
|
66
|
+
--color-purple-100: oklch(94.6% 0.033 307.174);
|
|
67
|
+
--color-purple-700: oklch(49.6% 0.265 301.924);
|
|
62
68
|
--color-purple-800: oklch(43.8% 0.218 303.724);
|
|
63
69
|
--color-purple-900: oklch(38.1% 0.176 304.987);
|
|
64
70
|
--color-pink-400: oklch(71.8% 0.202 349.761);
|
|
@@ -1599,9 +1605,18 @@
|
|
|
1599
1605
|
--color-orange-700: hsl(32 100% 60%);
|
|
1600
1606
|
--color-orange-800: hsl(33 100% 55%);
|
|
1601
1607
|
--color-orange-900: hsl(32 100% 50%);
|
|
1608
|
+
--color-yellow-50: oklch(98.7% 0.026 102.212);
|
|
1609
|
+
--color-yellow-100: hsl(46 100% 94%);
|
|
1610
|
+
--color-yellow-300: hsl(47 100% 79%);
|
|
1602
1611
|
--color-yellow-400: hsl(47 100% 69%);
|
|
1612
|
+
--color-yellow-500: hsl(47 100% 60%);
|
|
1613
|
+
--color-yellow-600: hsl(47 100% 57%);
|
|
1614
|
+
--color-yellow-700: hsl(47 100% 51%);
|
|
1603
1615
|
--color-yellow-900: hsl(47 100% 49%);
|
|
1616
|
+
--color-green-50: oklch(98.2% 0.018 155.826);
|
|
1604
1617
|
--color-green-100: hsl(134 51% 89%);
|
|
1618
|
+
--color-green-300: hsl(136 52% 77%);
|
|
1619
|
+
--color-green-500: hsl(136 53% 66%);
|
|
1605
1620
|
--color-green-600: hsl(136 53% 60%);
|
|
1606
1621
|
--color-green-700: hsl(136 52% 55%);
|
|
1607
1622
|
--color-green-800: hsl(136 53% 49%);
|
|
@@ -1617,6 +1632,8 @@
|
|
|
1617
1632
|
--color-blue-800: hsl(209 100% 55%);
|
|
1618
1633
|
--color-blue-900: hsl(209 100% 50%);
|
|
1619
1634
|
--color-violet-400: oklch(70.2% 0.183 293.541);
|
|
1635
|
+
--color-purple-100: hsl(262 79% 93%);
|
|
1636
|
+
--color-purple-700: hsl(263 78% 70%);
|
|
1620
1637
|
--color-purple-900: hsl(263 78% 63%);
|
|
1621
1638
|
--color-slate-50: hsl(210 20% 96%);
|
|
1622
1639
|
--color-slate-100: hsl(210 9% 74%);
|
|
@@ -2202,6 +2219,14 @@
|
|
|
2202
2219
|
.aspect-square {
|
|
2203
2220
|
aspect-ratio: 1 / 1;
|
|
2204
2221
|
}
|
|
2222
|
+
.size-1\.5 {
|
|
2223
|
+
width: calc(var(--spacing) * 1.5);
|
|
2224
|
+
height: calc(var(--spacing) * 1.5);
|
|
2225
|
+
}
|
|
2226
|
+
.size-2 {
|
|
2227
|
+
width: calc(var(--spacing) * 2);
|
|
2228
|
+
height: calc(var(--spacing) * 2);
|
|
2229
|
+
}
|
|
2205
2230
|
.size-2\.5 {
|
|
2206
2231
|
width: calc(var(--spacing) * 2.5);
|
|
2207
2232
|
height: calc(var(--spacing) * 2.5);
|
|
@@ -2317,6 +2342,9 @@
|
|
|
2317
2342
|
.h-\[52px\] {
|
|
2318
2343
|
height: 52px;
|
|
2319
2344
|
}
|
|
2345
|
+
.h-\[90vh\] {
|
|
2346
|
+
height: 90vh;
|
|
2347
|
+
}
|
|
2320
2348
|
.h-\[130px\] {
|
|
2321
2349
|
height: 130px;
|
|
2322
2350
|
}
|
|
@@ -2329,15 +2357,9 @@
|
|
|
2329
2357
|
.h-\[420px\] {
|
|
2330
2358
|
height: 420px;
|
|
2331
2359
|
}
|
|
2332
|
-
.h-\[480px\] {
|
|
2333
|
-
height: 480px;
|
|
2334
|
-
}
|
|
2335
2360
|
.h-\[600px\] {
|
|
2336
2361
|
height: 600px;
|
|
2337
2362
|
}
|
|
2338
|
-
.h-\[700px\] {
|
|
2339
|
-
height: 700px;
|
|
2340
|
-
}
|
|
2341
2363
|
.h-auto {
|
|
2342
2364
|
height: auto;
|
|
2343
2365
|
}
|
|
@@ -2380,6 +2402,9 @@
|
|
|
2380
2402
|
.max-h-screen {
|
|
2381
2403
|
max-height: 100vh;
|
|
2382
2404
|
}
|
|
2405
|
+
.min-h-0 {
|
|
2406
|
+
min-height: calc(var(--spacing) * 0);
|
|
2407
|
+
}
|
|
2383
2408
|
.min-h-4 {
|
|
2384
2409
|
min-height: calc(var(--spacing) * 4);
|
|
2385
2410
|
}
|
|
@@ -2497,9 +2522,6 @@
|
|
|
2497
2522
|
.w-\[500px\] {
|
|
2498
2523
|
width: 500px;
|
|
2499
2524
|
}
|
|
2500
|
-
.w-\[900px\] {
|
|
2501
|
-
width: 900px;
|
|
2502
|
-
}
|
|
2503
2525
|
.w-fit {
|
|
2504
2526
|
width: fit-content;
|
|
2505
2527
|
}
|
|
@@ -2948,6 +2970,9 @@
|
|
|
2948
2970
|
.border-gray-900 {
|
|
2949
2971
|
border-color: var(--color-gray-900);
|
|
2950
2972
|
}
|
|
2973
|
+
.border-green-300 {
|
|
2974
|
+
border-color: var(--color-green-300);
|
|
2975
|
+
}
|
|
2951
2976
|
.border-red-700 {
|
|
2952
2977
|
border-color: var(--color-red-700);
|
|
2953
2978
|
}
|
|
@@ -2966,6 +2991,9 @@
|
|
|
2966
2991
|
.border-white {
|
|
2967
2992
|
border-color: var(--color-white);
|
|
2968
2993
|
}
|
|
2994
|
+
.border-yellow-300 {
|
|
2995
|
+
border-color: var(--color-yellow-300);
|
|
2996
|
+
}
|
|
2969
2997
|
.border-zinc-200 {
|
|
2970
2998
|
border-color: var(--color-zinc-200);
|
|
2971
2999
|
}
|
|
@@ -3032,9 +3060,15 @@
|
|
|
3032
3060
|
.bg-gray-900 {
|
|
3033
3061
|
background-color: var(--color-gray-900);
|
|
3034
3062
|
}
|
|
3063
|
+
.bg-green-50 {
|
|
3064
|
+
background-color: var(--color-green-50);
|
|
3065
|
+
}
|
|
3035
3066
|
.bg-green-100 {
|
|
3036
3067
|
background-color: var(--color-green-100);
|
|
3037
3068
|
}
|
|
3069
|
+
.bg-green-500 {
|
|
3070
|
+
background-color: var(--color-green-500);
|
|
3071
|
+
}
|
|
3038
3072
|
.bg-green-600 {
|
|
3039
3073
|
background-color: var(--color-green-600);
|
|
3040
3074
|
}
|
|
@@ -3053,6 +3087,9 @@
|
|
|
3053
3087
|
.bg-orange-100 {
|
|
3054
3088
|
background-color: var(--color-orange-100);
|
|
3055
3089
|
}
|
|
3090
|
+
.bg-purple-100 {
|
|
3091
|
+
background-color: var(--color-purple-100);
|
|
3092
|
+
}
|
|
3056
3093
|
.bg-red-500 {
|
|
3057
3094
|
background-color: var(--color-red-500);
|
|
3058
3095
|
}
|
|
@@ -3095,6 +3132,12 @@
|
|
|
3095
3132
|
.bg-white {
|
|
3096
3133
|
background-color: var(--color-white);
|
|
3097
3134
|
}
|
|
3135
|
+
.bg-yellow-50 {
|
|
3136
|
+
background-color: var(--color-yellow-50);
|
|
3137
|
+
}
|
|
3138
|
+
.bg-yellow-500 {
|
|
3139
|
+
background-color: var(--color-yellow-500);
|
|
3140
|
+
}
|
|
3098
3141
|
.bg-zinc-50 {
|
|
3099
3142
|
background-color: var(--color-zinc-50);
|
|
3100
3143
|
}
|
|
@@ -3233,6 +3276,9 @@
|
|
|
3233
3276
|
.pb-2 {
|
|
3234
3277
|
padding-bottom: calc(var(--spacing) * 2);
|
|
3235
3278
|
}
|
|
3279
|
+
.pb-3 {
|
|
3280
|
+
padding-bottom: calc(var(--spacing) * 3);
|
|
3281
|
+
}
|
|
3236
3282
|
.pb-6 {
|
|
3237
3283
|
padding-bottom: calc(var(--spacing) * 6);
|
|
3238
3284
|
}
|
|
@@ -3421,6 +3467,9 @@
|
|
|
3421
3467
|
.text-gray-900 {
|
|
3422
3468
|
color: var(--color-gray-900);
|
|
3423
3469
|
}
|
|
3470
|
+
.text-green-600 {
|
|
3471
|
+
color: var(--color-green-600);
|
|
3472
|
+
}
|
|
3424
3473
|
.text-green-700 {
|
|
3425
3474
|
color: var(--color-green-700);
|
|
3426
3475
|
}
|
|
@@ -3442,6 +3491,9 @@
|
|
|
3442
3491
|
.text-orange-900 {
|
|
3443
3492
|
color: var(--color-orange-900);
|
|
3444
3493
|
}
|
|
3494
|
+
.text-purple-700 {
|
|
3495
|
+
color: var(--color-purple-700);
|
|
3496
|
+
}
|
|
3445
3497
|
.text-purple-900 {
|
|
3446
3498
|
color: var(--color-purple-900);
|
|
3447
3499
|
}
|
|
@@ -3490,6 +3542,12 @@
|
|
|
3490
3542
|
.text-yellow-400 {
|
|
3491
3543
|
color: var(--color-yellow-400);
|
|
3492
3544
|
}
|
|
3545
|
+
.text-yellow-600 {
|
|
3546
|
+
color: var(--color-yellow-600);
|
|
3547
|
+
}
|
|
3548
|
+
.text-yellow-700 {
|
|
3549
|
+
color: var(--color-yellow-700);
|
|
3550
|
+
}
|
|
3493
3551
|
.text-yellow-900 {
|
|
3494
3552
|
color: var(--color-yellow-900);
|
|
3495
3553
|
}
|
|
@@ -4183,6 +4241,13 @@
|
|
|
4183
4241
|
}
|
|
4184
4242
|
}
|
|
4185
4243
|
}
|
|
4244
|
+
.hover\:bg-green-100 {
|
|
4245
|
+
&:hover {
|
|
4246
|
+
@media (hover: hover) {
|
|
4247
|
+
background-color: var(--color-green-100);
|
|
4248
|
+
}
|
|
4249
|
+
}
|
|
4250
|
+
}
|
|
4186
4251
|
.hover\:bg-red-800 {
|
|
4187
4252
|
&:hover {
|
|
4188
4253
|
@media (hover: hover) {
|
|
@@ -4225,6 +4290,13 @@
|
|
|
4225
4290
|
}
|
|
4226
4291
|
}
|
|
4227
4292
|
}
|
|
4293
|
+
.hover\:bg-yellow-100 {
|
|
4294
|
+
&:hover {
|
|
4295
|
+
@media (hover: hover) {
|
|
4296
|
+
background-color: var(--color-yellow-100);
|
|
4297
|
+
}
|
|
4298
|
+
}
|
|
4299
|
+
}
|
|
4228
4300
|
.hover\:text-\[\#9896FF\] {
|
|
4229
4301
|
&:hover {
|
|
4230
4302
|
@media (hover: hover) {
|