@powerhousedao/connect 1.0.19-dev.1 → 1.0.19-dev.2
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/{app-0PUokYXm.js → app-DgCWpRAi.js} +78 -77
- package/dist/assets/app-DgCWpRAi.js.map +1 -0
- package/dist/assets/{app-loader-CVII2DYj.js → app-loader-BvmuBbHg.js} +7 -8
- package/dist/assets/app-loader-BvmuBbHg.js.map +1 -0
- package/dist/assets/{browser-DaWhu_1T.js → browser-DDXfHleI.js} +4 -4
- package/dist/assets/{browser-DaWhu_1T.js.map → browser-DDXfHleI.js.map} +1 -1
- package/dist/assets/{ccip-BiEUOhIy.js → ccip-DpSDrBqK.js} +4 -4
- package/dist/assets/{ccip-BiEUOhIy.js.map → ccip-DpSDrBqK.js.map} +1 -1
- package/dist/assets/{content-D_3kBNR7.js → content-BfmXiklP.js} +37 -10
- package/dist/assets/content-BfmXiklP.js.map +1 -0
- package/dist/assets/{index-3a_rYGU1.js → index-C6Izifpd.js} +5 -5
- package/dist/assets/{index-3a_rYGU1.js.map → index-C6Izifpd.js.map} +1 -1
- package/dist/assets/{index-DiejwhaO.js → index-CoRmasjt.js} +4 -4
- package/dist/assets/{index-DiejwhaO.js.map → index-CoRmasjt.js.map} +1 -1
- package/dist/assets/{index-C30XfZqk.js → index-CrRjMdvn.js} +4 -4
- package/dist/assets/{index-C30XfZqk.js.map → index-CrRjMdvn.js.map} +1 -1
- package/dist/assets/{main.y7csLjWq.js → main.tB_v8aJ9.js} +2 -2
- package/dist/assets/{main.y7csLjWq.js.map → main.tB_v8aJ9.js.map} +1 -1
- package/dist/assets/{reactor-analytics-DDw23exh.js → reactor-analytics-CF6UOSpS.js} +4 -4
- package/dist/assets/{reactor-analytics-DDw23exh.js.map → reactor-analytics-CF6UOSpS.js.map} +1 -1
- package/dist/assets/{router-D1e0l-Bx.js → router-CuTseNzw.js} +6 -6
- package/dist/assets/{router-D1e0l-Bx.js.map → router-CuTseNzw.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/vite-envs.sh +1 -1
- package/package.json +6 -6
- package/dist/assets/app-0PUokYXm.js.map +0 -1
- package/dist/assets/app-loader-CVII2DYj.js.map +0 -1
- package/dist/assets/content-D_3kBNR7.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { aS as BaseError, aT as getUrl, aU as stringify, aV as decodeErrorResult, aW as isAddressEqual, aX as call, aY as concat, aZ as encodeAbiParameters, a_ as HttpRequestError, a$ as isHex } from "./app-
|
|
2
|
-
import "./main.
|
|
1
|
+
import { aS as BaseError, aT as getUrl, aU as stringify, aV as decodeErrorResult, aW as isAddressEqual, aX as call, aY as concat, aZ as encodeAbiParameters, a_ as HttpRequestError, a$ as isHex } from "./app-DgCWpRAi.js";
|
|
2
|
+
import "./main.tB_v8aJ9.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
|
-
import "./app-loader-
|
|
4
|
+
import "./app-loader-BvmuBbHg.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
class OffchainLookupError extends BaseError {
|
|
@@ -162,4 +162,4 @@ export {
|
|
|
162
162
|
offchainLookupAbiItem,
|
|
163
163
|
offchainLookupSignature
|
|
164
164
|
};
|
|
165
|
-
//# sourceMappingURL=ccip-
|
|
165
|
+
//# sourceMappingURL=ccip-DpSDrBqK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ccip-
|
|
1
|
+
{"version":3,"file":"ccip-DpSDrBqK.js","sources":["../../../../node_modules/.pnpm/viem@2.24.1_bufferutil@4.0.9_typescript@5.8.2_utf-8-validate@5.0.10_zod@3.24.2/node_modules/viem/_esm/errors/ccip.js","../../../../node_modules/.pnpm/viem@2.24.1_bufferutil@4.0.9_typescript@5.8.2_utf-8-validate@5.0.10_zod@3.24.2/node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n name: 'OffchainLookupError',\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n name: 'OffchainLookupResponseMalformedError',\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n name: 'OffchainLookupSenderMismatchError',\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n const headers = method === 'POST' ? { 'Content-Type': 'application/json' } : {};\n try {\n const response = await fetch(url.replace('{sender}', sender.toLowerCase()).replace('{data}', data), {\n body: JSON.stringify(body),\n headers,\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names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AM,SAAS,IAAI,SAAS,QAAQ,IAAI,QAAQ;AAChD,UAAM,OAAO,WAAW,SAAS,EAAE,MAAM,OAAM,IAAK;AACpD,UAAM,UAAU,WAAW,SAAS,EAAE,gBAAgB,mBAAkB,IAAK,CAAE;AAC/E,QAAI;AACA,YAAM,WAAW,MAAM,MAAM,IAAI,QAAQ,YAAY,OAAO,YAAa,CAAA,EAAE,QAAQ,UAAU,IAAI,GAAG;AAAA,QAChG,MAAM,KAAK,UAAU,IAAI;AAAA,QACzB;AAAA,QACA;AAAA,MAChB,CAAa;AACD,UAAI;AACJ,WAAI,cAAS,QAAQ,IAAI,cAAc,MAAnC,mBAAsC,WAAW,qBAAqB;AACtE,kBAAU,MAAM,SAAS,KAAM,GAAE;AAAA,MACjD,OACiB;AACD,iBAAU,MAAM,SAAS;MACzC;AACY,UAAI,CAAC,SAAS,IAAI;AACd,gBAAQ,IAAI,iBAAiB;AAAA,UACzB;AAAA,UACA,UAAS,iCAAQ,SACX,UAAU,OAAO,KAAK,IACtB,SAAS;AAAA,UACf,SAAS,SAAS;AAAA,UAClB,QAAQ,SAAS;AAAA,UACjB;AAAA,QACpB,CAAiB;AACD;AAAA,MAChB;AACY,UAAI,CAAC,MAAM,MAAM,GAAG;AAChB,gBAAQ,IAAI,qCAAqC;AAAA,UAC7C;AAAA,UACA;AAAA,QACpB,CAAiB;AACD;AAAA,MAChB;AACY,aAAO;AAAA,IACnB,SACe,KAAK;AACR,cAAQ,IAAI,iBAAiB;AAAA,QACzB;AAAA,QACA,SAAS,IAAI;AAAA,QACb;AAAA,MAChB,CAAa;AAAA,IACb;AAAA,EACA;AACI,QAAM;AACV;","x_google_ignoreList":[0,1]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
2
|
-
import { t as twMerge, B as Button, b0 as mergeClassNameProps, O as ERROR, b1 as MISSING, N as CONFLICT, L as SUCCESS, b2 as SYNCING, b3 as INITIAL_SYNC, b4 as ConnectDropdownMenu, b5 as useOnClickOutside, b6 as useEventListener, b7 as useCopyToClipboard, b8 as Select, b9 as Provider, ba as Root3, bb as Trigger, bc as Portal, bd as Content2, be as validateInitialState, bf as validateStateSchemaName, bg as validateModules, bh as useDocumentDrives, U as useUiNodesContext, bi as useDriveContext, bj as FILE$1, V as useUnwrappedReactor, bk as useConnectDid, bl as useConnectCrypto, F as useTranslation, X as useModal, bm as useAtomValue, bn as themeAtom, bo as useUser, bp as useUserPermissions$1, G as useUiNodes, bq as exportFile, br as useGetDocumentModelModule, bs as addActionContext$1, bt as signOperation$1, o as useDocumentDriveServer, bu as useHotkeys, bv as DriveLayout, bw as DriveContextProvider, bx as SearchBar, by as useAnalyticsEngine, bz as useAnalyticsStore, u as useQueryClient,
|
|
2
|
+
import { t as twMerge, B as Button, b0 as mergeClassNameProps, O as ERROR, b1 as MISSING, N as CONFLICT, L as SUCCESS, b2 as SYNCING, b3 as INITIAL_SYNC, b4 as ConnectDropdownMenu, b5 as useOnClickOutside, b6 as useEventListener, b7 as useCopyToClipboard, b8 as Select, b9 as Provider, ba as Root3, bb as Trigger, bc as Portal, bd as Content2, be as validateInitialState, bf as validateStateSchemaName, bg as validateModules, bh as useDocumentDrives, U as useUiNodesContext, bi as useDriveContext, bj as FILE$1, V as useUnwrappedReactor, bk as useConnectDid, bl as useConnectCrypto, F as useTranslation, X as useModal, bm as useAtomValue, bn as themeAtom, bo as useUser, bp as useUserPermissions$1, G as useUiNodes, bq as exportFile, br as useGetDocumentModelModule, bs as addActionContext$1, bt as signOperation$1, o as useDocumentDriveServer, bu as useHotkeys, bv as DriveLayout, bw as DriveContextProvider, bx as SearchBar, by as useAnalyticsEngine, bz as useAnalyticsStore, u as useQueryClient, ai as AnalyticsPath, ah as DateTime, bA as AnalyticsGranularity, bB as useGetEditor, bC as isSameDocument, C as useNavigate, J as useAsyncReactor, bD as useFilteredDocumentModels, a3 as useUnwrappedAnalyticsStore, bE as useDriveEditor, bF as useDocumentDriveById, T as useParams, H as useDocumentDrives$1, M as toast } from "./app-DgCWpRAi.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import React__default, { useState, useCallback, useMemo, useEffect, Fragment, useRef, useLayoutEffect, memo as memo$1, createElement, useSyncExternalStore, Suspense } from "react";
|
|
5
|
-
import { $ as Icon, bZ as getDimensions, b_ as READ, b$ as nodeOptionsMap, c0 as defaultFileOptions, c1 as DELETE, c2 as RENAME, c3 as WRITE, c4 as DUPLICATE, c5 as defaultFolderOptions, c6 as garbageCollect, c7 as sortOperations, c8 as UI_NODE, aR as DRIVE, aB as FILE, ae as buildSignedOperation, aX as generateId$1, ay as isFolderNode, aD as generateNodesCopy, aE as copyNode, aC as moveNode, aA as updateNode, az as deleteNode, at as generateAddNodeAction, au as isFileNode, ax as addFolder, c9 as undo, ca as redo, _ as logger, aS as FOLDER, cb as useDocumentDispatch$1, am as driveDocumentModelModule } from "./app-loader-
|
|
6
|
-
import { E as ENSAvatar, u as useQuery, a as ErrorBoundary } from "./router-
|
|
5
|
+
import { $ as Icon, bZ as getDimensions, b_ as READ, b$ as nodeOptionsMap, c0 as defaultFileOptions, c1 as DELETE, c2 as RENAME, c3 as WRITE, c4 as DUPLICATE, c5 as defaultFolderOptions, c6 as garbageCollect, c7 as sortOperations, c8 as UI_NODE, aR as DRIVE, aB as FILE, ae as buildSignedOperation, aX as generateId$1, ay as isFolderNode, aD as generateNodesCopy, aE as copyNode, aC as moveNode, aA as updateNode, az as deleteNode, at as generateAddNodeAction, au as isFileNode, ax as addFolder, c9 as undo, ca as redo, _ as logger, aS as FOLDER, cb as useDocumentDispatch$1, am as driveDocumentModelModule } from "./app-loader-BvmuBbHg.js";
|
|
6
|
+
import { E as ENSAvatar, u as useQuery, a as ErrorBoundary } from "./router-CuTseNzw.js";
|
|
7
7
|
import { flushSync } from "react-dom";
|
|
8
|
-
import "./main.
|
|
8
|
+
import "./main.tB_v8aJ9.js";
|
|
9
9
|
const PaginationButton = ({ active = false, ...props }) => {
|
|
10
10
|
const className = twMerge("h-8 min-w-8 border border-solid border-gray-300 bg-white px-3 py-1 text-xs text-gray-900 hover:bg-gray-100", !active && "border-0");
|
|
11
11
|
return jsx(Button, { color: "light", size: "small", ...mergeClassNameProps(props, className), children: props.children });
|
|
@@ -4290,7 +4290,7 @@ const useTimelineItems = (documentId, startTimestamp) => {
|
|
|
4290
4290
|
additions,
|
|
4291
4291
|
deletions,
|
|
4292
4292
|
timestamp: startDate.toISOString(),
|
|
4293
|
-
|
|
4293
|
+
startDate,
|
|
4294
4294
|
endDate: new Date(result.end),
|
|
4295
4295
|
revision: 0
|
|
4296
4296
|
};
|
|
@@ -4303,8 +4303,8 @@ const useTimelineItems = (documentId, startTimestamp) => {
|
|
|
4303
4303
|
mappedResult.forEach((item, index) => {
|
|
4304
4304
|
result.push(item);
|
|
4305
4305
|
if (index < mappedResult.length - 1) {
|
|
4306
|
-
const currentDate = new Date(item.
|
|
4307
|
-
const nextDate = new Date(mappedResult[index + 1].
|
|
4306
|
+
const currentDate = new Date(item.startDate);
|
|
4307
|
+
const nextDate = new Date(mappedResult[index + 1].startDate);
|
|
4308
4308
|
const currentHour = currentDate.getHours();
|
|
4309
4309
|
const nextHour = nextDate.getHours();
|
|
4310
4310
|
const currentDay = currentDate.toDateString();
|
|
@@ -4325,6 +4325,15 @@ const useTimelineItems = (documentId, startTimestamp) => {
|
|
|
4325
4325
|
data: resultWithDividers
|
|
4326
4326
|
};
|
|
4327
4327
|
};
|
|
4328
|
+
const getRevisionFromDate = (startDate, endDate, operations = []) => {
|
|
4329
|
+
if (!startDate || !endDate)
|
|
4330
|
+
return 0;
|
|
4331
|
+
const operation = operations.find((operation2) => {
|
|
4332
|
+
const operationDate = new Date(operation2.timestamp);
|
|
4333
|
+
return operationDate >= startDate && operationDate <= endDate;
|
|
4334
|
+
});
|
|
4335
|
+
return operation ? operation.index : 0;
|
|
4336
|
+
};
|
|
4328
4337
|
function EditorLoader(props) {
|
|
4329
4338
|
const [showLoading, setShowLoading] = useState(false);
|
|
4330
4339
|
useEffect(() => {
|
|
@@ -4611,7 +4620,11 @@ const DocumentEditor = (props) => {
|
|
|
4611
4620
|
...context,
|
|
4612
4621
|
getDocumentRevision: onGetDocumentRevision,
|
|
4613
4622
|
readMode: !!selectedTimelineItem,
|
|
4614
|
-
selectedTimelineRevision:
|
|
4623
|
+
selectedTimelineRevision: getRevisionFromDate(
|
|
4624
|
+
selectedTimelineItem == null ? void 0 : selectedTimelineItem.startDate,
|
|
4625
|
+
selectedTimelineItem == null ? void 0 : selectedTimelineItem.endDate,
|
|
4626
|
+
document2.operations.global
|
|
4627
|
+
)
|
|
4615
4628
|
},
|
|
4616
4629
|
document: document2,
|
|
4617
4630
|
documentNodeName: fileNodeDocument.name,
|
|
@@ -4943,6 +4956,18 @@ function DriveEditorContainer() {
|
|
|
4943
4956
|
const { addFile, addDocument } = useDocumentDriveServer();
|
|
4944
4957
|
const documentModels = useFilteredDocumentModels();
|
|
4945
4958
|
const useDriveDocumentState = makeDriveDocumentStateHook(reactor);
|
|
4959
|
+
const getDocument = useGetDocument();
|
|
4960
|
+
const analyticsStore = useUnwrappedAnalyticsStore();
|
|
4961
|
+
const onGetDocumentRevision = useCallback(
|
|
4962
|
+
(documentId, options) => {
|
|
4963
|
+
if (!selectedNode) {
|
|
4964
|
+
console.error("No selected node");
|
|
4965
|
+
return Promise.reject(new Error("No selected node"));
|
|
4966
|
+
}
|
|
4967
|
+
return getDocument(selectedNode.driveId, documentId, options);
|
|
4968
|
+
},
|
|
4969
|
+
[getDocument, selectedNode]
|
|
4970
|
+
);
|
|
4946
4971
|
const driveContext = useMemo(
|
|
4947
4972
|
() => ({
|
|
4948
4973
|
showSearchBar: false,
|
|
@@ -4985,7 +5010,9 @@ function DriveEditorContainer() {
|
|
|
4985
5010
|
...editorProps,
|
|
4986
5011
|
context: {
|
|
4987
5012
|
...editorProps.context,
|
|
4988
|
-
...driveContext
|
|
5013
|
+
...driveContext,
|
|
5014
|
+
getDocumentRevision: onGetDocumentRevision,
|
|
5015
|
+
analyticsStore
|
|
4989
5016
|
},
|
|
4990
5017
|
onSwitchboardLinkClick: void 0,
|
|
4991
5018
|
document: document2,
|
|
@@ -5034,4 +5061,4 @@ function Content() {
|
|
|
5034
5061
|
export {
|
|
5035
5062
|
Content as default
|
|
5036
5063
|
};
|
|
5037
|
-
//# sourceMappingURL=content-
|
|
5064
|
+
//# sourceMappingURL=content-BfmXiklP.js.map
|