@xyo-network/dapp-template 4.0.5 → 4.1.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/neutral/Payloads.d.ts +127 -13
- package/dist/neutral/Payloads.d.ts.map +1 -1
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/node/Payloads.d.ts +127 -13
- package/dist/node/Payloads.d.ts.map +1 -1
- package/dist/node/index.mjs.map +1 -1
- package/package.json +31 -31
- package/src/Payloads.ts +1 -1
|
@@ -1,22 +1,136 @@
|
|
|
1
|
-
import type { DappConfig, DappIcon, DappName,
|
|
1
|
+
import type { DappConfig, DappIcon, DappName, DappVersion } from '@xyo-network/os-model';
|
|
2
|
+
import { DappMode } from '@xyo-network/os-model';
|
|
2
3
|
export declare const CustomDappName: DappName;
|
|
3
4
|
export declare const CustomDappConfig: DappConfig;
|
|
4
5
|
export declare const CustomDappIcon: DappIcon;
|
|
5
|
-
export declare const DappPayloads: (
|
|
6
|
-
sources: string[];
|
|
7
|
-
} & {
|
|
6
|
+
export declare const DappPayloads: (import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
8
7
|
schema: "network.xyo.os.dapp.config";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
exposedModuleIds?: string[] | undefined;
|
|
9
|
+
manifest: {
|
|
10
|
+
schema: "network.xyo.manifest.package.dapp";
|
|
11
|
+
external?: {
|
|
12
|
+
modules: {
|
|
13
|
+
name: import("@xyo-network/module-model").ModuleIdentifier;
|
|
14
|
+
}[];
|
|
15
|
+
} | undefined;
|
|
16
|
+
modules?: {
|
|
17
|
+
[x: string]: {
|
|
18
|
+
config: {
|
|
19
|
+
accountPath?: string | undefined;
|
|
20
|
+
features?: string[] | undefined;
|
|
21
|
+
labels?: {
|
|
22
|
+
[x: string]: string | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
language?: string | undefined;
|
|
25
|
+
name: string;
|
|
26
|
+
os?: string | undefined;
|
|
27
|
+
schema: string;
|
|
28
|
+
};
|
|
29
|
+
lazyStart?: boolean | undefined;
|
|
30
|
+
status?: {
|
|
31
|
+
address: import("@xylabs/hex").Address;
|
|
32
|
+
children?: {
|
|
33
|
+
[x: Lowercase<string>]: string | null;
|
|
34
|
+
} | undefined;
|
|
35
|
+
} | undefined;
|
|
36
|
+
description?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
} | undefined;
|
|
39
|
+
nodes: {
|
|
40
|
+
modules?: {
|
|
41
|
+
private?: (string | {
|
|
42
|
+
config: {
|
|
43
|
+
accountPath?: string | undefined;
|
|
44
|
+
features?: string[] | undefined;
|
|
45
|
+
labels?: {
|
|
46
|
+
[x: string]: string | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
language?: string | undefined;
|
|
49
|
+
name: string;
|
|
50
|
+
os?: string | undefined;
|
|
51
|
+
schema: string;
|
|
52
|
+
};
|
|
53
|
+
lazyStart?: boolean | undefined;
|
|
54
|
+
status?: {
|
|
55
|
+
address: import("@xylabs/hex").Address;
|
|
56
|
+
children?: {
|
|
57
|
+
[x: Lowercase<string>]: string | null;
|
|
58
|
+
} | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
description?: string | undefined;
|
|
61
|
+
})[] | undefined;
|
|
62
|
+
public?: (string | {
|
|
63
|
+
config: {
|
|
64
|
+
accountPath?: string | undefined;
|
|
65
|
+
features?: string[] | undefined;
|
|
66
|
+
labels?: {
|
|
67
|
+
[x: string]: string | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
language?: string | undefined;
|
|
70
|
+
name: string;
|
|
71
|
+
os?: string | undefined;
|
|
72
|
+
schema: string;
|
|
73
|
+
};
|
|
74
|
+
lazyStart?: boolean | undefined;
|
|
75
|
+
status?: {
|
|
76
|
+
address: import("@xylabs/hex").Address;
|
|
77
|
+
children?: {
|
|
78
|
+
[x: Lowercase<string>]: string | null;
|
|
79
|
+
} | undefined;
|
|
80
|
+
} | undefined;
|
|
81
|
+
description?: string | undefined;
|
|
82
|
+
})[] | undefined;
|
|
83
|
+
} | undefined;
|
|
84
|
+
config: {
|
|
85
|
+
accountPath?: string | undefined;
|
|
86
|
+
features?: string[] | undefined;
|
|
87
|
+
labels?: {
|
|
88
|
+
[x: string]: string | undefined;
|
|
89
|
+
} | undefined;
|
|
90
|
+
language?: string | undefined;
|
|
91
|
+
name: string;
|
|
92
|
+
os?: string | undefined;
|
|
93
|
+
schema: string;
|
|
94
|
+
};
|
|
95
|
+
lazyStart?: boolean | undefined;
|
|
96
|
+
status?: {
|
|
97
|
+
address: import("@xylabs/hex").Address;
|
|
98
|
+
children?: {
|
|
99
|
+
[x: Lowercase<string>]: string | null;
|
|
100
|
+
} | undefined;
|
|
101
|
+
} | undefined;
|
|
102
|
+
description?: string | undefined;
|
|
103
|
+
}[];
|
|
104
|
+
description?: string | undefined;
|
|
105
|
+
};
|
|
106
|
+
modes: DappMode[];
|
|
107
|
+
readonly name: string;
|
|
108
|
+
readonly version: string;
|
|
109
|
+
sources: string[];
|
|
110
|
+
}> | import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
111
|
+
schema: "network.xyo.dapp.icon";
|
|
112
|
+
active?: boolean | undefined;
|
|
113
|
+
color?: string | undefined;
|
|
114
|
+
installed?: import("@xyo-network/os-model").InstallationType | undefined;
|
|
13
115
|
name: DappName;
|
|
14
116
|
type: import("@xyo-network/os-model").KnownDappTypes;
|
|
15
117
|
version: DappVersion;
|
|
16
|
-
windowId?: string | null;
|
|
17
|
-
}
|
|
18
|
-
schema: "network.xyo.dapp.icon";
|
|
19
|
-
}))[];
|
|
118
|
+
windowId?: string | null | undefined;
|
|
119
|
+
}>)[];
|
|
20
120
|
export type CustomDappMenuItemPaths = 'home' | 'settings';
|
|
21
|
-
export declare const CustomDappMenuPayloads: (
|
|
121
|
+
export declare const CustomDappMenuPayloads: (import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
122
|
+
schema: "network.xyo.dapp.nav.item";
|
|
123
|
+
hidden?: boolean | undefined;
|
|
124
|
+
matchType?: "startsWith" | "exact" | undefined;
|
|
125
|
+
path: CustomDappMenuItemPaths;
|
|
126
|
+
primaryText: string;
|
|
127
|
+
secondaryText?: string | undefined;
|
|
128
|
+
svgIcon?: string | undefined;
|
|
129
|
+
svgIconActive?: string | undefined;
|
|
130
|
+
weight?: number | undefined;
|
|
131
|
+
}> | import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
132
|
+
schema: "network.xyo.dapp.nav.menu.config";
|
|
133
|
+
defaultPath?: string | undefined;
|
|
134
|
+
hideMobileMenu?: boolean | undefined;
|
|
135
|
+
}>)[];
|
|
22
136
|
//# sourceMappingURL=Payloads.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payloads.d.ts","sourceRoot":"","sources":["../../src/Payloads.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,
|
|
1
|
+
{"version":3,"file":"Payloads.d.ts","sourceRoot":"","sources":["../../src/Payloads.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EAIR,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAGL,QAAQ,EAGT,MAAM,uBAAuB,CAAA;AAI9B,eAAO,MAAM,cAAc,EAAE,QAAiC,CAAA;AAI9D,eAAO,MAAM,gBAAgB,EAAE,UAO9B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,QAO5B,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAqC,CAAA;AAE9D,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,UAAU,CAAA;AA4BzD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;KAAiD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/dapp.manifest.json","../../src/Params.ts","../../src/icon/Icon.tsx","../../src/Payloads.ts","../../src/window/Dapp.tsx","../../src/components/Dapp.tsx","../../src/UiParams.ts"],"sourcesContent":["{\n \"$schema\": \"https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/compilations/dapp-package-manifest-schema.json\",\n \"nodes\": [\n {\n \"config\": {\n \"accountPath\": \"0'\",\n \"name\": \"Node\",\n \"schema\": \"network.xyo.node.config\"\n },\n \"modules\": {\n \"private\": [],\n \"public\": [\n {\n \"config\": {\n \"accountPath\": \"1'\",\n \"name\": \"DappArchivist\",\n \"dbName\": \"DappArchivist\",\n \"storeName\": \"payloads\",\n \"schema\": \"network.xyo.archivist.config\",\n \"labels\": {\n \"network.xyo.archivist.persistence.scope\": \"device\"\n }\n }\n }\n ]\n }\n }\n ],\n \"schema\": \"network.xyo.manifest.package.dapp\"\n}","import { IndexedDbArchivist } from '@xyo-network/archivist-indexeddb'\nimport { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport type { UnregisteredDapp } from '@xyo-network/os-model'\n\nimport { CustomDappIconSvg } from './icon/index.ts'\n\nconst locator = new ModuleFactoryLocator()\nlocator.register(IndexedDbArchivist)\n\nexport const CustomDappParams: UnregisteredDapp['params'] = {\n iconSvg: CustomDappIconSvg,\n locator,\n}\n\nexport { CustomDappParams as default }\n","/* eslint-disable @stylistic/max-len */\nexport const CustomDappIconSvg = `\n<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\">\n <path\n fill=\"transparent\"\n d=\"M6.44,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M18.01,27.91c-.55.55-.83,1.22-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83s-1.44.28-2,.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M33.56,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M36.55,26.94c-.82-.82-1.82-1.23-3-1.23-.32,0-.63.04-.93.11-.3.07-.59.17-.87.31l-5.87-8.09c-.18.03-.36.05-.56.05h-1.13l6.42,8.83c-.39.4-.7.85-.93,1.36-.23.51-.35,1.06-.35,1.66,0,1.18.41,2.17,1.23,3s1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3-.41-2.17-1.23-3ZM35.55,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M19.29,25.73c-1,.16-1.84.64-2.52,1.42-.67.79-1.01,1.7-1.01,2.75,0,1.18.41,2.17,1.23,3,.82.82,1.82,1.23,3,1.23s2.17-.41,3-1.23c.82-.82,1.23-1.82,1.23-3,0-1.05-.34-1.97-1.01-2.74-.67-.78-1.51-1.25-2.52-1.43v-7.65h-1.41v7.65ZM22,27.91c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M14.1,18l-5.89,8.08c-.28-.13-.56-.22-.86-.28-.29-.06-.6-.09-.91-.09-1.18,0-2.17.41-3,1.23-.82.82-1.23,1.82-1.23,3s.41,2.17,1.23,3,1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3c0-.6-.12-1.15-.36-1.66s-.56-.96-.95-1.36l6.45-8.83h-1c-.25,0-.48-.03-.7-.08ZM8.44,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,12.91c1.26,0,2.46.19,3.61.56,1.15.37,2.23.88,3.23,1.54V4.86c0-.44-.15-.82-.46-1.12s-.68-.46-1.12-.46h-10.52c-.44,0-.82.15-1.12.46s-.46.68-.46,1.12v10.15c1-.66,2.08-1.17,3.23-1.54s2.36-.56,3.61-.56ZM17.7,5.83c.63-.63,1.4-.95,2.3-.95s1.66.32,2.3.95.95,1.4.95,2.3-.32,1.66-.95,2.3-1.4.95-2.3.95-1.66-.32-2.3-.95-.95-1.4-.95-2.3.32-1.66.95-2.3Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,10.32c.6,0,1.12-.21,1.55-.64.43-.43.65-.94.65-1.55s-.22-1.12-.65-1.55c-.43-.43-.95-.65-1.55-.65s-1.12.22-1.55.65-.64.95-.64,1.55.21,1.12.64,1.55.94.64,1.55.64Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M20,11.37c.9,0,1.66-.32,2.3-.95s.95-1.4.95-2.3-.32-1.66-.95-2.3-1.4-.95-2.3-.95-1.66.32-2.3.95-.95,1.4-.95,2.3.32,1.66.95,2.3,1.4.95,2.3.95ZM18.45,6.58c.43-.43.95-.65,1.55-.65s1.12.22,1.55.65c.43.43.65.95.65,1.55s-.22,1.12-.65,1.55c-.43.43-.95.64-1.55.64s-1.12-.21-1.55-.64-.64-.95-.64-1.55.21-1.12.64-1.55Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M27.21,2.9c-.5-.5-1.15-.75-1.95-.75h-10.52c-.8,0-1.45.25-1.95.75-.5.5-.75,1.15-.75,1.95v10.52c0,.8.25,1.45.75,1.95.35.35.77.56,1.25.67.22.05.45.08.7.08h10.52c.2,0,.38-.02.56-.05.55-.09,1.01-.33,1.39-.71.5-.5.75-1.15.75-1.95V4.86c0-.8-.25-1.45-.75-1.95ZM25.93,16.74c-.26.14-.55.22-.86.22h-10.15s-.08-.01-.12-.01c-.25-.02-.5-.08-.74-.2-.28-.14-.45-.35-.5-.63.99-.7,2.03-1.22,3.12-1.57s2.19-.52,3.31-.52,2.27.18,3.4.55c1.13.36,2.18.88,3.16,1.54-.15.27-.36.48-.63.63ZM26.84,15.01c-1-.66-2.08-1.17-3.23-1.54-1.15-.37-2.36-.56-3.61-.56s-2.46.19-3.61.56-2.23.88-3.23,1.54V4.86c0-.44.15-.82.46-1.12s.68-.46,1.12-.46h10.52c.44,0,.82.15,1.12.46s.46.68.46,1.12v10.15Z\"\n />\n </svg>\n `\n","/* eslint-disable @stylistic/max-len */\nimport type {\n DappConfig,\n DappIcon,\n DappName,\n DappNavItem,\n DappNavMenuConfig,\n DappPackageManifestPayload,\n DappVersion,\n} from '@xyo-network/os-model'\nimport {\n DappConfigSchema,\n DappIconSchema,\n DappMode,\n DappNavItemSchema,\n DappNavMenuConfigSchema,\n} from '@xyo-network/os-model'\n\nimport dappManifest from './dapp.manifest.json'\n\nexport const CustomDappName: DappName = 'Custom Dapp' as const\n\nconst version: DappVersion = '1.0.0'\n\nexport const CustomDappConfig: DappConfig = {\n manifest: dappManifest as DappPackageManifestPayload,\n modes: [DappMode.Window],\n name: CustomDappName,\n schema: DappConfigSchema,\n sources: ['network.xyo.dapp.accounts.source'],\n version,\n}\n\nexport const CustomDappIcon: DappIcon = {\n active: false,\n installed: 'installed',\n name: CustomDappName,\n schema: DappIconSchema,\n type: 'system',\n version,\n}\n\nexport const DappPayloads = [CustomDappConfig, CustomDappIcon]\n\nexport type CustomDappMenuItemPaths = 'home' | 'settings'\n\nconst CustomDappMenuItems: DappNavItem<CustomDappMenuItemPaths>[] = [\n {\n path: 'home',\n primaryText: 'Home',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n {\n path: 'settings',\n primaryText: 'Settings',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n]\n\nconst CustomDappMenuConfig: DappNavMenuConfig = {\n defaultPath: 'home',\n schema: DappNavMenuConfigSchema,\n}\n\nexport const CustomDappMenuPayloads = [...CustomDappMenuItems, CustomDappMenuConfig]\n","import { ErrorRender } from '@xylabs/react-error'\nimport { DappPathSwitcher, useAddDappMenuItems } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { CustomDappPathToComponent } from '../components/index.ts'\nimport { CustomDappMenuPayloads } from '../Payloads.js'\n\nexport const CustomDapp = () => {\n const {\n menuConfig, path, error,\n } = useAddDappMenuItems(CustomDappMenuPayloads)\n\n return (\n <>\n <ErrorRender error={error} scope=\"CustomDapp\" />\n <DappPathSwitcher activePath={path?.path ?? menuConfig?.defaultPath} pathToComponent={CustomDappPathToComponent} />\n </>\n )\n}\n","import { FlexRow } from '@xylabs/react-flexbox'\nimport type { PathToComponent } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nexport const CustomDappPathToComponent: PathToComponent[] = [\n {\n component: <FlexRow />,\n path: 'home',\n },\n]\n","import type { UnregisteredReactDapp } from '@xyo-network/os-react-model'\n\nimport { CustomDappParams } from './Params.js'\nimport { CustomDapp } from './window/index.ts'\n\nexport const CustomDappUiParams: UnregisteredReactDapp['params'] = {\n ...CustomDappParams,\n modes: { window: { component: CustomDapp } },\n}\n\nexport { CustomDappUiParams as default }\n"],"mappings":";AAAA;AAAA,EACE,SAAW;AAAA,EACX,OAAS;AAAA,IACP;AAAA,MACE,QAAU;AAAA,QACR,aAAe;AAAA,QACf,MAAQ;AAAA,QACR,QAAU;AAAA,MACZ;AAAA,MACA,SAAW;AAAA,QACT,SAAW,CAAC;AAAA,QACZ,QAAU;AAAA,UACR;AAAA,YACE,QAAU;AAAA,cACR,aAAe;AAAA,cACf,MAAQ;AAAA,cACR,QAAU;AAAA,cACV,WAAa;AAAA,cACb,QAAU;AAAA,cACV,QAAU;AAAA,gBACR,2CAA2C;AAAA,cAC7C;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,QAAU;AACZ;;;AC7BA,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;;;ACA9B,IAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AAW,oBAAC,WAAQ;AAAA,IACpB,MAAM;AAAA,EACR;AACF;;;ADII,mBACE,OAAAA,MADF;AANG,IAAM,aAAa,MAAM;AAC9B,QAAM;AAAA,IACJ;AAAA,IAAY;AAAA,IAAM;AAAA,EACpB,IAAI,oBAAoB,sBAAsB;AAE9C,SACE,iCACE;AAAA,oBAAAA,KAAC,eAAY,OAAc,OAAM,cAAa;AAAA,IAC9C,gBAAAA,KAAC,oBAAiB,YAAY,MAAM,QAAQ,YAAY,aAAa,iBAAiB,2BAA2B;AAAA,KACnH;AAEJ;;;AEbO,IAAM,qBAAsD;AAAA,EACjE,GAAG;AAAA,EACH,OAAO,EAAE,QAAQ,EAAE,WAAW,WAAW,EAAE;AAC7C;","names":["jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/dapp.manifest.json","../../src/Params.ts","../../src/icon/Icon.tsx","../../src/Payloads.ts","../../src/window/Dapp.tsx","../../src/components/Dapp.tsx","../../src/UiParams.ts"],"sourcesContent":["{\n \"$schema\": \"https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/compilations/dapp-package-manifest-schema.json\",\n \"nodes\": [\n {\n \"config\": {\n \"accountPath\": \"0'\",\n \"name\": \"Node\",\n \"schema\": \"network.xyo.node.config\"\n },\n \"modules\": {\n \"private\": [],\n \"public\": [\n {\n \"config\": {\n \"accountPath\": \"1'\",\n \"name\": \"DappArchivist\",\n \"dbName\": \"DappArchivist\",\n \"storeName\": \"payloads\",\n \"schema\": \"network.xyo.archivist.config\",\n \"labels\": {\n \"network.xyo.archivist.persistence.scope\": \"device\"\n }\n }\n }\n ]\n }\n }\n ],\n \"schema\": \"network.xyo.manifest.package.dapp\"\n}","import { IndexedDbArchivist } from '@xyo-network/archivist-indexeddb'\nimport { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport type { UnregisteredDapp } from '@xyo-network/os-model'\n\nimport { CustomDappIconSvg } from './icon/index.ts'\n\nconst locator = new ModuleFactoryLocator()\nlocator.register(IndexedDbArchivist)\n\nexport const CustomDappParams: UnregisteredDapp['params'] = {\n iconSvg: CustomDappIconSvg,\n locator,\n}\n\nexport { CustomDappParams as default }\n","/* eslint-disable @stylistic/max-len */\nexport const CustomDappIconSvg = `\n<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\">\n <path\n fill=\"transparent\"\n d=\"M6.44,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M18.01,27.91c-.55.55-.83,1.22-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83s-1.44.28-2,.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M33.56,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M36.55,26.94c-.82-.82-1.82-1.23-3-1.23-.32,0-.63.04-.93.11-.3.07-.59.17-.87.31l-5.87-8.09c-.18.03-.36.05-.56.05h-1.13l6.42,8.83c-.39.4-.7.85-.93,1.36-.23.51-.35,1.06-.35,1.66,0,1.18.41,2.17,1.23,3s1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3-.41-2.17-1.23-3ZM35.55,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M19.29,25.73c-1,.16-1.84.64-2.52,1.42-.67.79-1.01,1.7-1.01,2.75,0,1.18.41,2.17,1.23,3,.82.82,1.82,1.23,3,1.23s2.17-.41,3-1.23c.82-.82,1.23-1.82,1.23-3,0-1.05-.34-1.97-1.01-2.74-.67-.78-1.51-1.25-2.52-1.43v-7.65h-1.41v7.65ZM22,27.91c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M14.1,18l-5.89,8.08c-.28-.13-.56-.22-.86-.28-.29-.06-.6-.09-.91-.09-1.18,0-2.17.41-3,1.23-.82.82-1.23,1.82-1.23,3s.41,2.17,1.23,3,1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3c0-.6-.12-1.15-.36-1.66s-.56-.96-.95-1.36l6.45-8.83h-1c-.25,0-.48-.03-.7-.08ZM8.44,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,12.91c1.26,0,2.46.19,3.61.56,1.15.37,2.23.88,3.23,1.54V4.86c0-.44-.15-.82-.46-1.12s-.68-.46-1.12-.46h-10.52c-.44,0-.82.15-1.12.46s-.46.68-.46,1.12v10.15c1-.66,2.08-1.17,3.23-1.54s2.36-.56,3.61-.56ZM17.7,5.83c.63-.63,1.4-.95,2.3-.95s1.66.32,2.3.95.95,1.4.95,2.3-.32,1.66-.95,2.3-1.4.95-2.3.95-1.66-.32-2.3-.95-.95-1.4-.95-2.3.32-1.66.95-2.3Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,10.32c.6,0,1.12-.21,1.55-.64.43-.43.65-.94.65-1.55s-.22-1.12-.65-1.55c-.43-.43-.95-.65-1.55-.65s-1.12.22-1.55.65-.64.95-.64,1.55.21,1.12.64,1.55.94.64,1.55.64Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M20,11.37c.9,0,1.66-.32,2.3-.95s.95-1.4.95-2.3-.32-1.66-.95-2.3-1.4-.95-2.3-.95-1.66.32-2.3.95-.95,1.4-.95,2.3.32,1.66.95,2.3,1.4.95,2.3.95ZM18.45,6.58c.43-.43.95-.65,1.55-.65s1.12.22,1.55.65c.43.43.65.95.65,1.55s-.22,1.12-.65,1.55c-.43.43-.95.64-1.55.64s-1.12-.21-1.55-.64-.64-.95-.64-1.55.21-1.12.64-1.55Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M27.21,2.9c-.5-.5-1.15-.75-1.95-.75h-10.52c-.8,0-1.45.25-1.95.75-.5.5-.75,1.15-.75,1.95v10.52c0,.8.25,1.45.75,1.95.35.35.77.56,1.25.67.22.05.45.08.7.08h10.52c.2,0,.38-.02.56-.05.55-.09,1.01-.33,1.39-.71.5-.5.75-1.15.75-1.95V4.86c0-.8-.25-1.45-.75-1.95ZM25.93,16.74c-.26.14-.55.22-.86.22h-10.15s-.08-.01-.12-.01c-.25-.02-.5-.08-.74-.2-.28-.14-.45-.35-.5-.63.99-.7,2.03-1.22,3.12-1.57s2.19-.52,3.31-.52,2.27.18,3.4.55c1.13.36,2.18.88,3.16,1.54-.15.27-.36.48-.63.63ZM26.84,15.01c-1-.66-2.08-1.17-3.23-1.54-1.15-.37-2.36-.56-3.61-.56s-2.46.19-3.61.56-2.23.88-3.23,1.54V4.86c0-.44.15-.82.46-1.12s.68-.46,1.12-.46h10.52c.44,0,.82.15,1.12.46s.46.68.46,1.12v10.15Z\"\n />\n </svg>\n `\n","/* eslint-disable @stylistic/max-len */\nimport type {\n DappConfig,\n DappIcon,\n DappName,\n DappNavItem,\n DappNavMenuConfig,\n DappPackageManifestPayload,\n DappVersion,\n} from '@xyo-network/os-model'\nimport {\n DappConfigSchema,\n DappIconSchema,\n DappMode,\n DappNavItemSchema,\n DappNavMenuConfigSchema,\n} from '@xyo-network/os-model'\n\nimport dappManifest from './dapp.manifest.json' assert { type: 'json' }\n\nexport const CustomDappName: DappName = 'Custom Dapp' as const\n\nconst version: DappVersion = '1.0.0'\n\nexport const CustomDappConfig: DappConfig = {\n manifest: dappManifest as DappPackageManifestPayload,\n modes: [DappMode.Window],\n name: CustomDappName,\n schema: DappConfigSchema,\n sources: ['network.xyo.dapp.accounts.source'],\n version,\n}\n\nexport const CustomDappIcon: DappIcon = {\n active: false,\n installed: 'installed',\n name: CustomDappName,\n schema: DappIconSchema,\n type: 'system',\n version,\n}\n\nexport const DappPayloads = [CustomDappConfig, CustomDappIcon]\n\nexport type CustomDappMenuItemPaths = 'home' | 'settings'\n\nconst CustomDappMenuItems: DappNavItem<CustomDappMenuItemPaths>[] = [\n {\n path: 'home',\n primaryText: 'Home',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n {\n path: 'settings',\n primaryText: 'Settings',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n]\n\nconst CustomDappMenuConfig: DappNavMenuConfig = {\n defaultPath: 'home',\n schema: DappNavMenuConfigSchema,\n}\n\nexport const CustomDappMenuPayloads = [...CustomDappMenuItems, CustomDappMenuConfig]\n","import { ErrorRender } from '@xylabs/react-error'\nimport { DappPathSwitcher, useAddDappMenuItems } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { CustomDappPathToComponent } from '../components/index.ts'\nimport { CustomDappMenuPayloads } from '../Payloads.js'\n\nexport const CustomDapp = () => {\n const {\n menuConfig, path, error,\n } = useAddDappMenuItems(CustomDappMenuPayloads)\n\n return (\n <>\n <ErrorRender error={error} scope=\"CustomDapp\" />\n <DappPathSwitcher activePath={path?.path ?? menuConfig?.defaultPath} pathToComponent={CustomDappPathToComponent} />\n </>\n )\n}\n","import { FlexRow } from '@xylabs/react-flexbox'\nimport type { PathToComponent } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nexport const CustomDappPathToComponent: PathToComponent[] = [\n {\n component: <FlexRow />,\n path: 'home',\n },\n]\n","import type { UnregisteredReactDapp } from '@xyo-network/os-react-model'\n\nimport { CustomDappParams } from './Params.js'\nimport { CustomDapp } from './window/index.ts'\n\nexport const CustomDappUiParams: UnregisteredReactDapp['params'] = {\n ...CustomDappParams,\n modes: { window: { component: CustomDapp } },\n}\n\nexport { CustomDappUiParams as default }\n"],"mappings":";AAAA;AAAA,EACE,SAAW;AAAA,EACX,OAAS;AAAA,IACP;AAAA,MACE,QAAU;AAAA,QACR,aAAe;AAAA,QACf,MAAQ;AAAA,QACR,QAAU;AAAA,MACZ;AAAA,MACA,SAAW;AAAA,QACT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a;AAAA,IACb,QAAQ;AAAA,IACR,SAAS;AAAA;AAAA;AAAA,IAGT,QAAQ;AAAA,EACV;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,SAAS;AAAA;AAAA;AAAA,IAGT,QAAQ;AAAA,EACV;AACF;AAEA,IAAM,uBAA0C;AAAA,EAC9C,aAAa;AAAA,EACb,QAAQ;AACV;AAEO,IAAM,yBAAyB,CAAC,GAAG,qBAAqB,oBAAoB;;;ACxEnF,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB,2BAA2B;;;ACDtD,SAAS,eAAe;AAMT;AAFR,IAAM,4BAA+C;AAAA,EAC1D;AAAA,IACE,WAAW,oBAAC,WAAQ;AAAA,IACpB,MAAM;AAAA,EACR;AACF;;;ADII,mBACE,OAAAA,MADF;AANG,IAAM,aAAa,MAAM;AAC9B,QAAM;AAAA,IACJ;AAAA,IAAY;AAAA,IAAM;AAAA,EACpB,IAAI,oBAAoB,sBAAsB;AAE9C,SACE,iCACE;AAAA,oBAAAA,KAAC,eAAY,OAAc,OAAM,cAAa;AAAA,IAC9C,gBAAAA,KAAC,oBAAiB,YAAY,MAAM,QAAQ,YAAY,aAAa,iBAAiB,2BAA2B;AAAA,KACnH;AAEJ;;;AEbO,IAAM,qBAAsD;AAAA,EACjE,GAAG;AAAA,EACH,OAAO,EAAE,QAAQ,EAAE,WAAW,WAAW,EAAE;AAC7C;","names":["jsx"]}
|
package/dist/node/Payloads.d.ts
CHANGED
|
@@ -1,22 +1,136 @@
|
|
|
1
|
-
import type { DappConfig, DappIcon, DappName,
|
|
1
|
+
import type { DappConfig, DappIcon, DappName, DappVersion } from '@xyo-network/os-model';
|
|
2
|
+
import { DappMode } from '@xyo-network/os-model';
|
|
2
3
|
export declare const CustomDappName: DappName;
|
|
3
4
|
export declare const CustomDappConfig: DappConfig;
|
|
4
5
|
export declare const CustomDappIcon: DappIcon;
|
|
5
|
-
export declare const DappPayloads: (
|
|
6
|
-
sources: string[];
|
|
7
|
-
} & {
|
|
6
|
+
export declare const DappPayloads: (import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
8
7
|
schema: "network.xyo.os.dapp.config";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
exposedModuleIds?: string[] | undefined;
|
|
9
|
+
manifest: {
|
|
10
|
+
schema: "network.xyo.manifest.package.dapp";
|
|
11
|
+
external?: {
|
|
12
|
+
modules: {
|
|
13
|
+
name: import("@xyo-network/module-model").ModuleIdentifier;
|
|
14
|
+
}[];
|
|
15
|
+
} | undefined;
|
|
16
|
+
modules?: {
|
|
17
|
+
[x: string]: {
|
|
18
|
+
config: {
|
|
19
|
+
accountPath?: string | undefined;
|
|
20
|
+
features?: string[] | undefined;
|
|
21
|
+
labels?: {
|
|
22
|
+
[x: string]: string | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
language?: string | undefined;
|
|
25
|
+
name: string;
|
|
26
|
+
os?: string | undefined;
|
|
27
|
+
schema: string;
|
|
28
|
+
};
|
|
29
|
+
lazyStart?: boolean | undefined;
|
|
30
|
+
status?: {
|
|
31
|
+
address: import("@xylabs/hex").Address;
|
|
32
|
+
children?: {
|
|
33
|
+
[x: Lowercase<string>]: string | null;
|
|
34
|
+
} | undefined;
|
|
35
|
+
} | undefined;
|
|
36
|
+
description?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
} | undefined;
|
|
39
|
+
nodes: {
|
|
40
|
+
modules?: {
|
|
41
|
+
private?: (string | {
|
|
42
|
+
config: {
|
|
43
|
+
accountPath?: string | undefined;
|
|
44
|
+
features?: string[] | undefined;
|
|
45
|
+
labels?: {
|
|
46
|
+
[x: string]: string | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
language?: string | undefined;
|
|
49
|
+
name: string;
|
|
50
|
+
os?: string | undefined;
|
|
51
|
+
schema: string;
|
|
52
|
+
};
|
|
53
|
+
lazyStart?: boolean | undefined;
|
|
54
|
+
status?: {
|
|
55
|
+
address: import("@xylabs/hex").Address;
|
|
56
|
+
children?: {
|
|
57
|
+
[x: Lowercase<string>]: string | null;
|
|
58
|
+
} | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
description?: string | undefined;
|
|
61
|
+
})[] | undefined;
|
|
62
|
+
public?: (string | {
|
|
63
|
+
config: {
|
|
64
|
+
accountPath?: string | undefined;
|
|
65
|
+
features?: string[] | undefined;
|
|
66
|
+
labels?: {
|
|
67
|
+
[x: string]: string | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
language?: string | undefined;
|
|
70
|
+
name: string;
|
|
71
|
+
os?: string | undefined;
|
|
72
|
+
schema: string;
|
|
73
|
+
};
|
|
74
|
+
lazyStart?: boolean | undefined;
|
|
75
|
+
status?: {
|
|
76
|
+
address: import("@xylabs/hex").Address;
|
|
77
|
+
children?: {
|
|
78
|
+
[x: Lowercase<string>]: string | null;
|
|
79
|
+
} | undefined;
|
|
80
|
+
} | undefined;
|
|
81
|
+
description?: string | undefined;
|
|
82
|
+
})[] | undefined;
|
|
83
|
+
} | undefined;
|
|
84
|
+
config: {
|
|
85
|
+
accountPath?: string | undefined;
|
|
86
|
+
features?: string[] | undefined;
|
|
87
|
+
labels?: {
|
|
88
|
+
[x: string]: string | undefined;
|
|
89
|
+
} | undefined;
|
|
90
|
+
language?: string | undefined;
|
|
91
|
+
name: string;
|
|
92
|
+
os?: string | undefined;
|
|
93
|
+
schema: string;
|
|
94
|
+
};
|
|
95
|
+
lazyStart?: boolean | undefined;
|
|
96
|
+
status?: {
|
|
97
|
+
address: import("@xylabs/hex").Address;
|
|
98
|
+
children?: {
|
|
99
|
+
[x: Lowercase<string>]: string | null;
|
|
100
|
+
} | undefined;
|
|
101
|
+
} | undefined;
|
|
102
|
+
description?: string | undefined;
|
|
103
|
+
}[];
|
|
104
|
+
description?: string | undefined;
|
|
105
|
+
};
|
|
106
|
+
modes: DappMode[];
|
|
107
|
+
readonly name: string;
|
|
108
|
+
readonly version: string;
|
|
109
|
+
sources: string[];
|
|
110
|
+
}> | import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
111
|
+
schema: "network.xyo.dapp.icon";
|
|
112
|
+
active?: boolean | undefined;
|
|
113
|
+
color?: string | undefined;
|
|
114
|
+
installed?: import("@xyo-network/os-model").InstallationType | undefined;
|
|
13
115
|
name: DappName;
|
|
14
116
|
type: import("@xyo-network/os-model").KnownDappTypes;
|
|
15
117
|
version: DappVersion;
|
|
16
|
-
windowId?: string | null;
|
|
17
|
-
}
|
|
18
|
-
schema: "network.xyo.dapp.icon";
|
|
19
|
-
}))[];
|
|
118
|
+
windowId?: string | null | undefined;
|
|
119
|
+
}>)[];
|
|
20
120
|
export type CustomDappMenuItemPaths = 'home' | 'settings';
|
|
21
|
-
export declare const CustomDappMenuPayloads: (
|
|
121
|
+
export declare const CustomDappMenuPayloads: (import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
122
|
+
schema: "network.xyo.dapp.nav.item";
|
|
123
|
+
hidden?: boolean | undefined;
|
|
124
|
+
matchType?: "startsWith" | "exact" | undefined;
|
|
125
|
+
path: CustomDappMenuItemPaths;
|
|
126
|
+
primaryText: string;
|
|
127
|
+
secondaryText?: string | undefined;
|
|
128
|
+
svgIcon?: string | undefined;
|
|
129
|
+
svgIconActive?: string | undefined;
|
|
130
|
+
weight?: number | undefined;
|
|
131
|
+
}> | import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
132
|
+
schema: "network.xyo.dapp.nav.menu.config";
|
|
133
|
+
defaultPath?: string | undefined;
|
|
134
|
+
hideMobileMenu?: boolean | undefined;
|
|
135
|
+
}>)[];
|
|
22
136
|
//# sourceMappingURL=Payloads.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payloads.d.ts","sourceRoot":"","sources":["../../src/Payloads.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,
|
|
1
|
+
{"version":3,"file":"Payloads.d.ts","sourceRoot":"","sources":["../../src/Payloads.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EAIR,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAGL,QAAQ,EAGT,MAAM,uBAAuB,CAAA;AAI9B,eAAO,MAAM,cAAc,EAAE,QAAiC,CAAA;AAI9D,eAAO,MAAM,gBAAgB,EAAE,UAO9B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,QAO5B,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAqC,CAAA;AAE9D,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,UAAU,CAAA;AA4BzD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;KAAiD,CAAA"}
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/dapp.manifest.json","../../src/Params.ts","../../src/icon/Icon.tsx","../../src/Payloads.ts","../../src/window/Dapp.tsx","../../src/components/Dapp.tsx","../../src/UiParams.ts"],"sourcesContent":["{\n \"$schema\": \"https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/compilations/dapp-package-manifest-schema.json\",\n \"nodes\": [\n {\n \"config\": {\n \"accountPath\": \"0'\",\n \"name\": \"Node\",\n \"schema\": \"network.xyo.node.config\"\n },\n \"modules\": {\n \"private\": [],\n \"public\": [\n {\n \"config\": {\n \"accountPath\": \"1'\",\n \"name\": \"DappArchivist\",\n \"dbName\": \"DappArchivist\",\n \"storeName\": \"payloads\",\n \"schema\": \"network.xyo.archivist.config\",\n \"labels\": {\n \"network.xyo.archivist.persistence.scope\": \"device\"\n }\n }\n }\n ]\n }\n }\n ],\n \"schema\": \"network.xyo.manifest.package.dapp\"\n}","import { IndexedDbArchivist } from '@xyo-network/archivist-indexeddb'\nimport { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport type { UnregisteredDapp } from '@xyo-network/os-model'\n\nimport { CustomDappIconSvg } from './icon/index.ts'\n\nconst locator = new ModuleFactoryLocator()\nlocator.register(IndexedDbArchivist)\n\nexport const CustomDappParams: UnregisteredDapp['params'] = {\n iconSvg: CustomDappIconSvg,\n locator,\n}\n\nexport { CustomDappParams as default }\n","/* eslint-disable @stylistic/max-len */\nexport const CustomDappIconSvg = `\n<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\">\n <path\n fill=\"transparent\"\n d=\"M6.44,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M18.01,27.91c-.55.55-.83,1.22-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83s-1.44.28-2,.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M33.56,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M36.55,26.94c-.82-.82-1.82-1.23-3-1.23-.32,0-.63.04-.93.11-.3.07-.59.17-.87.31l-5.87-8.09c-.18.03-.36.05-.56.05h-1.13l6.42,8.83c-.39.4-.7.85-.93,1.36-.23.51-.35,1.06-.35,1.66,0,1.18.41,2.17,1.23,3s1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3-.41-2.17-1.23-3ZM35.55,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M19.29,25.73c-1,.16-1.84.64-2.52,1.42-.67.79-1.01,1.7-1.01,2.75,0,1.18.41,2.17,1.23,3,.82.82,1.82,1.23,3,1.23s2.17-.41,3-1.23c.82-.82,1.23-1.82,1.23-3,0-1.05-.34-1.97-1.01-2.74-.67-.78-1.51-1.25-2.52-1.43v-7.65h-1.41v7.65ZM22,27.91c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M14.1,18l-5.89,8.08c-.28-.13-.56-.22-.86-.28-.29-.06-.6-.09-.91-.09-1.18,0-2.17.41-3,1.23-.82.82-1.23,1.82-1.23,3s.41,2.17,1.23,3,1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3c0-.6-.12-1.15-.36-1.66s-.56-.96-.95-1.36l6.45-8.83h-1c-.25,0-.48-.03-.7-.08ZM8.44,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,12.91c1.26,0,2.46.19,3.61.56,1.15.37,2.23.88,3.23,1.54V4.86c0-.44-.15-.82-.46-1.12s-.68-.46-1.12-.46h-10.52c-.44,0-.82.15-1.12.46s-.46.68-.46,1.12v10.15c1-.66,2.08-1.17,3.23-1.54s2.36-.56,3.61-.56ZM17.7,5.83c.63-.63,1.4-.95,2.3-.95s1.66.32,2.3.95.95,1.4.95,2.3-.32,1.66-.95,2.3-1.4.95-2.3.95-1.66-.32-2.3-.95-.95-1.4-.95-2.3.32-1.66.95-2.3Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,10.32c.6,0,1.12-.21,1.55-.64.43-.43.65-.94.65-1.55s-.22-1.12-.65-1.55c-.43-.43-.95-.65-1.55-.65s-1.12.22-1.55.65-.64.95-.64,1.55.21,1.12.64,1.55.94.64,1.55.64Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M20,11.37c.9,0,1.66-.32,2.3-.95s.95-1.4.95-2.3-.32-1.66-.95-2.3-1.4-.95-2.3-.95-1.66.32-2.3.95-.95,1.4-.95,2.3.32,1.66.95,2.3,1.4.95,2.3.95ZM18.45,6.58c.43-.43.95-.65,1.55-.65s1.12.22,1.55.65c.43.43.65.95.65,1.55s-.22,1.12-.65,1.55c-.43.43-.95.64-1.55.64s-1.12-.21-1.55-.64-.64-.95-.64-1.55.21-1.12.64-1.55Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M27.21,2.9c-.5-.5-1.15-.75-1.95-.75h-10.52c-.8,0-1.45.25-1.95.75-.5.5-.75,1.15-.75,1.95v10.52c0,.8.25,1.45.75,1.95.35.35.77.56,1.25.67.22.05.45.08.7.08h10.52c.2,0,.38-.02.56-.05.55-.09,1.01-.33,1.39-.71.5-.5.75-1.15.75-1.95V4.86c0-.8-.25-1.45-.75-1.95ZM25.93,16.74c-.26.14-.55.22-.86.22h-10.15s-.08-.01-.12-.01c-.25-.02-.5-.08-.74-.2-.28-.14-.45-.35-.5-.63.99-.7,2.03-1.22,3.12-1.57s2.19-.52,3.31-.52,2.27.18,3.4.55c1.13.36,2.18.88,3.16,1.54-.15.27-.36.48-.63.63ZM26.84,15.01c-1-.66-2.08-1.17-3.23-1.54-1.15-.37-2.36-.56-3.61-.56s-2.46.19-3.61.56-2.23.88-3.23,1.54V4.86c0-.44.15-.82.46-1.12s.68-.46,1.12-.46h10.52c.44,0,.82.15,1.12.46s.46.68.46,1.12v10.15Z\"\n />\n </svg>\n `\n","/* eslint-disable @stylistic/max-len */\nimport type {\n DappConfig,\n DappIcon,\n DappName,\n DappNavItem,\n DappNavMenuConfig,\n DappPackageManifestPayload,\n DappVersion,\n} from '@xyo-network/os-model'\nimport {\n DappConfigSchema,\n DappIconSchema,\n DappMode,\n DappNavItemSchema,\n DappNavMenuConfigSchema,\n} from '@xyo-network/os-model'\n\nimport dappManifest from './dapp.manifest.json'\n\nexport const CustomDappName: DappName = 'Custom Dapp' as const\n\nconst version: DappVersion = '1.0.0'\n\nexport const CustomDappConfig: DappConfig = {\n manifest: dappManifest as DappPackageManifestPayload,\n modes: [DappMode.Window],\n name: CustomDappName,\n schema: DappConfigSchema,\n sources: ['network.xyo.dapp.accounts.source'],\n version,\n}\n\nexport const CustomDappIcon: DappIcon = {\n active: false,\n installed: 'installed',\n name: CustomDappName,\n schema: DappIconSchema,\n type: 'system',\n version,\n}\n\nexport const DappPayloads = [CustomDappConfig, CustomDappIcon]\n\nexport type CustomDappMenuItemPaths = 'home' | 'settings'\n\nconst CustomDappMenuItems: DappNavItem<CustomDappMenuItemPaths>[] = [\n {\n path: 'home',\n primaryText: 'Home',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n {\n path: 'settings',\n primaryText: 'Settings',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n]\n\nconst CustomDappMenuConfig: DappNavMenuConfig = {\n defaultPath: 'home',\n schema: DappNavMenuConfigSchema,\n}\n\nexport const CustomDappMenuPayloads = [...CustomDappMenuItems, CustomDappMenuConfig]\n","import { ErrorRender } from '@xylabs/react-error'\nimport { DappPathSwitcher, useAddDappMenuItems } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { CustomDappPathToComponent } from '../components/index.ts'\nimport { CustomDappMenuPayloads } from '../Payloads.js'\n\nexport const CustomDapp = () => {\n const {\n menuConfig, path, error,\n } = useAddDappMenuItems(CustomDappMenuPayloads)\n\n return (\n <>\n <ErrorRender error={error} scope=\"CustomDapp\" />\n <DappPathSwitcher activePath={path?.path ?? menuConfig?.defaultPath} pathToComponent={CustomDappPathToComponent} />\n </>\n )\n}\n","import { FlexRow } from '@xylabs/react-flexbox'\nimport type { PathToComponent } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nexport const CustomDappPathToComponent: PathToComponent[] = [\n {\n component: <FlexRow />,\n path: 'home',\n },\n]\n","import type { UnregisteredReactDapp } from '@xyo-network/os-react-model'\n\nimport { CustomDappParams } from './Params.js'\nimport { CustomDapp } from './window/index.ts'\n\nexport const CustomDappUiParams: UnregisteredReactDapp['params'] = {\n ...CustomDappParams,\n modes: { window: { component: CustomDapp }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C,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN;AACF;AAEO,IAAM,eAAe,CAAC,kBAAkB,cAAc;AAI7D,IAAM,sBAA8D;AAAA,EAClE;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,SAAS;AAAA;AAAA;AAAA,IAGT,QAAQ;AAAA,EACV;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,SAAS;AAAA;AAAA;AAAA,IAGT,QAAQ;AAAA,EACV;AACF;AAEA,IAAM,uBAA0C;AAAA,EAC9C,aAAa;AAAA,EACb,QAAQ;AACV;AAEO,IAAM,yBAAyB,CAAC,GAAG,qBAAqB,oBAAoB;;;ACxEnF,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB,2BAA2B;;;ACDtD,SAAS,eAAe;AAMT;AAFR,IAAM,4BAA+C;AAAA,EAC1D;AAAA,IACE,WAAW,oBAAC,WAAQ;AAAA,IACpB,MAAM;AAAA,EACR;AACF;;;ADII,mBACE,OAAAA,MADF;AANG,IAAM,aAAa,MAAM;AAC9B,QAAM;AAAA,IACJ;AAAA,IAAY;AAAA,IAAM;AAAA,EACpB,IAAI,oBAAoB,sBAAsB;AAE9C,SACE,iCACE;AAAA,oBAAAA,KAAC,eAAY,OAAc,OAAM,cAAa;AAAA,IAC9C,gBAAAA,KAAC,oBAAiB,YAAY,MAAM,QAAQ,YAAY,aAAa,iBAAiB,2BAA2B;AAAA,KACnH;AAEJ;;;AEbO,IAAM,qBAAsD;AAAA,EACjE,GAAG;AAAA,EACH,OAAO,EAAE,QAAQ,EAAE,WAAW,WAAW,EAAE;AAC7C;","names":["jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/dapp.manifest.json","../../src/Params.ts","../../src/icon/Icon.tsx","../../src/Payloads.ts","../../src/window/Dapp.tsx","../../src/components/Dapp.tsx","../../src/UiParams.ts"],"sourcesContent":["{\n \"$schema\": \"https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/compilations/dapp-package-manifest-schema.json\",\n \"nodes\": [\n {\n \"config\": {\n \"accountPath\": \"0'\",\n \"name\": \"Node\",\n \"schema\": \"network.xyo.node.config\"\n },\n \"modules\": {\n \"private\": [],\n \"public\": [\n {\n \"config\": {\n \"accountPath\": \"1'\",\n \"name\": \"DappArchivist\",\n \"dbName\": \"DappArchivist\",\n \"storeName\": \"payloads\",\n \"schema\": \"network.xyo.archivist.config\",\n \"labels\": {\n \"network.xyo.archivist.persistence.scope\": \"device\"\n }\n }\n }\n ]\n }\n }\n ],\n \"schema\": \"network.xyo.manifest.package.dapp\"\n}","import { IndexedDbArchivist } from '@xyo-network/archivist-indexeddb'\nimport { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport type { UnregisteredDapp } from '@xyo-network/os-model'\n\nimport { CustomDappIconSvg } from './icon/index.ts'\n\nconst locator = new ModuleFactoryLocator()\nlocator.register(IndexedDbArchivist)\n\nexport const CustomDappParams: UnregisteredDapp['params'] = {\n iconSvg: CustomDappIconSvg,\n locator,\n}\n\nexport { CustomDappParams as default }\n","/* eslint-disable @stylistic/max-len */\nexport const CustomDappIconSvg = `\n<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\">\n <path\n fill=\"transparent\"\n d=\"M6.44,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M18.01,27.91c-.55.55-.83,1.22-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83s-1.44.28-2,.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M33.56,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M36.55,26.94c-.82-.82-1.82-1.23-3-1.23-.32,0-.63.04-.93.11-.3.07-.59.17-.87.31l-5.87-8.09c-.18.03-.36.05-.56.05h-1.13l6.42,8.83c-.39.4-.7.85-.93,1.36-.23.51-.35,1.06-.35,1.66,0,1.18.41,2.17,1.23,3s1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3-.41-2.17-1.23-3ZM35.55,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M19.29,25.73c-1,.16-1.84.64-2.52,1.42-.67.79-1.01,1.7-1.01,2.75,0,1.18.41,2.17,1.23,3,.82.82,1.82,1.23,3,1.23s2.17-.41,3-1.23c.82-.82,1.23-1.82,1.23-3,0-1.05-.34-1.97-1.01-2.74-.67-.78-1.51-1.25-2.52-1.43v-7.65h-1.41v7.65ZM22,27.91c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M14.1,18l-5.89,8.08c-.28-.13-.56-.22-.86-.28-.29-.06-.6-.09-.91-.09-1.18,0-2.17.41-3,1.23-.82.82-1.23,1.82-1.23,3s.41,2.17,1.23,3,1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3c0-.6-.12-1.15-.36-1.66s-.56-.96-.95-1.36l6.45-8.83h-1c-.25,0-.48-.03-.7-.08ZM8.44,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,12.91c1.26,0,2.46.19,3.61.56,1.15.37,2.23.88,3.23,1.54V4.86c0-.44-.15-.82-.46-1.12s-.68-.46-1.12-.46h-10.52c-.44,0-.82.15-1.12.46s-.46.68-.46,1.12v10.15c1-.66,2.08-1.17,3.23-1.54s2.36-.56,3.61-.56ZM17.7,5.83c.63-.63,1.4-.95,2.3-.95s1.66.32,2.3.95.95,1.4.95,2.3-.32,1.66-.95,2.3-1.4.95-2.3.95-1.66-.32-2.3-.95-.95-1.4-.95-2.3.32-1.66.95-2.3Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,10.32c.6,0,1.12-.21,1.55-.64.43-.43.65-.94.65-1.55s-.22-1.12-.65-1.55c-.43-.43-.95-.65-1.55-.65s-1.12.22-1.55.65-.64.95-.64,1.55.21,1.12.64,1.55.94.64,1.55.64Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M20,11.37c.9,0,1.66-.32,2.3-.95s.95-1.4.95-2.3-.32-1.66-.95-2.3-1.4-.95-2.3-.95-1.66.32-2.3.95-.95,1.4-.95,2.3.32,1.66.95,2.3,1.4.95,2.3.95ZM18.45,6.58c.43-.43.95-.65,1.55-.65s1.12.22,1.55.65c.43.43.65.95.65,1.55s-.22,1.12-.65,1.55c-.43.43-.95.64-1.55.64s-1.12-.21-1.55-.64-.64-.95-.64-1.55.21-1.12.64-1.55Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M27.21,2.9c-.5-.5-1.15-.75-1.95-.75h-10.52c-.8,0-1.45.25-1.95.75-.5.5-.75,1.15-.75,1.95v10.52c0,.8.25,1.45.75,1.95.35.35.77.56,1.25.67.22.05.45.08.7.08h10.52c.2,0,.38-.02.56-.05.55-.09,1.01-.33,1.39-.71.5-.5.75-1.15.75-1.95V4.86c0-.8-.25-1.45-.75-1.95ZM25.93,16.74c-.26.14-.55.22-.86.22h-10.15s-.08-.01-.12-.01c-.25-.02-.5-.08-.74-.2-.28-.14-.45-.35-.5-.63.99-.7,2.03-1.22,3.12-1.57s2.19-.52,3.31-.52,2.27.18,3.4.55c1.13.36,2.18.88,3.16,1.54-.15.27-.36.48-.63.63ZM26.84,15.01c-1-.66-2.08-1.17-3.23-1.54-1.15-.37-2.36-.56-3.61-.56s-2.46.19-3.61.56-2.23.88-3.23,1.54V4.86c0-.44.15-.82.46-1.12s.68-.46,1.12-.46h10.52c.44,0,.82.15,1.12.46s.46.68.46,1.12v10.15Z\"\n />\n </svg>\n `\n","/* eslint-disable @stylistic/max-len */\nimport type {\n DappConfig,\n DappIcon,\n DappName,\n DappNavItem,\n DappNavMenuConfig,\n DappPackageManifestPayload,\n DappVersion,\n} from '@xyo-network/os-model'\nimport {\n DappConfigSchema,\n DappIconSchema,\n DappMode,\n DappNavItemSchema,\n DappNavMenuConfigSchema,\n} from '@xyo-network/os-model'\n\nimport dappManifest from './dapp.manifest.json' assert { type: 'json' }\n\nexport const CustomDappName: DappName = 'Custom Dapp' as const\n\nconst version: DappVersion = '1.0.0'\n\nexport const CustomDappConfig: DappConfig = {\n manifest: dappManifest as DappPackageManifestPayload,\n modes: [DappMode.Window],\n name: CustomDappName,\n schema: DappConfigSchema,\n sources: ['network.xyo.dapp.accounts.source'],\n version,\n}\n\nexport const CustomDappIcon: DappIcon = {\n active: false,\n installed: 'installed',\n name: CustomDappName,\n schema: DappIconSchema,\n type: 'system',\n version,\n}\n\nexport const DappPayloads = [CustomDappConfig, CustomDappIcon]\n\nexport type CustomDappMenuItemPaths = 'home' | 'settings'\n\nconst CustomDappMenuItems: DappNavItem<CustomDappMenuItemPaths>[] = [\n {\n path: 'home',\n primaryText: 'Home',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n {\n path: 'settings',\n primaryText: 'Settings',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n]\n\nconst CustomDappMenuConfig: DappNavMenuConfig = {\n defaultPath: 'home',\n schema: DappNavMenuConfigSchema,\n}\n\nexport const CustomDappMenuPayloads = [...CustomDappMenuItems, CustomDappMenuConfig]\n","import { ErrorRender } from '@xylabs/react-error'\nimport { DappPathSwitcher, useAddDappMenuItems } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { CustomDappPathToComponent } from '../components/index.ts'\nimport { CustomDappMenuPayloads } from '../Payloads.js'\n\nexport const CustomDapp = () => {\n const {\n menuConfig, path, error,\n } = useAddDappMenuItems(CustomDappMenuPayloads)\n\n return (\n <>\n <ErrorRender error={error} scope=\"CustomDapp\" />\n <DappPathSwitcher activePath={path?.path ?? menuConfig?.defaultPath} pathToComponent={CustomDappPathToComponent} />\n </>\n )\n}\n","import { FlexRow } from '@xylabs/react-flexbox'\nimport type { PathToComponent } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nexport const CustomDappPathToComponent: PathToComponent[] = [\n {\n component: <FlexRow />,\n path: 'home',\n },\n]\n","import type { UnregisteredReactDapp } from '@xyo-network/os-react-model'\n\nimport { CustomDappParams } from './Params.js'\nimport { CustomDapp } from './window/index.ts'\n\nexport const CustomDappUiParams: UnregisteredReactDapp['params'] = {\n ...CustomDappParams,\n modes: { window: { component: CustomDapp } },\n}\n\nexport { CustomDappUiParams as default }\n"],"mappings":";AAAA;AAAA,EACE,SAAW;AAAA,EACX,OAAS;AAAA,IACP;AAAA,MACE,QAAU;AAAA,QACR,aAAe;AAAA,QACf,MAAQ;AAAA,QACR,QAAU;AAAA,MACZ;AAAA,MACA,SAAW;AAAA,QACT,SAAW,CAAC;AAAA,QACZ,QAAU;AAAA,UACR;AAAA,YACE,QAAU;AAAA,cACR,aAAe;AAAA,cACf,MAAQ;AAAA,cACR,QAAU;AAAA,cACV,WAAa;AAAA,cACb,QAAU;AAAA,cACV,QAAU;AAAA,gBACR,2CAA2C;AAAA,cAC7C;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,QAAU;AACZ;;;AC7BA,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;;;ACA9B,IAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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A,IAAM;AAAA,EACpB,IAAI,oBAAoB,sBAAsB;AAE9C,SACE,iCACE;AAAA,oBAAAA,KAAC,eAAY,OAAc,OAAM,cAAa;AAAA,IAC9C,gBAAAA,KAAC,oBAAiB,YAAY,MAAM,QAAQ,YAAY,aAAa,iBAAiB,2BAA2B;AAAA,KACnH;AAEJ;;;AEbO,IAAM,qBAAsD;AAAA,EACjE,GAAG;AAAA,EACH,OAAO,EAAE,QAAQ,EAAE,WAAW,WAAW,EAAE;AAC7C;","names":["jsx"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/dapp-template",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -33,42 +33,42 @@
|
|
|
33
33
|
"module": "dist/neutral/index.mjs",
|
|
34
34
|
"types": "dist/neutral/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@emotion/react": "^11.
|
|
37
|
-
"@emotion/styled": "^11.
|
|
38
|
-
"@mui/icons-material": "^6.1
|
|
36
|
+
"@emotion/react": "^11.14.0",
|
|
37
|
+
"@emotion/styled": "^11.14.0",
|
|
38
|
+
"@mui/icons-material": "^6.2.1",
|
|
39
39
|
"@xylabs/pixel": "^2.0.6",
|
|
40
|
-
"@xylabs/react-error": "^5.
|
|
41
|
-
"@xylabs/react-flexbox": "^5.
|
|
42
|
-
"@xylabs/react-promise": "^5.
|
|
43
|
-
"@xyo-network/account": "^3.
|
|
44
|
-
"@xyo-network/archivist-indexeddb": "^3.
|
|
45
|
-
"@xyo-network/kernel": "^4.0
|
|
46
|
-
"@xyo-network/kernel-model": "^4.0
|
|
47
|
-
"@xyo-network/module-factory-locator": "^3.
|
|
48
|
-
"@xyo-network/object": "^3.
|
|
49
|
-
"@xyo-network/os-model": "^4.0
|
|
50
|
-
"@xyo-network/os-react-model": "^4.0
|
|
51
|
-
"@xyo-network/os-react-runtime": "^4.0
|
|
52
|
-
"@xyo-network/os-runtime": "^4.0
|
|
53
|
-
"@xyo-network/payload-model": "^3.
|
|
54
|
-
"@xyo-network/react-node": "^4.
|
|
55
|
-
"@xyo-network/react-sdk": "^4.
|
|
56
|
-
"react-router-dom": "^
|
|
40
|
+
"@xylabs/react-error": "^5.3.13",
|
|
41
|
+
"@xylabs/react-flexbox": "^5.3.13",
|
|
42
|
+
"@xylabs/react-promise": "^5.3.13",
|
|
43
|
+
"@xyo-network/account": "^3.6.0",
|
|
44
|
+
"@xyo-network/archivist-indexeddb": "^3.6.0",
|
|
45
|
+
"@xyo-network/kernel": "^4.1.0",
|
|
46
|
+
"@xyo-network/kernel-model": "^4.1.0",
|
|
47
|
+
"@xyo-network/module-factory-locator": "^3.6.0",
|
|
48
|
+
"@xyo-network/object": "^3.6.0",
|
|
49
|
+
"@xyo-network/os-model": "^4.1.0",
|
|
50
|
+
"@xyo-network/os-react-model": "^4.1.0",
|
|
51
|
+
"@xyo-network/os-react-runtime": "^4.1.0",
|
|
52
|
+
"@xyo-network/os-runtime": "^4.1.0",
|
|
53
|
+
"@xyo-network/payload-model": "^3.6.0",
|
|
54
|
+
"@xyo-network/react-node": "^4.3.0",
|
|
55
|
+
"@xyo-network/react-sdk": "^4.3.0",
|
|
56
|
+
"react-router-dom": "^7.1.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@mui/material": "^6.1
|
|
60
|
-
"@mui/styles": "^6.1
|
|
61
|
-
"@storybook/react": "^8.
|
|
62
|
-
"@types/react": "^18.3.
|
|
63
|
-
"@xylabs/ts-scripts-yarn3": "^4.2.
|
|
64
|
-
"@xylabs/tsconfig": "^4.2.
|
|
65
|
-
"@xylabs/tsconfig-dom": "^4.2.
|
|
66
|
-
"@xylabs/tsconfig-react": "^4.2.
|
|
59
|
+
"@mui/material": "^6.2.1",
|
|
60
|
+
"@mui/styles": "^6.2.1",
|
|
61
|
+
"@storybook/react": "^8.4.7",
|
|
62
|
+
"@types/react": "^18.3.18",
|
|
63
|
+
"@xylabs/ts-scripts-yarn3": "^4.2.6",
|
|
64
|
+
"@xylabs/tsconfig": "^4.2.6",
|
|
65
|
+
"@xylabs/tsconfig-dom": "^4.2.6",
|
|
66
|
+
"@xylabs/tsconfig-react": "^4.2.6",
|
|
67
67
|
"react": "^18.3.1",
|
|
68
68
|
"react-dom": "^18.3.1",
|
|
69
69
|
"react-helmet": "^6.1.0",
|
|
70
|
-
"storybook": "^8.
|
|
71
|
-
"typescript": "^5.
|
|
70
|
+
"storybook": "^8.4.7",
|
|
71
|
+
"typescript": "^5.7.2"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@mui/material": "^6.1.0",
|
package/src/Payloads.ts
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
DappNavMenuConfigSchema,
|
|
17
17
|
} from '@xyo-network/os-model'
|
|
18
18
|
|
|
19
|
-
import dappManifest from './dapp.manifest.json'
|
|
19
|
+
import dappManifest from './dapp.manifest.json' assert { type: 'json' }
|
|
20
20
|
|
|
21
21
|
export const CustomDappName: DappName = 'Custom Dapp' as const
|
|
22
22
|
|