@powerhousedao/connect 1.0.1-dev.0 → 1.0.2-dev.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/assets/{app-CDyci3gH.js → app-B-OQa5ns.js} +628 -30
- package/dist/assets/{app-loader-CrrV0_f9.js → app-loader-CvftvVK0.js} +8 -4
- package/dist/assets/{ccip-D3crAAb6.js → ccip-qMQqr81w.js} +3 -3
- package/dist/assets/{content-BCSN7ap3.js → content-D-7-6JpA.js} +3 -3
- package/dist/assets/{index-gSAUFVts.js → index-Bgqlvf9G.js} +3 -3
- package/dist/assets/{index-BomSBpCj.js → index-BrGKy_yq.js} +3 -3
- package/dist/assets/{index-CvT8Fjzs.js → index-Bv216hey.js} +4 -4
- package/dist/assets/{main.-_7fbZHa.js → main.BonTLytE.js} +1 -1
- package/dist/hmr.js +1 -1
- package/dist/index.html +1 -1
- package/dist/vite-envs.sh +1 -1
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-qMQqr81w.js","assets/main.BonTLytE.js","assets/app-loader-CvftvVK0.js","assets/app-loader-DC8DXqh9.css","assets/index-Bgqlvf9G.js","assets/style-Ce3V83BE.css","assets/index-Bv216hey.js","assets/content-D-7-6JpA.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __typeError = (msg) => {
|
|
4
4
|
throw TypeError(msg);
|
|
@@ -19,9 +19,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
var _focused, _cleanup, _setup, _a, _online, _cleanup2, _setup2, _b, _gcTimeout, _c, _initialState, _revertState, _cache, _client, _retryer, _defaultOptions, _abortSignalConsumed, _Query_instances, dispatch_fn, _d, _queries, _e2, _observers, _mutationCache, _retryer2, _Mutation_instances, dispatch_fn2, _f, _mutations, _scopes, _mutationId, _g, _queryCache, _mutationCache2, _defaultOptions2, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _h, _client2, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _QueryObserver_instances, executeFetch_fn, updateStaleTimeout_fn, computeRefetchInterval_fn, updateRefetchInterval_fn, updateTimers_fn, clearStaleTimeout_fn, clearRefetchInterval_fn, updateQuery_fn, notify_fn, _i;
|
|
22
|
-
import { _ as __vitePreload } from "./main
|
|
22
|
+
import { _ as __vitePreload } from "./main.BonTLytE.js";
|
|
23
23
|
import { jsx as jsx$1, Fragment, jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { c as createAction, a as createReducer, i as isDocumentAction, R as ReorderStateExamplesInputSchema, D as DeleteStateExampleInputSchema, U as UpdateStateExampleInputSchema, A as AddStateExampleInputSchema, S as SetInitialStateInputSchema, b as SetStateSchemaInputSchema, d as ReorderModuleOperationsInputSchema, e as DeleteOperationInputSchema, M as MoveOperationInputSchema, f as SetOperationReducerInputSchema, g as SetOperationTemplateInputSchema, h as SetOperationDescriptionInputSchema, j as SetOperationSchemaInputSchema, k as SetOperationScopeInputSchema, l as SetOperationNameInputSchema, m as AddOperationInputSchema, n as ReorderOperationExamplesInputSchema, o as DeleteOperationExampleInputSchema, p as UpdateOperationExampleInputSchema, q as AddOperationExampleInputSchema, r as ReorderOperationErrorsInputSchema, s as DeleteOperationErrorInputSchema, t as SetOperationErrorTemplateInputSchema, u as SetOperationErrorDescriptionInputSchema, v as SetOperationErrorNameInputSchema, w as SetOperationErrorCodeInputSchema, x as AddOperationErrorInputSchema, y as ReorderModulesInputSchema, z as DeleteModuleInputSchema, B as SetModuleDescriptionInputSchema, C as SetModuleNameInputSchema, E as AddModuleInputSchema, F as ReorderChangeLogItemsInputSchema, G as DeleteChangeLogItemInputSchema, H as UpdateChangeLogItemInputSchema, I as AddChangeLogItemInputSchema, J as SetAuthorWebsiteInputSchema, K as SetAuthorNameInputSchema, L as SetModelDescriptionInputSchema, N as SetModelExtensionInputSchema, O as SetModelIdInputSchema, P as SetModelNameInputSchema, Q as baseCreateExtendedState, T as baseCreateDocument, V as baseSaveToFile, W as baseSaveToFileHandle, X as baseLoadFromFile, Y as baseLoadFromInput, Z as pascalCase, _ as Icon, $ as getDefaultExportFromCjs, a0 as LOCAL, a1 as commonjsGlobal, a2 as PUBLIC, a3 as SWITCHBOARD, a4 as locationInfoByLocation, a5 as sharingTypeOptions, a6 as objectType, a7 as recordType, a8 as stringType, a9 as capitalCase, aa as CLOUD, ab as createZip, ac as logger$1, ad as LZString, ae as buildSignedOperation, af as getI18n, ag as getDefaults, ah as connectConfig, ai as hashDocumentStateForScope, aj as setErrorHandler, ak as driveDocumentModelModule, al as createBrowserDocumentDriveServer, am as hashKey$1, an as childLogger, ao as reducer$8, ap as isDocumentDrive, aq as generateAddNodeAction, ar as isFileNode, as as uploadDocumentOperations, at as updateFile, au as addFolder, av as isFolderNode, aw as deleteNode, ax as updateNode, ay as FILE, az as moveNode, aA as generateNodesCopy, aB as copyNode, aC as createState$1, aD as setDriveName, aE as setAvailableOffline, aF as setSharingType, aG as SynchronizationUnitNotFoundError, aH as removeTrigger, aI as generateUUID, aJ as PullResponderTransmitter, aK as addTrigger, aL as ReadDriveNotFoundError, aM as openUrl, aN as getNodeOptions, aO as DRIVE, aP as FOLDER, aQ as requestPublicDrive, aR as serviceWorkerManager, aS as packageJson, aT as t$1, aU as gql, aV as request } from "./app-loader-
|
|
24
|
+
import { c as createAction, a as createReducer, i as isDocumentAction, R as ReorderStateExamplesInputSchema, D as DeleteStateExampleInputSchema, U as UpdateStateExampleInputSchema, A as AddStateExampleInputSchema, S as SetInitialStateInputSchema, b as SetStateSchemaInputSchema, d as ReorderModuleOperationsInputSchema, e as DeleteOperationInputSchema, M as MoveOperationInputSchema, f as SetOperationReducerInputSchema, g as SetOperationTemplateInputSchema, h as SetOperationDescriptionInputSchema, j as SetOperationSchemaInputSchema, k as SetOperationScopeInputSchema, l as SetOperationNameInputSchema, m as AddOperationInputSchema, n as ReorderOperationExamplesInputSchema, o as DeleteOperationExampleInputSchema, p as UpdateOperationExampleInputSchema, q as AddOperationExampleInputSchema, r as ReorderOperationErrorsInputSchema, s as DeleteOperationErrorInputSchema, t as SetOperationErrorTemplateInputSchema, u as SetOperationErrorDescriptionInputSchema, v as SetOperationErrorNameInputSchema, w as SetOperationErrorCodeInputSchema, x as AddOperationErrorInputSchema, y as ReorderModulesInputSchema, z as DeleteModuleInputSchema, B as SetModuleDescriptionInputSchema, C as SetModuleNameInputSchema, E as AddModuleInputSchema, F as ReorderChangeLogItemsInputSchema, G as DeleteChangeLogItemInputSchema, H as UpdateChangeLogItemInputSchema, I as AddChangeLogItemInputSchema, J as SetAuthorWebsiteInputSchema, K as SetAuthorNameInputSchema, L as SetModelDescriptionInputSchema, N as SetModelExtensionInputSchema, O as SetModelIdInputSchema, P as SetModelNameInputSchema, Q as baseCreateExtendedState, T as baseCreateDocument, V as baseSaveToFile, W as baseSaveToFileHandle, X as baseLoadFromFile, Y as baseLoadFromInput, Z as pascalCase, _ as Icon, $ as getDefaultExportFromCjs, a0 as LOCAL, a1 as commonjsGlobal, a2 as PUBLIC, a3 as SWITCHBOARD, a4 as locationInfoByLocation, a5 as sharingTypeOptions, a6 as objectType, a7 as recordType, a8 as stringType, a9 as capitalCase, aa as CLOUD, ab as createZip, ac as logger$1, ad as LZString, ae as buildSignedOperation, af as getI18n, ag as getDefaults, ah as connectConfig, ai as hashDocumentStateForScope, aj as setErrorHandler, ak as driveDocumentModelModule, al as createBrowserDocumentDriveServer, am as hashKey$1, an as childLogger, ao as reducer$8, ap as isDocumentDrive, aq as generateAddNodeAction, ar as isFileNode, as as uploadDocumentOperations, at as updateFile, au as addFolder, av as isFolderNode, aw as deleteNode, ax as updateNode, ay as FILE, az as moveNode, aA as generateNodesCopy, aB as copyNode, aC as createState$1, aD as setDriveName, aE as setAvailableOffline, aF as setSharingType, aG as SynchronizationUnitNotFoundError, aH as removeTrigger, aI as generateUUID, aJ as PullResponderTransmitter, aK as addTrigger, aL as ReadDriveNotFoundError, aM as openUrl, aN as getNodeOptions, aO as DRIVE, aP as FOLDER, aQ as requestPublicDrive, aR as serviceWorkerManager, aS as packageJson, aT as t$1, aU as gql, aV as request } from "./app-loader-CvftvVK0.js";
|
|
25
25
|
import * as React from "react";
|
|
26
26
|
import React__default, { useLayoutEffect, useEffect, useState, forwardRef, useRef, useCallback, useContext, useMemo, createContext, Component, Fragment as Fragment$1, createElement, useSyncExternalStore, useId as useId$1, isValidElement, cloneElement, Children, useReducer, useDebugValue, Suspense } from "react";
|
|
27
27
|
import "@powerhousedao/reactor-browser";
|
|
@@ -3718,7 +3718,7 @@ const computePosition = (reference, floating, options2) => {
|
|
|
3718
3718
|
});
|
|
3719
3719
|
};
|
|
3720
3720
|
var index$3 = typeof document !== "undefined" ? useLayoutEffect : useEffect;
|
|
3721
|
-
function deepEqual$
|
|
3721
|
+
function deepEqual$3(a2, b2) {
|
|
3722
3722
|
if (a2 === b2) {
|
|
3723
3723
|
return true;
|
|
3724
3724
|
}
|
|
@@ -3736,7 +3736,7 @@ function deepEqual$2(a2, b2) {
|
|
|
3736
3736
|
length2 = a2.length;
|
|
3737
3737
|
if (length2 !== b2.length) return false;
|
|
3738
3738
|
for (i2 = length2; i2-- !== 0; ) {
|
|
3739
|
-
if (!deepEqual$
|
|
3739
|
+
if (!deepEqual$3(a2[i2], b2[i2])) {
|
|
3740
3740
|
return false;
|
|
3741
3741
|
}
|
|
3742
3742
|
}
|
|
@@ -3757,7 +3757,7 @@ function deepEqual$2(a2, b2) {
|
|
|
3757
3757
|
if (key === "_owner" && a2.$$typeof) {
|
|
3758
3758
|
continue;
|
|
3759
3759
|
}
|
|
3760
|
-
if (!deepEqual$
|
|
3760
|
+
if (!deepEqual$3(a2[key], b2[key])) {
|
|
3761
3761
|
return false;
|
|
3762
3762
|
}
|
|
3763
3763
|
}
|
|
@@ -3809,7 +3809,7 @@ function useFloating(options2) {
|
|
|
3809
3809
|
isPositioned: false
|
|
3810
3810
|
});
|
|
3811
3811
|
const [latestMiddleware, setLatestMiddleware] = React.useState(middleware2);
|
|
3812
|
-
if (!deepEqual$
|
|
3812
|
+
if (!deepEqual$3(latestMiddleware, middleware2)) {
|
|
3813
3813
|
setLatestMiddleware(middleware2);
|
|
3814
3814
|
}
|
|
3815
3815
|
const [_reference, _setReference] = React.useState(null);
|
|
@@ -3856,7 +3856,7 @@ function useFloating(options2) {
|
|
|
3856
3856
|
// setting it to `true` when `open === false` (must be specified).
|
|
3857
3857
|
isPositioned: openRef.current !== false
|
|
3858
3858
|
};
|
|
3859
|
-
if (isMountedRef.current && !deepEqual$
|
|
3859
|
+
if (isMountedRef.current && !deepEqual$3(dataRef.current, fullData)) {
|
|
3860
3860
|
dataRef.current = fullData;
|
|
3861
3861
|
ReactDOM.flushSync(() => {
|
|
3862
3862
|
setData(fullData);
|
|
@@ -5299,7 +5299,7 @@ var Popover$1 = (props) => {
|
|
|
5299
5299
|
};
|
|
5300
5300
|
Popover$1.displayName = POPOVER_NAME;
|
|
5301
5301
|
var ANCHOR_NAME$1 = "PopoverAnchor";
|
|
5302
|
-
var PopoverAnchor = React.forwardRef(
|
|
5302
|
+
var PopoverAnchor$1 = React.forwardRef(
|
|
5303
5303
|
(props, forwardedRef) => {
|
|
5304
5304
|
const { __scopePopover, ...anchorProps } = props;
|
|
5305
5305
|
const context = usePopoverContext(ANCHOR_NAME$1, __scopePopover);
|
|
@@ -5312,7 +5312,7 @@ var PopoverAnchor = React.forwardRef(
|
|
|
5312
5312
|
return /* @__PURE__ */ jsx$1(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
5313
5313
|
}
|
|
5314
5314
|
);
|
|
5315
|
-
PopoverAnchor.displayName = ANCHOR_NAME$1;
|
|
5315
|
+
PopoverAnchor$1.displayName = ANCHOR_NAME$1;
|
|
5316
5316
|
var TRIGGER_NAME$4 = "PopoverTrigger";
|
|
5317
5317
|
var PopoverTrigger$1 = React.forwardRef(
|
|
5318
5318
|
(props, forwardedRef) => {
|
|
@@ -5533,6 +5533,7 @@ function getState$1(open) {
|
|
|
5533
5533
|
return open ? "open" : "closed";
|
|
5534
5534
|
}
|
|
5535
5535
|
var Root2$2 = Popover$1;
|
|
5536
|
+
var Anchor2$1 = PopoverAnchor$1;
|
|
5536
5537
|
var Trigger$3 = PopoverTrigger$1;
|
|
5537
5538
|
var Portal$3 = PopoverPortal;
|
|
5538
5539
|
var Content2$3 = PopoverContent$1;
|
|
@@ -8251,6 +8252,7 @@ function cn(...inputs) {
|
|
|
8251
8252
|
return twMerge(clsx(inputs));
|
|
8252
8253
|
}
|
|
8253
8254
|
const Popover = Root2$2;
|
|
8255
|
+
const PopoverAnchor = Anchor2$1;
|
|
8254
8256
|
const PopoverTrigger = Trigger$3;
|
|
8255
8257
|
const PopoverContent = React__default.forwardRef(({ align = "center", sideOffset = 4, className, ...props }, ref) => jsx$1(Portal$3, { children: jsx$1(Content2$3, { align, sideOffset, className: cn([
|
|
8256
8258
|
"data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in",
|
|
@@ -20572,7 +20574,7 @@ async function call(client2, args) {
|
|
|
20572
20574
|
} catch (err) {
|
|
20573
20575
|
const data2 = getRevertErrorData(err);
|
|
20574
20576
|
const { offchainLookup, offchainLookupSignature } = await __vitePreload(async () => {
|
|
20575
|
-
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-
|
|
20577
|
+
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-qMQqr81w.js");
|
|
20576
20578
|
return { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 };
|
|
20577
20579
|
}, true ? __vite__mapDeps([0,1,2,3]) : void 0);
|
|
20578
20580
|
if (client2.ccipRead !== false && (data2 == null ? void 0 : data2.slice(0, 10)) === offchainLookupSignature && to)
|
|
@@ -32175,7 +32177,7 @@ var createSubject = () => {
|
|
|
32175
32177
|
};
|
|
32176
32178
|
};
|
|
32177
32179
|
var isPrimitive$1 = (value) => isNullOrUndefined(value) || !isObjectType(value);
|
|
32178
|
-
function deepEqual$
|
|
32180
|
+
function deepEqual$2(object1, object2) {
|
|
32179
32181
|
if (isPrimitive$1(object1) || isPrimitive$1(object2)) {
|
|
32180
32182
|
return object1 === object2;
|
|
32181
32183
|
}
|
|
@@ -32194,7 +32196,7 @@ function deepEqual$1(object1, object2) {
|
|
|
32194
32196
|
}
|
|
32195
32197
|
if (key !== "ref") {
|
|
32196
32198
|
const val2 = object2[key];
|
|
32197
|
-
if (isDateObject(val1) && isDateObject(val2) || isObject(val1) && isObject(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$
|
|
32199
|
+
if (isDateObject(val1) && isDateObject(val2) || isObject(val1) && isObject(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$2(val1, val2) : val1 !== val2) {
|
|
32198
32200
|
return false;
|
|
32199
32201
|
}
|
|
32200
32202
|
}
|
|
@@ -32237,7 +32239,7 @@ function getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues
|
|
|
32237
32239
|
getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
|
|
32238
32240
|
}
|
|
32239
32241
|
} else {
|
|
32240
|
-
dirtyFieldsFromValues[key] = !deepEqual$
|
|
32242
|
+
dirtyFieldsFromValues[key] = !deepEqual$2(data[key], formValues[key]);
|
|
32241
32243
|
}
|
|
32242
32244
|
}
|
|
32243
32245
|
}
|
|
@@ -32470,7 +32472,7 @@ function createFormControl(props = {}) {
|
|
|
32470
32472
|
_formState.isDirty = output.isDirty = _getDirty();
|
|
32471
32473
|
shouldUpdateField = isPreviousDirty !== output.isDirty;
|
|
32472
32474
|
}
|
|
32473
|
-
const isCurrentFieldPristine = disabledField || deepEqual$
|
|
32475
|
+
const isCurrentFieldPristine = disabledField || deepEqual$2(get(_defaultValues, name), fieldValue);
|
|
32474
32476
|
isPreviousDirty = !!(!disabledField && get(_formState.dirtyFields, name));
|
|
32475
32477
|
isCurrentFieldPristine || disabledField ? unset(_formState.dirtyFields, name) : set(_formState.dirtyFields, name, true);
|
|
32476
32478
|
output.dirtyFields = _formState.dirtyFields;
|
|
@@ -32499,7 +32501,7 @@ function createFormControl(props = {}) {
|
|
|
32499
32501
|
delayErrorCallback = null;
|
|
32500
32502
|
error ? set(_formState.errors, name, error) : unset(_formState.errors, name);
|
|
32501
32503
|
}
|
|
32502
|
-
if ((error ? !deepEqual$
|
|
32504
|
+
if ((error ? !deepEqual$2(previousFieldError, error) : previousFieldError) || !isEmptyObject(fieldState) || shouldUpdateValid) {
|
|
32503
32505
|
const updatedFormState = {
|
|
32504
32506
|
...fieldState,
|
|
32505
32507
|
...shouldUpdateValid && isBoolean(isValid) ? { isValid } : {},
|
|
@@ -32568,7 +32570,7 @@ function createFormControl(props = {}) {
|
|
|
32568
32570
|
}
|
|
32569
32571
|
_names.unMount = /* @__PURE__ */ new Set();
|
|
32570
32572
|
};
|
|
32571
|
-
const _getDirty = (name, data) => !_options.disabled && (name && data && set(_formValues, name, data), !deepEqual$
|
|
32573
|
+
const _getDirty = (name, data) => !_options.disabled && (name && data && set(_formValues, name, data), !deepEqual$2(getValues(), _defaultValues));
|
|
32572
32574
|
const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {
|
|
32573
32575
|
..._state.mount ? _formValues : isUndefined(defaultValue) ? _defaultValues : isString$1(names) ? { [names]: defaultValue } : defaultValue
|
|
32574
32576
|
}, isGlobal, defaultValue);
|
|
@@ -32647,7 +32649,7 @@ function createFormControl(props = {}) {
|
|
|
32647
32649
|
const field = get(_fields, name);
|
|
32648
32650
|
const getCurrentFieldValue = () => target.type ? getFieldValue(field._f) : getEventValue(event);
|
|
32649
32651
|
const _updateIsFieldValueUpdated = (fieldValue) => {
|
|
32650
|
-
isFieldValueUpdated = Number.isNaN(fieldValue) || isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || deepEqual$
|
|
32652
|
+
isFieldValueUpdated = Number.isNaN(fieldValue) || isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || deepEqual$2(fieldValue, get(_formValues, name, fieldValue));
|
|
32651
32653
|
};
|
|
32652
32654
|
if (field) {
|
|
32653
32655
|
let error;
|
|
@@ -33023,7 +33025,7 @@ function createFormControl(props = {}) {
|
|
|
33023
33025
|
_state.watch = !!_options.shouldUnregister;
|
|
33024
33026
|
_subjects.state.next({
|
|
33025
33027
|
submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
|
|
33026
|
-
isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual$
|
|
33028
|
+
isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual$2(formValues, _defaultValues)),
|
|
33027
33029
|
isSubmitted: keepStateOptions.keepIsSubmitted ? _formState.isSubmitted : false,
|
|
33028
33030
|
dirtyFields: isEmptyResetValues ? {} : keepStateOptions.keepDirtyValues ? keepStateOptions.keepDefaultValues && _formValues ? getDirtyFields(_defaultValues, _formValues) : _formState.dirtyFields : keepStateOptions.keepDefaultValues && formValues ? getDirtyFields(_defaultValues, formValues) : keepStateOptions.keepDirty ? _formState.dirtyFields : {},
|
|
33029
33031
|
touchedFields: keepStateOptions.keepTouched ? _formState.touchedFields : {},
|
|
@@ -33177,7 +33179,7 @@ function useForm(props = {}) {
|
|
|
33177
33179
|
}
|
|
33178
33180
|
}, [control, formState.isDirty]);
|
|
33179
33181
|
React__default.useEffect(() => {
|
|
33180
|
-
if (props.values && !deepEqual$
|
|
33182
|
+
if (props.values && !deepEqual$2(props.values, _values.current)) {
|
|
33181
33183
|
control._reset(props.values, control._options.resetOptions);
|
|
33182
33184
|
_values.current = props.values;
|
|
33183
33185
|
updateFormState((state) => ({ ...state }));
|
|
@@ -33396,6 +33398,44 @@ function useCopyToClipboard() {
|
|
|
33396
33398
|
}, []);
|
|
33397
33399
|
return [copiedText, copy2];
|
|
33398
33400
|
}
|
|
33401
|
+
var IS_SERVER2 = typeof window === "undefined";
|
|
33402
|
+
function useMediaQuery(query, {
|
|
33403
|
+
defaultValue = false,
|
|
33404
|
+
initializeWithValue = true
|
|
33405
|
+
} = {}) {
|
|
33406
|
+
const getMatches = (query2) => {
|
|
33407
|
+
if (IS_SERVER2) {
|
|
33408
|
+
return defaultValue;
|
|
33409
|
+
}
|
|
33410
|
+
return window.matchMedia(query2).matches;
|
|
33411
|
+
};
|
|
33412
|
+
const [matches, setMatches] = useState(() => {
|
|
33413
|
+
if (initializeWithValue) {
|
|
33414
|
+
return getMatches(query);
|
|
33415
|
+
}
|
|
33416
|
+
return defaultValue;
|
|
33417
|
+
});
|
|
33418
|
+
function handleChange() {
|
|
33419
|
+
setMatches(getMatches(query));
|
|
33420
|
+
}
|
|
33421
|
+
useIsomorphicLayoutEffect$1(() => {
|
|
33422
|
+
const matchMedia = window.matchMedia(query);
|
|
33423
|
+
handleChange();
|
|
33424
|
+
if (matchMedia.addListener) {
|
|
33425
|
+
matchMedia.addListener(handleChange);
|
|
33426
|
+
} else {
|
|
33427
|
+
matchMedia.addEventListener("change", handleChange);
|
|
33428
|
+
}
|
|
33429
|
+
return () => {
|
|
33430
|
+
if (matchMedia.removeListener) {
|
|
33431
|
+
matchMedia.removeListener(handleChange);
|
|
33432
|
+
} else {
|
|
33433
|
+
matchMedia.removeEventListener("change", handleChange);
|
|
33434
|
+
}
|
|
33435
|
+
};
|
|
33436
|
+
}, [query]);
|
|
33437
|
+
return matches;
|
|
33438
|
+
}
|
|
33399
33439
|
function useUnmount(func) {
|
|
33400
33440
|
const funcRef = useRef(func);
|
|
33401
33441
|
funcRef.current = func;
|
|
@@ -33783,6 +33823,27 @@ function About$1(props) {
|
|
|
33783
33823
|
const { packageJson: packageJson2, phCliVersion } = props;
|
|
33784
33824
|
return jsxs("div", { className: "bg-white p-3", children: [jsx$1("h2", { className: "font-semibold", children: "About" }), jsx$1("p", { className: "text-sm font-normal text-gray-600", children: "Connect is the hub for your most important documents and processes translated into software. Easily capture data in a structured way with Connect." }), jsx$1("div", { className: "my-4", children: jsx$1(DependencyVersions, { packageJson: packageJson2, phCliVersion }) })] });
|
|
33785
33825
|
}
|
|
33826
|
+
const IdAutocompleteContext = createContext({});
|
|
33827
|
+
const useIdAutocompleteContext = () => useContext(IdAutocompleteContext);
|
|
33828
|
+
const IconRenderer = ({ customIcon, asPlaceholder }) => {
|
|
33829
|
+
if (typeof customIcon === "string") {
|
|
33830
|
+
return jsx$1(Icon, { name: customIcon, size: 24, className: cn("shrink-0", asPlaceholder ? "text-gray-400 dark:text-gray-700" : "text-gray-900 dark:text-gray-300") });
|
|
33831
|
+
}
|
|
33832
|
+
if (React__default.isValidElement(customIcon)) {
|
|
33833
|
+
return jsx$1("div", { className: "size-6 shrink-0 overflow-hidden", children: customIcon });
|
|
33834
|
+
}
|
|
33835
|
+
return null;
|
|
33836
|
+
};
|
|
33837
|
+
const ReloadButton = ({ isLoadingSelectedOption, handleFetchSelectedOption, isFetchSelectedOptionSync, value }) => jsx$1("div", { children: jsx$1("button", { type: "button", disabled: isLoadingSelectedOption || isFetchSelectedOptionSync, onClick: () => {
|
|
33838
|
+
if (!isLoadingSelectedOption && !isFetchSelectedOptionSync) {
|
|
33839
|
+
handleFetchSelectedOption(value);
|
|
33840
|
+
}
|
|
33841
|
+
}, className: cn("mt-0.5 focus-visible:outline-none", "disabled:pointer-events-none [&_svg]:pointer-events-none"), "aria-label": isLoadingSelectedOption ? "Loading" : isFetchSelectedOptionSync ? "Success" : "Reload", children: jsx$1(Icon, { name: isFetchSelectedOptionSync ? "Checkmark" : "Reload", size: 16, className: cn("text-gray-500 dark:text-gray-600", isLoadingSelectedOption && "animate-spin", isFetchSelectedOptionSync && "animate-in fade-in duration-500") }) }) });
|
|
33842
|
+
const IdAutocompleteListOption = ({ variant = "withValue", icon, title = "Title not available", path = "Path not available", value, description = "Description not available", asPlaceholder, showValue = true, isLoadingSelectedOption, handleFetchSelectedOption, isFetchSelectedOptionSync, className, placeholderIcon = "PowerhouseLogoSmall", ...extraProps }) => {
|
|
33843
|
+
const renderWithValue = () => jsx$1("div", { className: cn("flex w-full items-center"), children: jsx$1("span", { className: cn("truncate text-xs leading-5", asPlaceholder ? "text-gray-400 dark:text-gray-700" : "text-gray-500 dark:text-gray-600"), children: value }) });
|
|
33844
|
+
const renderWithValueTitleAndDescription = (showDescription = true) => jsxs("div", { className: cn("flex w-full flex-col gap-1"), children: [jsxs("div", { className: cn("flex gap-2"), children: [jsx$1(IconRenderer, { customIcon: asPlaceholder ? placeholderIcon : icon, asPlaceholder }), jsxs("div", { className: cn("flex min-w-0 grow flex-col gap-[-2px]"), children: [jsx$1("span", { className: cn("truncate text-sm font-bold leading-5", asPlaceholder ? "text-gray-400 dark:text-gray-700" : "text-gray-900 dark:text-gray-300"), children: title }), !showValue && typeof path === "object" ? jsx$1("a", { href: path.url, target: "_blank", rel: "noopener noreferrer", className: cn("truncate text-xs leading-5 text-gray-500 hover:underline dark:text-gray-600"), children: path.text }) : jsx$1("span", { className: cn("truncate text-xs leading-5", asPlaceholder ? "text-gray-400 dark:text-gray-700" : "text-gray-500 dark:text-gray-600"), children: typeof path === "object" ? path.text : path })] }), asPlaceholder === false && handleFetchSelectedOption && jsx$1(ReloadButton, { isLoadingSelectedOption, handleFetchSelectedOption, isFetchSelectedOptionSync, value })] }), showValue && jsx$1("div", { className: cn("flex max-w-full items-center"), children: jsx$1("span", { className: cn("truncate text-xs leading-5", asPlaceholder ? "text-gray-400 dark:text-gray-700" : "text-gray-500 dark:text-gray-600"), children: value }) }), showDescription && jsx$1("div", { className: cn("flex flex-col"), children: jsx$1("p", { className: cn("line-clamp-2 text-xs leading-5", asPlaceholder ? "text-gray-400 dark:text-gray-700" : "text-gray-900 dark:text-gray-300"), children: description }) }), showDescription && "agentType" in extraProps && typeof extraProps.agentType === "string" && jsx$1("div", { className: cn("flex max-w-full items-center justify-end"), children: jsx$1("span", { className: cn("truncate text-xs leading-5", asPlaceholder ? "text-gray-400 dark:text-gray-700" : "text-gray-500 dark:text-gray-600"), children: extraProps.agentType }) })] });
|
|
33845
|
+
return jsxs("div", { className: cn("max-w-full rounded-md bg-transparent px-3 pb-2", variant === "withValue" ? "pt-2" : "pt-3", className), children: [variant === "withValue" && renderWithValue(), variant === "withValueAndTitle" && renderWithValueTitleAndDescription(false), variant === "withValueTitleAndDescription" && renderWithValueTitleAndDescription()] });
|
|
33846
|
+
};
|
|
33786
33847
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
33787
33848
|
createPopperScope
|
|
33788
33849
|
]);
|
|
@@ -34570,6 +34631,150 @@ const FormDescription = ({ children, as, className }) => {
|
|
|
34570
34631
|
const FormGroup = ({ children }) => {
|
|
34571
34632
|
return jsx$1("div", { className: "flex flex-col gap-2", children });
|
|
34572
34633
|
};
|
|
34634
|
+
function deepEqual$1(a2, b2, visited = /* @__PURE__ */ new Map()) {
|
|
34635
|
+
if (a2 === b2) {
|
|
34636
|
+
return true;
|
|
34637
|
+
}
|
|
34638
|
+
if (a2 === null || b2 === null || a2 === void 0 || b2 === void 0) {
|
|
34639
|
+
return false;
|
|
34640
|
+
}
|
|
34641
|
+
if (typeof a2 !== typeof b2) {
|
|
34642
|
+
return false;
|
|
34643
|
+
}
|
|
34644
|
+
if (Array.isArray(a2) && Array.isArray(b2)) {
|
|
34645
|
+
if (visited.get(a2) === b2) {
|
|
34646
|
+
return true;
|
|
34647
|
+
}
|
|
34648
|
+
visited.set(a2, b2);
|
|
34649
|
+
return a2.length === b2.length && a2.every((value, index2) => deepEqual$1(value, b2[index2], visited));
|
|
34650
|
+
}
|
|
34651
|
+
if (typeof a2 === "object" && typeof b2 === "object" && !Array.isArray(a2) && !Array.isArray(b2)) {
|
|
34652
|
+
if (visited.get(a2) === b2) {
|
|
34653
|
+
return true;
|
|
34654
|
+
}
|
|
34655
|
+
visited.set(a2, b2);
|
|
34656
|
+
const aKeys = Object.keys(a2);
|
|
34657
|
+
const bKeys = Object.keys(b2);
|
|
34658
|
+
return aKeys.length === bKeys.length && aKeys.every((key) => {
|
|
34659
|
+
return key in b2 && deepEqual$1(a2[key], b2[key], visited);
|
|
34660
|
+
});
|
|
34661
|
+
}
|
|
34662
|
+
return false;
|
|
34663
|
+
}
|
|
34664
|
+
function setNativeValue(element, value) {
|
|
34665
|
+
var _a2, _b2;
|
|
34666
|
+
const valueSetter = (_a2 = Object.getOwnPropertyDescriptor(element, "value")) == null ? void 0 : _a2.set;
|
|
34667
|
+
const prototype = Object.getPrototypeOf(element);
|
|
34668
|
+
const prototypeValueSetter = (_b2 = Object.getOwnPropertyDescriptor(prototype, "value")) == null ? void 0 : _b2.set;
|
|
34669
|
+
if (valueSetter && valueSetter !== prototypeValueSetter) {
|
|
34670
|
+
prototypeValueSetter == null ? void 0 : prototypeValueSetter.call(element, value);
|
|
34671
|
+
} else {
|
|
34672
|
+
valueSetter == null ? void 0 : valueSetter.call(element, value);
|
|
34673
|
+
}
|
|
34674
|
+
}
|
|
34675
|
+
function _applyTransformers(transformers, value, filter = "blur") {
|
|
34676
|
+
return transformers.reduce((value2, transformer) => {
|
|
34677
|
+
var _a2, _b2;
|
|
34678
|
+
if (typeof transformer === "function") {
|
|
34679
|
+
if (filter === "blur" || filter === "all") {
|
|
34680
|
+
return transformer(value2);
|
|
34681
|
+
}
|
|
34682
|
+
return value2;
|
|
34683
|
+
}
|
|
34684
|
+
if ((((_a2 = transformer.options) == null ? void 0 : _a2.trigger) ?? "blur") !== filter && filter !== "all") {
|
|
34685
|
+
return value2;
|
|
34686
|
+
}
|
|
34687
|
+
if (((_b2 = transformer.options) == null ? void 0 : _b2.if) === void 0 || transformer.options.if) {
|
|
34688
|
+
return transformer.transformer(value2);
|
|
34689
|
+
}
|
|
34690
|
+
return value2;
|
|
34691
|
+
}, value);
|
|
34692
|
+
}
|
|
34693
|
+
function ValueTransformer({ transformers, children }) {
|
|
34694
|
+
const formContext = useFormContext();
|
|
34695
|
+
const setValue = formContext == null ? void 0 : formContext.setValue;
|
|
34696
|
+
useEffect(() => {
|
|
34697
|
+
var _a2, _b2;
|
|
34698
|
+
const value = children.props.value;
|
|
34699
|
+
const transformedValue = _applyTransformers(transformers, value, "all");
|
|
34700
|
+
if (!deepEqual$1(transformedValue, value)) {
|
|
34701
|
+
if (typeof setValue === "function") {
|
|
34702
|
+
setValue == null ? void 0 : setValue(children.props.name, transformedValue);
|
|
34703
|
+
} else {
|
|
34704
|
+
(_b2 = (_a2 = children.props).onChange) == null ? void 0 : _b2.call(_a2, {
|
|
34705
|
+
target: { value: transformedValue }
|
|
34706
|
+
});
|
|
34707
|
+
}
|
|
34708
|
+
}
|
|
34709
|
+
}, [transformers]);
|
|
34710
|
+
return React__default.cloneElement(children, {
|
|
34711
|
+
...children.props,
|
|
34712
|
+
onChange: (event) => {
|
|
34713
|
+
var _a2, _b2;
|
|
34714
|
+
const transformedValue = _applyTransformers(transformers, event.target.value, "change");
|
|
34715
|
+
if (transformedValue !== event.target.value) {
|
|
34716
|
+
setValue == null ? void 0 : setValue(children.props.name, transformedValue);
|
|
34717
|
+
setNativeValue(event.target, transformedValue);
|
|
34718
|
+
}
|
|
34719
|
+
(_b2 = (_a2 = children.props).onChange) == null ? void 0 : _b2.call(_a2, event);
|
|
34720
|
+
},
|
|
34721
|
+
// apply transformers on blur
|
|
34722
|
+
onBlur: (event) => {
|
|
34723
|
+
var _a2, _b2;
|
|
34724
|
+
(_b2 = (_a2 = children.props).onBlur) == null ? void 0 : _b2.call(_a2, event);
|
|
34725
|
+
const target = event.target;
|
|
34726
|
+
const transformedValue = _applyTransformers(transformers, target.value, "blur");
|
|
34727
|
+
if (!deepEqual$1(transformedValue, target.value)) {
|
|
34728
|
+
setNativeValue(target, transformedValue);
|
|
34729
|
+
const changeEvent = new Event("change", { bubbles: true });
|
|
34730
|
+
target.dispatchEvent(changeEvent);
|
|
34731
|
+
}
|
|
34732
|
+
},
|
|
34733
|
+
onKeyDown: (event) => {
|
|
34734
|
+
var _a2, _b2;
|
|
34735
|
+
(_b2 = (_a2 = children.props).onKeyDown) == null ? void 0 : _b2.call(_a2, event);
|
|
34736
|
+
if (event.key === "Enter") {
|
|
34737
|
+
const target = event.target;
|
|
34738
|
+
const transformedValue = _applyTransformers(transformers, target.value, "keyDown");
|
|
34739
|
+
if (!deepEqual$1(transformedValue, target.value)) {
|
|
34740
|
+
setNativeValue(target, transformedValue);
|
|
34741
|
+
const changeEvent = new Event("change", { bubbles: true });
|
|
34742
|
+
target.dispatchEvent(changeEvent);
|
|
34743
|
+
}
|
|
34744
|
+
}
|
|
34745
|
+
}
|
|
34746
|
+
});
|
|
34747
|
+
}
|
|
34748
|
+
const sharedValueTransformers = {
|
|
34749
|
+
trimOnBlur: (ifParam = true) => ({
|
|
34750
|
+
transformer: (value) => value == null ? void 0 : value.trim(),
|
|
34751
|
+
options: {
|
|
34752
|
+
trigger: "blur",
|
|
34753
|
+
if: ifParam
|
|
34754
|
+
}
|
|
34755
|
+
}),
|
|
34756
|
+
lowercaseOnChange: (ifParam = true) => ({
|
|
34757
|
+
transformer: (value) => value == null ? void 0 : value.toLowerCase(),
|
|
34758
|
+
options: {
|
|
34759
|
+
trigger: "change",
|
|
34760
|
+
if: ifParam
|
|
34761
|
+
}
|
|
34762
|
+
}),
|
|
34763
|
+
uppercaseOnChange: (ifParam = true) => ({
|
|
34764
|
+
transformer: (value) => value == null ? void 0 : value.toUpperCase(),
|
|
34765
|
+
options: {
|
|
34766
|
+
trigger: "change",
|
|
34767
|
+
if: ifParam
|
|
34768
|
+
}
|
|
34769
|
+
}),
|
|
34770
|
+
trimOnEnter: (ifParam = true) => ({
|
|
34771
|
+
transformer: (value) => value == null ? void 0 : value.trim(),
|
|
34772
|
+
options: {
|
|
34773
|
+
trigger: "keyDown",
|
|
34774
|
+
if: ifParam
|
|
34775
|
+
}
|
|
34776
|
+
})
|
|
34777
|
+
};
|
|
34573
34778
|
const withFieldValidation = (Component2, options2) => {
|
|
34574
34779
|
return React__default.forwardRef(({ value, name, showErrorOnBlur, showErrorOnChange, validators: customValidators, ...props }, ref) => {
|
|
34575
34780
|
var _a2;
|
|
@@ -35245,6 +35450,357 @@ const SelectFieldRaw = React__default.forwardRef(({
|
|
|
35245
35450
|
});
|
|
35246
35451
|
const SelectField = withFieldValidation(SelectFieldRaw);
|
|
35247
35452
|
SelectField.displayName = "SelectField";
|
|
35453
|
+
const IdAutocompleteInputContainer = React__default.forwardRef(({ id, name, value, className, isLoading, haveFetchError, disabled, onChange: onChange2, onBlur, onClick, selectedOption, optionsLength, handleOpenChange, onKeyDown, onMouseDown, placeholder, hasError, label, required, isPopoverOpen, maxLength, handlePaste, onPaste, ...props }, ref) => {
|
|
35454
|
+
const [hasCopied, setHasCopied] = useState(false);
|
|
35455
|
+
const hasHover = useMediaQuery("(hover: hover) and (pointer: fine)");
|
|
35456
|
+
const transformers = useMemo(() => [
|
|
35457
|
+
sharedValueTransformers.trimOnBlur(),
|
|
35458
|
+
sharedValueTransformers.trimOnEnter()
|
|
35459
|
+
], []);
|
|
35460
|
+
return jsxs("div", { className: cn("group relative"), children: [jsx$1(ValueTransformer, { transformers, children: jsx$1(_e.Input, { asChild: true, children: jsx$1(Input, { id, name, value, className: cn("pr-9", className), disabled, onChange: onChange2, onBlur, onClick: (e2) => {
|
|
35461
|
+
const input = e2.target;
|
|
35462
|
+
if (!(isLoading || haveFetchError) && !selectedOption && input.value !== "") {
|
|
35463
|
+
handleOpenChange == null ? void 0 : handleOpenChange(true);
|
|
35464
|
+
}
|
|
35465
|
+
onClick == null ? void 0 : onClick(e2);
|
|
35466
|
+
}, onKeyDown: (e2) => {
|
|
35467
|
+
onKeyDown == null ? void 0 : onKeyDown(e2);
|
|
35468
|
+
const isOptionsRelatedKey = [
|
|
35469
|
+
"ArrowUp",
|
|
35470
|
+
"ArrowDown",
|
|
35471
|
+
"Enter"
|
|
35472
|
+
].includes(e2.key);
|
|
35473
|
+
if (e2.key === "Enter" && isPopoverOpen && optionsLength === 0) {
|
|
35474
|
+
handleOpenChange == null ? void 0 : handleOpenChange(false);
|
|
35475
|
+
e2.preventDefault();
|
|
35476
|
+
return;
|
|
35477
|
+
}
|
|
35478
|
+
if (!(isOptionsRelatedKey && isPopoverOpen && optionsLength > 0)) {
|
|
35479
|
+
e2.stopPropagation();
|
|
35480
|
+
}
|
|
35481
|
+
}, onMouseDown: (e2) => {
|
|
35482
|
+
const input = e2.target;
|
|
35483
|
+
if (!input.contains(document.activeElement)) {
|
|
35484
|
+
requestAnimationFrame(() => {
|
|
35485
|
+
input.select();
|
|
35486
|
+
});
|
|
35487
|
+
}
|
|
35488
|
+
onMouseDown == null ? void 0 : onMouseDown(e2);
|
|
35489
|
+
}, onPaste: (e2) => {
|
|
35490
|
+
handlePaste == null ? void 0 : handlePaste(e2);
|
|
35491
|
+
onPaste == null ? void 0 : onPaste(e2);
|
|
35492
|
+
}, placeholder, "aria-invalid": hasError, "aria-label": !label ? "Id Autocomplete" : void 0, "aria-required": required, "aria-expanded": isPopoverOpen, maxLength, ...props, ref }) }) }), jsxs("div", { className: cn("absolute right-3 top-1/2 flex size-4 -translate-y-1/2 items-center", !isLoading && !haveFetchError && !selectedOption && "pointer-events-none"), children: [isLoading && jsx$1(Icon, { name: "Reload", size: 16, className: cn("animate-spin text-gray-500 dark:text-gray-600") }), haveFetchError && jsx$1(Provider$1, { children: jsx$1(Tooltip, { content: "Network error!", children: jsx$1(Icon, { name: "Error", size: 16, className: cn("text-red-900") }) }) }), selectedOption && !isLoading && !haveFetchError && jsx$1(Provider$1, { children: jsx$1(Tooltip, { content: "Copied!", open: hasCopied, triggerAsChild: true, children: jsx$1("button", { type: "button", onClick: () => {
|
|
35493
|
+
navigator.clipboard.writeText(selectedOption.value).then(() => {
|
|
35494
|
+
setHasCopied(true);
|
|
35495
|
+
setTimeout(() => setHasCopied(false), 2e3);
|
|
35496
|
+
}).catch((error) => {
|
|
35497
|
+
console.error("Failed to copy value: ", error);
|
|
35498
|
+
});
|
|
35499
|
+
}, className: cn("focus-visible:outline-none [&_svg]:pointer-events-none", hasHover && "opacity-0 transition-opacity duration-500 group-hover:opacity-100"), children: jsx$1(Icon, { name: "Copy", size: 16, className: cn("text-gray-500 dark:text-gray-600") }) }) }) })] })] });
|
|
35500
|
+
});
|
|
35501
|
+
const IdAutocompleteList = ({ variant, commandListRef, selectedValue, options: options2 = [], toggleOption, renderOption, previewPlaceholder }) => {
|
|
35502
|
+
const cmdkSearch = P$1((state) => state.search);
|
|
35503
|
+
const defaultOption = previewPlaceholder || {
|
|
35504
|
+
value: "value not available",
|
|
35505
|
+
title: "Title not available",
|
|
35506
|
+
path: "Path not available",
|
|
35507
|
+
description: "Description not available"
|
|
35508
|
+
};
|
|
35509
|
+
useEffect(() => {
|
|
35510
|
+
var _a2;
|
|
35511
|
+
(_a2 = commandListRef == null ? void 0 : commandListRef.current) == null ? void 0 : _a2.scrollTo({ top: 0, behavior: "instant" });
|
|
35512
|
+
}, [commandListRef, cmdkSearch]);
|
|
35513
|
+
return jsxs(CommandList, { ref: commandListRef, children: [jsx$1(CommandEmpty, { className: cn("h-full p-1"), children: renderOption ? renderOption(defaultOption, {
|
|
35514
|
+
asPlaceholder: true,
|
|
35515
|
+
showValue: true,
|
|
35516
|
+
className: cn("pb-0")
|
|
35517
|
+
}) : jsx$1(IdAutocompleteListOption, { variant, icon: defaultOption.icon, title: defaultOption.title, path: defaultOption.path, value: defaultOption.value, description: defaultOption.description, asPlaceholder: true, className: cn("pb-0") }) }), jsx$1(CommandGroup, { className: cn("px-1"), children: options2.map((opt) => {
|
|
35518
|
+
const isSelected = selectedValue === opt.value;
|
|
35519
|
+
return jsx$1(CommandItem, { value: opt.value, onSelect: () => toggleOption == null ? void 0 : toggleOption(opt.value), className: cn("h-full cursor-pointer border-y-0 p-0", "data-[selected=true]:bg-gray-100 dark:data-[selected=true]:bg-gray-900"), role: "option", "aria-selected": isSelected, children: renderOption ? renderOption(opt, {
|
|
35520
|
+
asPlaceholder: false,
|
|
35521
|
+
showValue: true
|
|
35522
|
+
}) : jsx$1(IdAutocompleteListOption, { variant, ...opt }) }, opt.value);
|
|
35523
|
+
}) })] });
|
|
35524
|
+
};
|
|
35525
|
+
function useIdAutocomplete({ autoComplete, defaultValue, value, isOpenByDefault, initialOptions, onChange: onChange2, onBlur, fetchOptions, fetchSelectedOption }) {
|
|
35526
|
+
const context = useIdAutocompleteContext();
|
|
35527
|
+
const shouldFetchOptions = useRef(false);
|
|
35528
|
+
const isInternalChange = useRef(false);
|
|
35529
|
+
const commandListRef = useRef(null);
|
|
35530
|
+
const [isPopoverOpen, setIsPopoverOpen] = useState(isOpenByDefault ?? false);
|
|
35531
|
+
const [options2, setOptions] = useState(initialOptions ?? []);
|
|
35532
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
35533
|
+
const [isLoadingSelectedOption, setIsLoadingSelectedOption] = useState(false);
|
|
35534
|
+
const [haveFetchError, setHaveFetchError] = useState(false);
|
|
35535
|
+
const [selectedValue, setSelectedValue] = useState(value ?? defaultValue ?? "");
|
|
35536
|
+
const [selectedOption, setSelectedOption] = useState(void 0);
|
|
35537
|
+
const [commandValue, setCommandValue] = useState("");
|
|
35538
|
+
const [isFetchSelectedOptionSync, setIsFetchSelectedOptionSync] = useState(false);
|
|
35539
|
+
const clear = useCallback(() => {
|
|
35540
|
+
setHaveFetchError(false);
|
|
35541
|
+
setIsLoading(false);
|
|
35542
|
+
setIsLoadingSelectedOption(false);
|
|
35543
|
+
setIsPopoverOpen(false);
|
|
35544
|
+
}, []);
|
|
35545
|
+
const debouncedFetchOptions = useDebounceCallback(useCallback((newValue) => {
|
|
35546
|
+
if (!autoComplete || !fetchOptions)
|
|
35547
|
+
return;
|
|
35548
|
+
if (newValue === "") {
|
|
35549
|
+
clear();
|
|
35550
|
+
setOptions([]);
|
|
35551
|
+
setSelectedValue("");
|
|
35552
|
+
setSelectedOption(void 0);
|
|
35553
|
+
return;
|
|
35554
|
+
}
|
|
35555
|
+
setHaveFetchError(false);
|
|
35556
|
+
setIsLoading(true);
|
|
35557
|
+
try {
|
|
35558
|
+
const result = fetchOptions(newValue, context);
|
|
35559
|
+
Promise.resolve(result).then((newOptions) => {
|
|
35560
|
+
setOptions(newOptions);
|
|
35561
|
+
const matchingOption = newOptions.find((opt) => opt.value === newValue);
|
|
35562
|
+
if (matchingOption) {
|
|
35563
|
+
setSelectedOption(matchingOption);
|
|
35564
|
+
setIsPopoverOpen(false);
|
|
35565
|
+
} else {
|
|
35566
|
+
setSelectedOption(void 0);
|
|
35567
|
+
setIsPopoverOpen(true);
|
|
35568
|
+
}
|
|
35569
|
+
setIsLoading(false);
|
|
35570
|
+
}).catch(() => {
|
|
35571
|
+
setHaveFetchError(true);
|
|
35572
|
+
setIsLoading(false);
|
|
35573
|
+
});
|
|
35574
|
+
} catch {
|
|
35575
|
+
setHaveFetchError(true);
|
|
35576
|
+
setIsLoading(false);
|
|
35577
|
+
}
|
|
35578
|
+
}, [clear, autoComplete, fetchOptions, context]));
|
|
35579
|
+
const handleFetchSelectedOption = useCallback((value2) => {
|
|
35580
|
+
if (!autoComplete || !fetchSelectedOption)
|
|
35581
|
+
return;
|
|
35582
|
+
setIsLoadingSelectedOption(true);
|
|
35583
|
+
try {
|
|
35584
|
+
const result = fetchSelectedOption(value2);
|
|
35585
|
+
const isPromise2 = result instanceof Promise;
|
|
35586
|
+
Promise.resolve(result).then((option) => {
|
|
35587
|
+
if (option) {
|
|
35588
|
+
setSelectedOption(option);
|
|
35589
|
+
setOptions((prevOptions) => {
|
|
35590
|
+
const optionIndex = prevOptions.findIndex((opt) => opt.value === value2);
|
|
35591
|
+
if (optionIndex !== -1) {
|
|
35592
|
+
const newOptions = [...prevOptions];
|
|
35593
|
+
newOptions[optionIndex] = option;
|
|
35594
|
+
return newOptions;
|
|
35595
|
+
}
|
|
35596
|
+
return prevOptions;
|
|
35597
|
+
});
|
|
35598
|
+
} else {
|
|
35599
|
+
clear();
|
|
35600
|
+
setOptions([]);
|
|
35601
|
+
setSelectedValue("");
|
|
35602
|
+
setSelectedOption(void 0);
|
|
35603
|
+
}
|
|
35604
|
+
setIsLoadingSelectedOption(false);
|
|
35605
|
+
if (!isPromise2) {
|
|
35606
|
+
setIsFetchSelectedOptionSync(true);
|
|
35607
|
+
setTimeout(() => {
|
|
35608
|
+
setIsFetchSelectedOptionSync(false);
|
|
35609
|
+
}, 1500);
|
|
35610
|
+
}
|
|
35611
|
+
}).catch(() => {
|
|
35612
|
+
setIsLoadingSelectedOption(false);
|
|
35613
|
+
});
|
|
35614
|
+
} catch {
|
|
35615
|
+
setIsLoadingSelectedOption(false);
|
|
35616
|
+
}
|
|
35617
|
+
}, [clear, autoComplete, fetchSelectedOption]);
|
|
35618
|
+
const handleOpenChange = useCallback((open) => {
|
|
35619
|
+
var _a2;
|
|
35620
|
+
if (!open) {
|
|
35621
|
+
setCommandValue(((_a2 = options2[0]) == null ? void 0 : _a2.value) ?? "");
|
|
35622
|
+
}
|
|
35623
|
+
setIsPopoverOpen(open);
|
|
35624
|
+
}, [options2]);
|
|
35625
|
+
const toggleOption = useCallback((optionValue) => {
|
|
35626
|
+
shouldFetchOptions.current = false;
|
|
35627
|
+
isInternalChange.current = true;
|
|
35628
|
+
setSelectedValue(optionValue);
|
|
35629
|
+
setSelectedOption(options2.find((opt) => opt.value === optionValue));
|
|
35630
|
+
clear();
|
|
35631
|
+
onChange2 == null ? void 0 : onChange2(optionValue);
|
|
35632
|
+
}, [onChange2, clear, options2]);
|
|
35633
|
+
const handleChange = useCallback((e2) => {
|
|
35634
|
+
const newValue = e2.target.value;
|
|
35635
|
+
shouldFetchOptions.current = true;
|
|
35636
|
+
setSelectedValue(newValue);
|
|
35637
|
+
setSelectedOption(void 0);
|
|
35638
|
+
onChange2 == null ? void 0 : onChange2(newValue);
|
|
35639
|
+
}, [onChange2]);
|
|
35640
|
+
const handleCommandValue = useCallback((value2) => {
|
|
35641
|
+
setCommandValue(value2);
|
|
35642
|
+
}, []);
|
|
35643
|
+
const onTriggerBlur = useCallback((e2) => {
|
|
35644
|
+
if (!isPopoverOpen) {
|
|
35645
|
+
onBlur == null ? void 0 : onBlur(e2);
|
|
35646
|
+
}
|
|
35647
|
+
}, [onBlur, isPopoverOpen]);
|
|
35648
|
+
const handlePaste = useCallback((e2) => {
|
|
35649
|
+
const clipboardData = e2.clipboardData.getData("text");
|
|
35650
|
+
const trimmedValue = clipboardData.trim();
|
|
35651
|
+
if (clipboardData !== trimmedValue) {
|
|
35652
|
+
e2.preventDefault();
|
|
35653
|
+
const input = e2.currentTarget;
|
|
35654
|
+
const start = input.selectionStart || 0;
|
|
35655
|
+
const end = input.selectionEnd || 0;
|
|
35656
|
+
const currentValue = input.value;
|
|
35657
|
+
const newValue = currentValue.substring(0, start) + trimmedValue + currentValue.substring(end);
|
|
35658
|
+
onChange2 == null ? void 0 : onChange2(newValue);
|
|
35659
|
+
requestAnimationFrame(() => {
|
|
35660
|
+
const newPosition = start + trimmedValue.length;
|
|
35661
|
+
input.setSelectionRange(newPosition, newPosition);
|
|
35662
|
+
debouncedFetchOptions(newValue);
|
|
35663
|
+
});
|
|
35664
|
+
} else if (clipboardData === selectedValue) {
|
|
35665
|
+
debouncedFetchOptions(selectedValue);
|
|
35666
|
+
}
|
|
35667
|
+
}, [selectedValue, debouncedFetchOptions, onChange2]);
|
|
35668
|
+
useEffect(() => {
|
|
35669
|
+
if (autoComplete) {
|
|
35670
|
+
if (shouldFetchOptions.current) {
|
|
35671
|
+
debouncedFetchOptions(selectedValue);
|
|
35672
|
+
}
|
|
35673
|
+
} else {
|
|
35674
|
+
clear();
|
|
35675
|
+
setOptions([]);
|
|
35676
|
+
setSelectedValue("");
|
|
35677
|
+
setSelectedOption(void 0);
|
|
35678
|
+
}
|
|
35679
|
+
}, [autoComplete, selectedValue, debouncedFetchOptions, clear]);
|
|
35680
|
+
useEffect(() => {
|
|
35681
|
+
if (!isInternalChange.current) {
|
|
35682
|
+
shouldFetchOptions.current = false;
|
|
35683
|
+
setSelectedValue(value ?? "");
|
|
35684
|
+
setSelectedOption(void 0);
|
|
35685
|
+
}
|
|
35686
|
+
isInternalChange.current = false;
|
|
35687
|
+
}, [value]);
|
|
35688
|
+
useEffect(() => {
|
|
35689
|
+
if ((initialOptions == null ? void 0 : initialOptions.length) && selectedValue) {
|
|
35690
|
+
const matchingOption = initialOptions.find((opt) => opt.value === selectedValue);
|
|
35691
|
+
if (matchingOption) {
|
|
35692
|
+
setSelectedOption(matchingOption);
|
|
35693
|
+
}
|
|
35694
|
+
}
|
|
35695
|
+
}, []);
|
|
35696
|
+
return {
|
|
35697
|
+
selectedValue,
|
|
35698
|
+
selectedOption,
|
|
35699
|
+
isPopoverOpen,
|
|
35700
|
+
commandListRef,
|
|
35701
|
+
options: options2,
|
|
35702
|
+
isLoading,
|
|
35703
|
+
isLoadingSelectedOption,
|
|
35704
|
+
haveFetchError,
|
|
35705
|
+
commandValue,
|
|
35706
|
+
isFetchSelectedOptionSync,
|
|
35707
|
+
toggleOption,
|
|
35708
|
+
handleOpenChange,
|
|
35709
|
+
onTriggerBlur,
|
|
35710
|
+
handleChange,
|
|
35711
|
+
handleCommandValue,
|
|
35712
|
+
handleFetchSelectedOption,
|
|
35713
|
+
handlePaste
|
|
35714
|
+
};
|
|
35715
|
+
}
|
|
35716
|
+
const IdAutocomplete = React__default.forwardRef(({
|
|
35717
|
+
id: idProp,
|
|
35718
|
+
name,
|
|
35719
|
+
className,
|
|
35720
|
+
label,
|
|
35721
|
+
description,
|
|
35722
|
+
value,
|
|
35723
|
+
defaultValue,
|
|
35724
|
+
disabled,
|
|
35725
|
+
placeholder,
|
|
35726
|
+
required,
|
|
35727
|
+
errors,
|
|
35728
|
+
warnings,
|
|
35729
|
+
onChange: onChange2,
|
|
35730
|
+
onBlur,
|
|
35731
|
+
onClick,
|
|
35732
|
+
onKeyDown,
|
|
35733
|
+
onMouseDown,
|
|
35734
|
+
autoComplete = true,
|
|
35735
|
+
variant = "withValue",
|
|
35736
|
+
maxLength,
|
|
35737
|
+
fetchOptionsCallback,
|
|
35738
|
+
fetchSelectedOptionCallback,
|
|
35739
|
+
isOpenByDefault,
|
|
35740
|
+
// to be used only in stories
|
|
35741
|
+
initialOptions,
|
|
35742
|
+
// to be used only in stories
|
|
35743
|
+
renderOption,
|
|
35744
|
+
previewPlaceholder,
|
|
35745
|
+
...props
|
|
35746
|
+
}, ref) => {
|
|
35747
|
+
const prefix2 = useId$1();
|
|
35748
|
+
const id = idProp ?? `${prefix2}-id-autocomplete`;
|
|
35749
|
+
const inputRef = useRef(null);
|
|
35750
|
+
const mergedRef = (node2) => {
|
|
35751
|
+
inputRef.current = node2;
|
|
35752
|
+
if (typeof ref === "function") {
|
|
35753
|
+
ref(node2);
|
|
35754
|
+
} else if (ref) {
|
|
35755
|
+
ref.current = node2;
|
|
35756
|
+
}
|
|
35757
|
+
};
|
|
35758
|
+
const hasWarning = Array.isArray(warnings) && warnings.length > 0;
|
|
35759
|
+
const hasError = Array.isArray(errors) && errors.length > 0;
|
|
35760
|
+
const { selectedValue, selectedOption, isPopoverOpen, commandListRef, options: options2, isLoading, isLoadingSelectedOption, haveFetchError, commandValue, isFetchSelectedOptionSync, toggleOption, handleOpenChange, onTriggerBlur, handleChange, handleCommandValue, handleFetchSelectedOption, handlePaste } = useIdAutocomplete({
|
|
35761
|
+
autoComplete,
|
|
35762
|
+
defaultValue,
|
|
35763
|
+
value,
|
|
35764
|
+
isOpenByDefault,
|
|
35765
|
+
initialOptions,
|
|
35766
|
+
onChange: onChange2,
|
|
35767
|
+
onBlur,
|
|
35768
|
+
fetchOptions: fetchOptionsCallback,
|
|
35769
|
+
fetchSelectedOption: fetchSelectedOptionCallback
|
|
35770
|
+
});
|
|
35771
|
+
const handleOptionSelection = (optionValue) => {
|
|
35772
|
+
var _a2;
|
|
35773
|
+
toggleOption(optionValue);
|
|
35774
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
35775
|
+
};
|
|
35776
|
+
const asCard = variant === "withValueAndTitle" || variant === "withValueTitleAndDescription";
|
|
35777
|
+
const transformers = useMemo(() => [
|
|
35778
|
+
sharedValueTransformers.trimOnBlur(),
|
|
35779
|
+
sharedValueTransformers.trimOnEnter()
|
|
35780
|
+
], []);
|
|
35781
|
+
return jsxs(FormGroup, { children: [!!label && jsx$1(FormLabel, { htmlFor: id, disabled, hasError, required, onClick: (e2) => {
|
|
35782
|
+
var _a2;
|
|
35783
|
+
e2.preventDefault();
|
|
35784
|
+
(_a2 = e2.target.control) == null ? void 0 : _a2.focus();
|
|
35785
|
+
}, children: label }), autoComplete && fetchOptionsCallback ? jsx$1(Popover, { open: isPopoverOpen, onOpenChange: handleOpenChange, children: jsxs(Command, { shouldFilter: false, value: commandValue, onValueChange: handleCommandValue, className: cn("dark:bg-charcoal-900 bg-gray-100"), children: [jsx$1(PopoverAnchor, { asChild: true, children: jsx$1(IdAutocompleteInputContainer, { id, name, value: selectedValue, className, isLoading, haveFetchError, disabled, onChange: handleChange, onBlur: onTriggerBlur, onClick, selectedOption, optionsLength: options2.length, handleOpenChange, onKeyDown, onMouseDown, placeholder, hasError, label, required, isPopoverOpen, maxLength, handlePaste, ...props, ref: mergedRef }) }), asCard && (renderOption ? renderOption(selectedOption === void 0 && previewPlaceholder ? {
|
|
35786
|
+
...previewPlaceholder
|
|
35787
|
+
} : {
|
|
35788
|
+
...selectedOption,
|
|
35789
|
+
value: (selectedOption == null ? void 0 : selectedOption.value) ?? ""
|
|
35790
|
+
}, {
|
|
35791
|
+
asPlaceholder: selectedOption === void 0,
|
|
35792
|
+
showValue: false,
|
|
35793
|
+
isLoadingSelectedOption,
|
|
35794
|
+
handleFetchSelectedOption: fetchSelectedOptionCallback ? handleFetchSelectedOption : void 0,
|
|
35795
|
+
isFetchSelectedOptionSync,
|
|
35796
|
+
className: cn("rounded-t-none pt-2")
|
|
35797
|
+
}) : jsx$1(IdAutocompleteListOption, { variant, icon: (selectedOption == null ? void 0 : selectedOption.icon) ?? (previewPlaceholder == null ? void 0 : previewPlaceholder.icon), title: (selectedOption == null ? void 0 : selectedOption.title) ?? (previewPlaceholder == null ? void 0 : previewPlaceholder.title), path: (selectedOption == null ? void 0 : selectedOption.path) ?? (previewPlaceholder == null ? void 0 : previewPlaceholder.path), value: (selectedOption == null ? void 0 : selectedOption.value) ?? (previewPlaceholder == null ? void 0 : previewPlaceholder.value) ?? "", description: (selectedOption == null ? void 0 : selectedOption.description) ?? (previewPlaceholder == null ? void 0 : previewPlaceholder.description), asPlaceholder: selectedOption === void 0, showValue: false, isLoadingSelectedOption, handleFetchSelectedOption: fetchSelectedOptionCallback ? handleFetchSelectedOption : void 0, isFetchSelectedOptionSync, className: cn("rounded-t-none pt-2") })), jsx$1(PopoverContent, { align: "start", onOpenAutoFocus: (e2) => e2.preventDefault(), onInteractOutside: (e2) => {
|
|
35798
|
+
if (e2.target instanceof Element && e2.target.id === id) {
|
|
35799
|
+
e2.preventDefault();
|
|
35800
|
+
}
|
|
35801
|
+
}, children: jsx$1(IdAutocompleteList, { variant, commandListRef, selectedValue, options: options2, toggleOption: handleOptionSelection, renderOption, previewPlaceholder }) })] }) }) : jsx$1(ValueTransformer, { transformers, children: jsx$1(Input, { id, name, value: selectedValue, className, disabled, onChange: handleChange, onBlur, onClick, onMouseDown, placeholder, "aria-invalid": hasError, "aria-label": !label ? "Id Autocomplete" : void 0, "aria-required": required, maxLength, ...props, ref: mergedRef }) }), !!description && jsx$1(FormDescription, { children: description }), hasWarning && jsx$1(FormMessageList, { messages: warnings, type: "warning" }), hasError && jsx$1(FormMessageList, { messages: errors, type: "error" })] });
|
|
35802
|
+
});
|
|
35803
|
+
IdAutocomplete.displayName = "IdAutocomplete";
|
|
35248
35804
|
function DangerZone$1(props) {
|
|
35249
35805
|
const { className, ...rest } = props;
|
|
35250
35806
|
return jsxs("div", { className: cn("h-full rounded-lg bg-white p-3", className), children: [jsx$1("h2", { className: "mb-4 font-semibold", children: "Modify Drives" }), jsx$1(ModifyDrives, { ...rest }), jsx$1("h2", { className: "my-4 font-semibold", children: "Local Storage" }), jsx$1(LocalStorage, { ...rest })] });
|
|
@@ -35301,8 +35857,17 @@ function DefaultEditorSelect(props) {
|
|
|
35301
35857
|
const { documentModelEditor, setDocumentModelEditor, documentModelEditorOptions: documentModelEditorOptions2, className } = props;
|
|
35302
35858
|
return jsxs("div", { children: [jsx$1("h3", { className: "mb-4 font-semibold text-gray-900", children: "Default Editor Selection" }), jsx$1(SelectFieldRaw, { className: twMerge("min-w-36 max-w-fit", className), name: "default-editor", required: true, value: documentModelEditor, options: documentModelEditorOptions2, multiple: false, onChange: (value) => setDocumentModelEditor(value) })] });
|
|
35303
35859
|
}
|
|
35860
|
+
const ProviderIconMap = {
|
|
35861
|
+
npm: { icon: "Npm" },
|
|
35862
|
+
github: { icon: "Github", size: 28 },
|
|
35863
|
+
local: { icon: "Hdd" }
|
|
35864
|
+
};
|
|
35865
|
+
const PackageItem = ({ packageName, provider }) => {
|
|
35866
|
+
const icon = provider && ProviderIconMap[provider];
|
|
35867
|
+
return jsxs("div", { className: "flex w-full items-center justify-between px-2 py-1", children: [jsx$1("p", { className: "font-medium", children: packageName }), icon && jsx$1(Icon, { name: icon.icon, size: icon.size })] });
|
|
35868
|
+
};
|
|
35304
35869
|
const PackageManagerInput = (props) => {
|
|
35305
|
-
const { onInstall, className } = props;
|
|
35870
|
+
const { onInstall, packageOptions, className } = props;
|
|
35306
35871
|
const [value, setValue] = useState("");
|
|
35307
35872
|
const [loading, setLoading] = useState(false);
|
|
35308
35873
|
const [error, setError] = useState();
|
|
@@ -35320,7 +35885,27 @@ const PackageManagerInput = (props) => {
|
|
|
35320
35885
|
setValue(e2.target.value);
|
|
35321
35886
|
}, []);
|
|
35322
35887
|
const errorMessage = !error ? " " : typeof error === "string" ? error : error instanceof Error ? error.message : error;
|
|
35323
|
-
|
|
35888
|
+
const autoCompleteOptions = useMemo(() => {
|
|
35889
|
+
const initialOptions = packageOptions == null ? void 0 : packageOptions.map((option) => ({
|
|
35890
|
+
...option,
|
|
35891
|
+
value: option.packageName
|
|
35892
|
+
}));
|
|
35893
|
+
return !(packageOptions == null ? void 0 : packageOptions.length) ? {
|
|
35894
|
+
autoComplete: false
|
|
35895
|
+
} : {
|
|
35896
|
+
autoComplete: true,
|
|
35897
|
+
initialOptions,
|
|
35898
|
+
fetchOptionsCallback: (userInput) => (initialOptions == null ? void 0 : initialOptions.filter((o) => o.packageName.toLowerCase().includes(userInput.toLowerCase()))) ?? [],
|
|
35899
|
+
renderOption: (option) => (
|
|
35900
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
35901
|
+
jsx$1(PackageItem, { ...option })
|
|
35902
|
+
)
|
|
35903
|
+
};
|
|
35904
|
+
}, [packageOptions]);
|
|
35905
|
+
return jsxs("div", { className, children: [jsx$1("h3", { className: "mb-4 font-semibold text-gray-900", children: "Install Package" }), jsxs("div", { className: "flex items-center gap-4", children: [!(packageOptions == null ? void 0 : packageOptions.length) ? jsx$1(Input, { name: "package", className: "max-w-xs text-gray-700", value, onChange: handleChange, onSubmit: handleSubmit, disabled: loading }) : (
|
|
35906
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
35907
|
+
jsx$1(IdAutocomplete, { ...autoCompleteOptions, onChange: setValue })
|
|
35908
|
+
), jsx$1(Button$1, { className: "h-9 rounded-md text-sm", onClick: handleSubmit, disabled: loading, children: "Install" })] }), jsx$1("p", { className: "mb-3 ml-2 h-3 text-sm text-red-800", children: errorMessage })] });
|
|
35324
35909
|
};
|
|
35325
35910
|
const PackageDetail = ({ label, value }) => {
|
|
35326
35911
|
return jsxs("div", { className: "flex items-start gap-2 text-sm", children: [jsxs("p", { className: "text-gray-600", children: [label, ":"] }), jsx$1("p", { className: "text-gray-600", children: value })] });
|
|
@@ -35359,8 +35944,9 @@ const PackageManagerReactorSelect = (props) => {
|
|
|
35359
35944
|
return jsxs("div", { ...rest, children: [jsx$1("h3", { className: "mb-4 font-semibold text-gray-900", children: "Select Reactor" }), jsx$1(SelectFieldRaw, { className: "min-w-36 max-w-fit", name: "reactor", required: true, value: reactor, options: reactorOptions, multiple: false, onChange: handleChange })] });
|
|
35360
35945
|
};
|
|
35361
35946
|
const PackageManager$1 = (props) => {
|
|
35362
|
-
const { className, reactorOptions, reactor, onReactorChange, onInstall, packages, onUninstall, mutable, ...rest } = props;
|
|
35363
|
-
|
|
35947
|
+
const { className, reactorOptions, reactor, onReactorChange, onInstall, packages, onUninstall, mutable, packageOptions, ...rest } = props;
|
|
35948
|
+
const packageOptionsSet = useMemo(() => packageOptions == null ? void 0 : packageOptions.filter((o) => !packages.find((p2) => p2.name === o.packageName)), [packages, packageOptions]);
|
|
35949
|
+
return jsxs("div", { ...rest, className: twMerge("flex h-full flex-1 flex-col rounded-lg p-3", className), children: [jsx$1(PackageManagerReactorSelect, { reactor, reactorOptions, onReactorChange, className: "mb-4" }), mutable && jsx$1(PackageManagerInput, { onInstall, packageOptions: packageOptionsSet }), jsx$1(PackageManagerList, { packages, onUninstall, mutable })] });
|
|
35364
35950
|
};
|
|
35365
35951
|
function SettingsModal$1(props) {
|
|
35366
35952
|
var _a2, _b2;
|
|
@@ -53284,6 +53870,9 @@ function observe$1(effect, store = getDefaultStore()) {
|
|
|
53284
53870
|
return unobserve;
|
|
53285
53871
|
}
|
|
53286
53872
|
async function getHMRModule() {
|
|
53873
|
+
if (import.meta.hot) {
|
|
53874
|
+
return import.meta.hot;
|
|
53875
|
+
}
|
|
53287
53876
|
try {
|
|
53288
53877
|
const module = await __vitePreload(() => import("../hmr.js"), true ? [] : void 0);
|
|
53289
53878
|
const hmr = module.hmr;
|
|
@@ -71078,7 +71667,7 @@ const useFilteredDocumentModels = () => {
|
|
|
71078
71667
|
return filteredDocumentModels;
|
|
71079
71668
|
};
|
|
71080
71669
|
async function loadBaseEditors() {
|
|
71081
|
-
const documentModelEditor = await __vitePreload(() => import("./index-
|
|
71670
|
+
const documentModelEditor = await __vitePreload(() => import("./index-Bgqlvf9G.js"), true ? __vite__mapDeps([4,2,1,3]) : void 0);
|
|
71082
71671
|
await __vitePreload(() => Promise.resolve({}), true ? __vite__mapDeps([5]) : void 0);
|
|
71083
71672
|
const module = documentModelEditor.documentModelEditorModule;
|
|
71084
71673
|
return [module];
|
|
@@ -71229,11 +71818,11 @@ const connectCrypto = (async () => {
|
|
|
71229
71818
|
return window.connectCrypto;
|
|
71230
71819
|
}
|
|
71231
71820
|
const { ConnectCrypto } = await __vitePreload(async () => {
|
|
71232
|
-
const { ConnectCrypto: ConnectCrypto2 } = await import("./index-
|
|
71821
|
+
const { ConnectCrypto: ConnectCrypto2 } = await import("./index-Bv216hey.js");
|
|
71233
71822
|
return { ConnectCrypto: ConnectCrypto2 };
|
|
71234
71823
|
}, true ? __vite__mapDeps([6,1,2,3]) : void 0);
|
|
71235
71824
|
const { BrowserKeyStorage } = await __vitePreload(async () => {
|
|
71236
|
-
const { BrowserKeyStorage: BrowserKeyStorage2 } = await import("./index-
|
|
71825
|
+
const { BrowserKeyStorage: BrowserKeyStorage2 } = await import("./index-Bv216hey.js");
|
|
71237
71826
|
return { BrowserKeyStorage: BrowserKeyStorage2 };
|
|
71238
71827
|
}, true ? __vite__mapDeps([6,1,2,3]) : void 0);
|
|
71239
71828
|
const connectCrypto2 = new ConnectCrypto(new BrowserKeyStorage());
|
|
@@ -71282,7 +71871,7 @@ function useRenown() {
|
|
|
71282
71871
|
return;
|
|
71283
71872
|
}
|
|
71284
71873
|
const { initRenownBrowser } = await __vitePreload(async () => {
|
|
71285
|
-
const { initRenownBrowser: initRenownBrowser2 } = await import("./index-
|
|
71874
|
+
const { initRenownBrowser: initRenownBrowser2 } = await import("./index-Bv216hey.js");
|
|
71286
71875
|
return { initRenownBrowser: initRenownBrowser2 };
|
|
71287
71876
|
}, true ? __vite__mapDeps([6,1,2,3]) : void 0);
|
|
71288
71877
|
const renownBrowser = initRenownBrowser(did2);
|
|
@@ -78852,6 +79441,14 @@ const DefaultEditor = () => {
|
|
|
78852
79441
|
}
|
|
78853
79442
|
);
|
|
78854
79443
|
};
|
|
79444
|
+
const PH_PACKAGES = [
|
|
79445
|
+
{
|
|
79446
|
+
packageName: "@sky-ph/atlas",
|
|
79447
|
+
version: "latest",
|
|
79448
|
+
provider: "npm",
|
|
79449
|
+
url: "https://www.npmjs.com/package/@sky-ph/atlas"
|
|
79450
|
+
}
|
|
79451
|
+
];
|
|
78855
79452
|
const LOCAL_REACTOR_VALUE = "local-reactor";
|
|
78856
79453
|
const LOCAL_REACTOR_LABEL = "Local Reactor";
|
|
78857
79454
|
function manifestToDetails(manifest, id, removable) {
|
|
@@ -78958,7 +79555,8 @@ const PackageManager = () => {
|
|
|
78958
79555
|
packages: packagesInfo,
|
|
78959
79556
|
onReactorChange: handleReactorChange,
|
|
78960
79557
|
onInstall: handleInstall,
|
|
78961
|
-
onUninstall: handleUninstall
|
|
79558
|
+
onUninstall: handleUninstall,
|
|
79559
|
+
packageOptions: PH_PACKAGES
|
|
78962
79560
|
}
|
|
78963
79561
|
);
|
|
78964
79562
|
};
|
|
@@ -79603,7 +80201,7 @@ function Home() {
|
|
|
79603
80201
|
/* @__PURE__ */ jsx$1(HomeScreenAddDriveItem, { onClick: onAddDriveClick })
|
|
79604
80202
|
] });
|
|
79605
80203
|
}
|
|
79606
|
-
const Content = React__default.lazy(() => __vitePreload(() => import("./content-
|
|
80204
|
+
const Content = React__default.lazy(() => __vitePreload(() => import("./content-D-7-6JpA.js"), true ? __vite__mapDeps([7,2,1,3]) : void 0));
|
|
79607
80205
|
async function createRouter(routes) {
|
|
79608
80206
|
var _a2;
|
|
79609
80207
|
const isPackaged = await ((_a2 = window.electronAPI) == null ? void 0 : _a2.isPackaged());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-B-OQa5ns.js","assets/main.BonTLytE.js","assets/app-CYjeY4R-.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __typeError = (msg) => {
|
|
4
4
|
throw TypeError(msg);
|
|
@@ -11,7 +11,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
11
11
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
12
12
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
13
13
|
var _tags, _levelString, _errorHandler, _ConsoleLogger_instances, levelValue_get, _getDocumentModelModule, _drives, _ReadModeService_instances, parseGraphQLErrors_fn, fetchDrive_fn, _a, _ServiceWorkerManager_instances, handleServiceWorkerMessage_fn, handleServiceWorker_fn;
|
|
14
|
-
import { _ as __vitePreload } from "./main
|
|
14
|
+
import { _ as __vitePreload } from "./main.BonTLytE.js";
|
|
15
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
import { useState, useEffect, Suspense, lazy } from "react";
|
|
17
17
|
function _mergeNamespaces(n, m) {
|
|
@@ -25251,6 +25251,9 @@ function Modified(props) {
|
|
|
25251
25251
|
function Moved(props) {
|
|
25252
25252
|
return jsxs("svg", { ...props, width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("path", { d: "M7.07143 1.96429C7.07143 2.2207 6.86356 2.42857 6.60714 2.42857H5.21429C3.67578 2.42857 2.42857 3.67578 2.42857 5.21429V10.7857C2.42857 12.3242 3.67578 13.5714 5.21429 13.5714H10.7857C12.3242 13.5714 13.5714 12.3242 13.5714 10.7857V9.39286C13.5714 9.13644 13.7793 8.92857 14.0357 8.92857C14.2921 8.92857 14.5 9.13644 14.5 9.39286V10.7857C14.5 12.8371 12.8371 14.5 10.7857 14.5H5.21429C3.16294 14.5 1.5 12.8371 1.5 10.7857V5.21429C1.5 3.16294 3.16294 1.5 5.21429 1.5H6.60714C6.86356 1.5 7.07143 1.70787 7.07143 1.96429Z", fill: "currentcolor" }), jsx("path", { d: "M14 6.5V2.5C14 2.22386 13.7761 2 13.5 2H9.5", stroke: "currentcolor", strokeLinecap: "round" }), jsx("path", { d: "M7 10L7.28346 9.29136C8.39378 6.51556 10.4269 4.20728 13.0403 2.75539L13.5 2.5", stroke: "currentcolor", strokeLinecap: "round" })] });
|
|
25253
25253
|
}
|
|
25254
|
+
function Npm(props) {
|
|
25255
|
+
return jsx("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 128 128", children: jsx("path", { fill: "#cb3837", d: "M2 38.5h124v43.71H64v7.29H36.44v-7.29H2zm6.89 36.43h13.78V53.07h6.89v21.86h6.89V45.79H8.89zm34.44-29.14v36.42h13.78v-7.28h13.78V45.79zm13.78 7.29H64v14.56h-6.89zm20.67-7.29v29.14h13.78V53.07h6.89v21.86h6.89V53.07h6.89v21.86h6.89V45.79z" }) });
|
|
25256
|
+
}
|
|
25254
25257
|
function PackageManager(props) {
|
|
25255
25258
|
return jsx("svg", { ...props, width: "12", height: "12", viewBox: "0 0 12 12", fill: "currentcolor", children: jsx("path", { d: "M1.22323 -0.00109863C0.549226 -0.00109863 -0.00610352 0.533576 -0.00610352 1.20691V2.79089C-0.00610352 3.46423 0.549226 3.9989 1.22323 3.9989H4.0979C4.7719 3.9989 5.32723 3.46423 5.32723 2.79089V1.20691C5.32723 0.533576 4.7719 -0.00109863 4.0979 -0.00109863H1.22323ZM7.9939 -0.00109863C7.25723 -0.00109863 6.66056 0.595568 6.66056 1.33223V5.33223C6.66056 6.0689 7.25723 6.66557 7.9939 6.66557H10.6606C11.3972 6.66557 11.9939 6.0689 11.9939 5.33223V1.33223C11.9939 0.595568 11.3972 -0.00109863 10.6606 -0.00109863H7.9939ZM1.32723 5.33223C0.590563 5.33223 -0.00610352 5.9289 -0.00610352 6.66557V10.6656C-0.00610352 11.4022 0.590563 11.9989 1.32723 11.9989H3.9939C4.73056 11.9989 5.32723 11.4022 5.32723 10.6656V6.66557C5.32723 5.9289 4.73056 5.33223 3.9939 5.33223H1.32723ZM7.88989 7.9989C7.21589 7.9989 6.66056 8.53358 6.66056 9.20691V10.7909C6.66056 11.4642 7.21589 11.9989 7.88989 11.9989H10.7646C11.4386 11.9989 11.9939 11.4642 11.9939 10.7909V9.20691C11.9939 8.53358 11.4386 7.9989 10.7646 7.9989H7.88989Z" }) });
|
|
25256
25259
|
}
|
|
@@ -25439,6 +25442,7 @@ const iconComponents = {
|
|
|
25439
25442
|
M,
|
|
25440
25443
|
Modified,
|
|
25441
25444
|
Moved,
|
|
25445
|
+
Npm,
|
|
25442
25446
|
PackageManager,
|
|
25443
25447
|
Pencil,
|
|
25444
25448
|
PeopleFill,
|
|
@@ -25616,7 +25620,7 @@ const nodeOptionsMap = {
|
|
|
25616
25620
|
};
|
|
25617
25621
|
const name = "@powerhousedao/connect";
|
|
25618
25622
|
const productName = "Powerhouse-Connect";
|
|
25619
|
-
const version$1 = "1.0.
|
|
25623
|
+
const version$1 = "1.0.2-dev.0";
|
|
25620
25624
|
const description = "Powerhouse Connect";
|
|
25621
25625
|
const main = "./dist/index.html";
|
|
25622
25626
|
const type = "module";
|
|
@@ -31256,7 +31260,7 @@ if (window.__VITE_ENVS.MODE === "development") {
|
|
|
31256
31260
|
} else {
|
|
31257
31261
|
serviceWorkerManager.registerServiceWorker(false);
|
|
31258
31262
|
}
|
|
31259
|
-
const App = lazy(() => __vitePreload(() => import("./app-
|
|
31263
|
+
const App = lazy(() => __vitePreload(() => import("./app-B-OQa5ns.js").then((n) => n.aN), true ? __vite__mapDeps([0,1,2]) : void 0));
|
|
31260
31264
|
const AppLoader = /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(App, {}) });
|
|
31261
31265
|
const appLoader = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
31262
31266
|
__proto__: null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { aD as BaseError, aE as getUrl, aF as stringify, aG as decodeErrorResult, aH as isAddressEqual, aI as call, aJ as concat, aK as encodeAbiParameters, aL as HttpRequestError, aM as isHex } from "./app-
|
|
2
|
-
import "./main
|
|
1
|
+
import { aD as BaseError, aE as getUrl, aF as stringify, aG as decodeErrorResult, aH as isAddressEqual, aI as call, aJ as concat, aK as encodeAbiParameters, aL as HttpRequestError, aM as isHex } from "./app-B-OQa5ns.js";
|
|
2
|
+
import "./main.BonTLytE.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
|
-
import "./app-loader-
|
|
4
|
+
import "./app-loader-CvftvVK0.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "@powerhousedao/reactor-browser";
|
|
7
7
|
import "react-dom";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
2
|
-
import { t as twMerge, B as Button, m as mergeClassNameProps, E as ERROR, M as MISSING, C as CONFLICT, S as SUCCESS, h as SYNCING, I as INITIAL_SYNC, i as ConnectDropdownMenu, u as useOnClickOutside, j as useEventListener, k as useCopyToClipboard, l as Select, n as ENSAvatar, P as Provider, o as Root3, T as Trigger, p as Portal, q as Content2, v as validateInitialState, w as validateStateSchemaName, x as validateModules, y as useUnwrappedReactor, z as useConnectDid, A as useConnectCrypto, D as useTranslation, F as useModal, G as useAtomValue, H as themeAtom, J as useUser, K as useUserPermissions, L as useUiNodes, N as exportFile, O as useGetDocumentModelModule, Q as addActionContext, U as signOperation, V as useDocumentDriveServer, W as useHotkeys, X as useGetEditor, Y as isSameDocument, Z as useNavigate, _ as ErrorBoundary, $ as DriveLayout, a0 as SearchBar, a1 as useAsyncReactor, a2 as useFilteredDocumentModels, a3 as useDriveEditor, a4 as useDocumentDriveById } from "./app-
|
|
2
|
+
import { t as twMerge, B as Button, m as mergeClassNameProps, E as ERROR, M as MISSING, C as CONFLICT, S as SUCCESS, h as SYNCING, I as INITIAL_SYNC, i as ConnectDropdownMenu, u as useOnClickOutside, j as useEventListener, k as useCopyToClipboard, l as Select, n as ENSAvatar, P as Provider, o as Root3, T as Trigger, p as Portal, q as Content2, v as validateInitialState, w as validateStateSchemaName, x as validateModules, y as useUnwrappedReactor, z as useConnectDid, A as useConnectCrypto, D as useTranslation, F as useModal, G as useAtomValue, H as themeAtom, J as useUser, K as useUserPermissions, L as useUiNodes, N as exportFile, O as useGetDocumentModelModule, Q as addActionContext, U as signOperation, V as useDocumentDriveServer, W as useHotkeys, X as useGetEditor, Y as isSameDocument, Z as useNavigate, _ as ErrorBoundary, $ as DriveLayout, a0 as SearchBar, a1 as useAsyncReactor, a2 as useFilteredDocumentModels, a3 as useDriveEditor, a4 as useDocumentDriveById } from "./app-B-OQa5ns.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, aX as getDimensions, aY as READ, aZ as nodeOptionsMap, a_ as defaultFileOptions, a$ as DELETE, b0 as RENAME, b1 as WRITE, b2 as DUPLICATE, b3 as defaultFolderOptions, b4 as garbageCollect, b5 as sortOperations, b6 as UI_NODE, aO as DRIVE, ay as FILE, b7 as undo, b8 as redo, ac as logger, b9 as useDocumentDispatch, aP as FOLDER, ak as driveDocumentModelModule } from "./app-loader-
|
|
5
|
+
import { _ as Icon, aX as getDimensions, aY as READ, aZ as nodeOptionsMap, a_ as defaultFileOptions, a$ as DELETE, b0 as RENAME, b1 as WRITE, b2 as DUPLICATE, b3 as defaultFolderOptions, b4 as garbageCollect, b5 as sortOperations, b6 as UI_NODE, aO as DRIVE, ay as FILE, b7 as undo, b8 as redo, ac as logger, b9 as useDocumentDispatch, aP as FOLDER, ak as driveDocumentModelModule } from "./app-loader-CvftvVK0.js";
|
|
6
6
|
import { useDocument, useDocumentEditorProps } from "@powerhousedao/reactor-browser";
|
|
7
7
|
import { useUiNodesContext, FILE as FILE$1 } from "@powerhousedao/reactor-browser/hooks/useUiNodesContext";
|
|
8
8
|
import { useDriveActionsWithUiNodes } from "@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes";
|
|
@@ -10,7 +10,7 @@ import { useDriveContext, DriveContextProvider } from "@powerhousedao/reactor-br
|
|
|
10
10
|
import "@powerhousedao/reactor-browser/uiNodes/constants";
|
|
11
11
|
import { makeDriveDocumentStateHook } from "@powerhousedao/reactor-browser/hooks/document-state";
|
|
12
12
|
import { flushSync } from "react-dom";
|
|
13
|
-
import "./main
|
|
13
|
+
import "./main.BonTLytE.js";
|
|
14
14
|
const PaginationButton = ({ active = false, ...props }) => {
|
|
15
15
|
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");
|
|
16
16
|
return jsx(Button, { color: "light", size: "small", ...mergeClassNameProps(props, className), children: props.children });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { t as twMerge, a5 as clsx, a6 as get, a7 as set, a8 as appendErrors, a9 as useFormContext, aa as Primitive, ab as cva, ac as FormProvider, ad as Controller, ae as Slot, af as useForm, ag as Root2, ah as List, ai as Trigger, aj as Content, ak as setModelName, al as setModelId, am as setModelDescription, an as setModelExtension, ao as setAuthorName, ap as setAuthorWebsite, aq as setStateSchema, ar as setInitialState, as as addModule, at as setModuleName, au as deleteModule, av as addOperation, aw as setOperationName, ax as setOperationSchema, ay as setOperationDescription, az as deleteOperation, aA as addOperationError, aB as deleteOperationError, aC as setOperationErrorName } from "./app-
|
|
3
|
-
import { ba as inspect$1, bb as GraphQLError$1, bc as getNamedType, bd as invariant$2, be as isInputObjectType, bf as isScalarType, bg as isObjectType, bh as isInterfaceType, bi as isUnionType, bj as isEnumType, bk as print, bl as isPrintableAsBlockString, bm as Kind, bn as astFromValue$1, bo as DEFAULT_DEPRECATION_REASON, bp as isSpecifiedDirective, bq as isSpecifiedScalarType, br as isIntrospectionType, bs as z, bt as GraphQLScalarType, Z as pascalCase, bu as parse, bv as visit, bw as buildASTSchema, bx as extendSchema, by as getNullableType, bz as isListType, $ as getDefaultExportFromCjs, bA as snakeCase, bB as constantCase, bC as isAbstractType, bD as BREAK, bE as GraphQLInputObjectType, bF as GraphQLList, bG as GraphQLEnumType, bH as GraphQLObjectType, bI as GraphQLInterfaceType, bJ as SchemaMetaFieldDef, bK as TypeMetaFieldDef, bL as TypeNameMetaFieldDef, bM as isCompositeType, bN as isOutputType, bO as isInputType, bP as GraphQLBoolean, bQ as assertAbstractType, bR as doTypesOverlap, bS as DirectiveLocation, bT as specifiedRules$1, bU as NoUnusedFragmentsRule$1, bV as ExecutableDefinitionsRule$1, bW as validate$2, bX as validateSchema, bY as GraphQLID, bZ as GraphQLString, b_ as GraphQLFloat, b$ as GraphQLInt, c0 as GraphQLDirective, c1 as GraphQLUnionType, c2 as isNonNullType, c3 as GraphQLNonNull, c4 as isNamedType, c5 as isLeafType, c6 as GraphQLSchema, c7 as buildSchema, c8 as sentenceCase, am as hashKey } from "./app-loader-
|
|
2
|
+
import { t as twMerge, a5 as clsx, a6 as get, a7 as set, a8 as appendErrors, a9 as useFormContext, aa as Primitive, ab as cva, ac as FormProvider, ad as Controller, ae as Slot, af as useForm, ag as Root2, ah as List, ai as Trigger, aj as Content, ak as setModelName, al as setModelId, am as setModelDescription, an as setModelExtension, ao as setAuthorName, ap as setAuthorWebsite, aq as setStateSchema, ar as setInitialState, as as addModule, at as setModuleName, au as deleteModule, av as addOperation, aw as setOperationName, ax as setOperationSchema, ay as setOperationDescription, az as deleteOperation, aA as addOperationError, aB as deleteOperationError, aC as setOperationErrorName } from "./app-B-OQa5ns.js";
|
|
3
|
+
import { ba as inspect$1, bb as GraphQLError$1, bc as getNamedType, bd as invariant$2, be as isInputObjectType, bf as isScalarType, bg as isObjectType, bh as isInterfaceType, bi as isUnionType, bj as isEnumType, bk as print, bl as isPrintableAsBlockString, bm as Kind, bn as astFromValue$1, bo as DEFAULT_DEPRECATION_REASON, bp as isSpecifiedDirective, bq as isSpecifiedScalarType, br as isIntrospectionType, bs as z, bt as GraphQLScalarType, Z as pascalCase, bu as parse, bv as visit, bw as buildASTSchema, bx as extendSchema, by as getNullableType, bz as isListType, $ as getDefaultExportFromCjs, bA as snakeCase, bB as constantCase, bC as isAbstractType, bD as BREAK, bE as GraphQLInputObjectType, bF as GraphQLList, bG as GraphQLEnumType, bH as GraphQLObjectType, bI as GraphQLInterfaceType, bJ as SchemaMetaFieldDef, bK as TypeMetaFieldDef, bL as TypeNameMetaFieldDef, bM as isCompositeType, bN as isOutputType, bO as isInputType, bP as GraphQLBoolean, bQ as assertAbstractType, bR as doTypesOverlap, bS as DirectiveLocation, bT as specifiedRules$1, bU as NoUnusedFragmentsRule$1, bV as ExecutableDefinitionsRule$1, bW as validate$2, bX as validateSchema, bY as GraphQLID, bZ as GraphQLString, b_ as GraphQLFloat, b$ as GraphQLInt, c0 as GraphQLDirective, c1 as GraphQLUnionType, c2 as isNonNullType, c3 as GraphQLNonNull, c4 as isNamedType, c5 as isLeafType, c6 as GraphQLSchema, c7 as buildSchema, c8 as sentenceCase, am as hashKey } from "./app-loader-CvftvVK0.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import React__default, { forwardRef, useRef, useCallback, useImperativeHandle, useEffect, useState, createContext, useContext, memo, useId, useMemo } from "react";
|
|
6
|
-
import "./main
|
|
6
|
+
import "./main.BonTLytE.js";
|
|
7
7
|
import "@powerhousedao/reactor-browser";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
import "@powerhousedao/reactor-browser/hooks/useUiNodesContext";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-
|
|
2
|
-
import { _ as __vitePreload } from "./main
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-CvftvVK0.js","assets/main.BonTLytE.js","assets/app-loader-DC8DXqh9.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import { _ as __vitePreload } from "./main.BonTLytE.js";
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
4
|
async function renderApp(element) {
|
|
5
|
-
const AppLoader = await __vitePreload(() => import("./app-loader-
|
|
5
|
+
const AppLoader = await __vitePreload(() => import("./app-loader-CvftvVK0.js").then((n) => n.c9), true ? __vite__mapDeps([0,1,2]) : void 0);
|
|
6
6
|
createRoot(element).render(AppLoader.default);
|
|
7
7
|
}
|
|
8
8
|
const AppElement = document.getElementById("app");
|
|
@@ -10,10 +10,10 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
10
10
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
12
|
var _DB_NAME, _STORE_NAME, _KEY, _db, _BrowserKeyStorage_instances, useStore_fn, _subtleCrypto, _keyPair, _keyPairStorage, _did, _ConnectCrypto_instances, initCrypto_fn, initialize_fn, parseDid_fn, generateECDSAKeyPair_fn, exportKeyPair_fn, importKeyPair_fn, _sign, _verify, _store, _namespace, _BaseStorage_instances, buildKey_fn, _baseUrl, _store2, _connectId, _eventEmitter, _Renown_instances, updateUser_fn, getCredential_fn;
|
|
13
|
-
import { _ as __vitePreload } from "./main
|
|
14
|
-
import { aW as getAugmentedNamespace, $ as getDefaultExportFromCjs, ah as connectConfig, ac as logger } from "./app-loader-
|
|
15
|
-
import { e as eventsExports, R as RENOWN_URL, g as getEnsInfo } from "./app-
|
|
16
|
-
import { d, c, b, f, a, r, s } from "./app-
|
|
13
|
+
import { _ as __vitePreload } from "./main.BonTLytE.js";
|
|
14
|
+
import { aW as getAugmentedNamespace, $ as getDefaultExportFromCjs, ah as connectConfig, ac as logger } from "./app-loader-CvftvVK0.js";
|
|
15
|
+
import { e as eventsExports, R as RENOWN_URL, g as getEnsInfo } from "./app-B-OQa5ns.js";
|
|
16
|
+
import { d, c, b, f, a, r, s } from "./app-B-OQa5ns.js";
|
|
17
17
|
import "react/jsx-runtime";
|
|
18
18
|
import "react";
|
|
19
19
|
import "@powerhousedao/reactor-browser";
|
|
@@ -99,7 +99,7 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
|
99
99
|
return baseModule().catch(handlePreloadError);
|
|
100
100
|
});
|
|
101
101
|
};
|
|
102
|
-
__vitePreload(() => import("./index-
|
|
102
|
+
__vitePreload(() => import("./index-BrGKy_yq.js"), true ? [] : void 0);
|
|
103
103
|
export {
|
|
104
104
|
__vitePreload as _
|
|
105
105
|
};
|
package/dist/hmr.js
CHANGED
package/dist/index.html
CHANGED
|
@@ -94,4 +94,4 @@
|
|
|
94
94
|
"@powerhousedao/reactor-browser/utils/index": "/modules/@powerhousedao/reactor-browser/utils/index.js",
|
|
95
95
|
"@powerhousedao/reactor-browser/utils/signature": "/modules/@powerhousedao/reactor-browser/utils/signature.js"
|
|
96
96
|
}
|
|
97
|
-
}</script><script type="module" crossorigin="" src="/assets/main
|
|
97
|
+
}</script><script type="module" crossorigin="" src="/assets/main.BonTLytE.js"></script></head><body><div id="app"></div></body></html>
|
package/dist/vite-envs.sh
CHANGED
|
@@ -11,7 +11,7 @@ replaceAll() {
|
|
|
11
11
|
}'
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
html=$(echo "PCFET0N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b2R1bGVzL0Bwb3dlcmhvdXNlZGFvL3JlYWN0b3ItYnJvd3Nlci91dGlscy9leHBvcnQtZG9jdW1lbnQuanMiLAogICAgIkBwb3dlcmhvdXNlZGFvL3JlYWN0b3ItYnJvd3Nlci91dGlscy9pbmRleCI6ICIvbW9kdWxlcy9AcG93ZXJob3VzZWRhby9yZWFjdG9yLWJyb3dzZXIvdXRpbHMvaW5kZXguanMiLAogICAgIkBwb3dlcmhvdXNlZGFvL3JlYWN0b3ItYnJvd3Nlci91dGlscy9zaWduYXR1cmUiOiAiL21vZHVsZXMvQHBvd2VyaG91c2VkYW8vcmVhY3Rvci1icm93c2VyL3V0aWxzL3NpZ25hdHVyZS5qcyIKICB9Cn08L3NjcmlwdD48c2NyaXB0IHR5cGU9Im1vZHVsZSIgY3Jvc3NvcmlnaW49IiIgc3JjPSIvYXNzZXRzL21haW4uQm9uVEx5dEUuanMiPjwvc2NyaXB0PjwvaGVhZD48Ym9keT48ZGl2IGlkPSJhcHAiPjwvZGl2PjwvYm9keT48L2h0bWw+" | base64 -d)
|
|
15
15
|
|
|
16
16
|
BASE_URL_base64="eEFwV2RSclg5OWtQclZnZ0UiLyIK"
|
|
17
17
|
BASE_URL=$(echo "Lwo=" | base64 -d)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/connect",
|
|
3
3
|
"productName": "Powerhouse-Connect",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2-dev.0",
|
|
5
5
|
"description": "Powerhouse Connect",
|
|
6
6
|
"main": "./dist/index.html",
|
|
7
7
|
"type": "module",
|
|
@@ -82,13 +82,13 @@
|
|
|
82
82
|
"vite-plugin-svgr": "^4.2.0",
|
|
83
83
|
"vite-tsconfig-paths": "^4.3.2",
|
|
84
84
|
"xvfb-maybe": "^0.2.1",
|
|
85
|
-
"@powerhousedao/builder-tools": "0.9.
|
|
86
|
-
"@powerhousedao/config": "1.27.0-dev.
|
|
87
|
-
"@powerhousedao/design-system": "1.39.
|
|
88
|
-
"@powerhousedao/reactor-browser": "1.22.
|
|
85
|
+
"@powerhousedao/builder-tools": "0.9.10-dev.0",
|
|
86
|
+
"@powerhousedao/config": "1.27.0-dev.1",
|
|
87
|
+
"@powerhousedao/design-system": "1.39.5-dev.0",
|
|
88
|
+
"@powerhousedao/reactor-browser": "1.22.11-dev.0",
|
|
89
|
+
"@powerhousedao/common": "1.10.11-dev.0",
|
|
89
90
|
"@powerhousedao/scalars": "1.33.1-dev.0",
|
|
90
|
-
"
|
|
91
|
-
"document-drive": "1.29.2-dev.0",
|
|
91
|
+
"document-drive": "1.29.4-dev.0",
|
|
92
92
|
"document-model": "2.28.0"
|
|
93
93
|
},
|
|
94
94
|
"optionalDependencies": {
|