@ibgib/web-gib 0.0.63 → 0.0.65
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/README.md +4 -0
- package/dist/AUTO-GENERATED-version.d.mts +1 -1
- package/dist/AUTO-GENERATED-version.mjs +1 -1
- package/dist/api/commands/ibgib/get-ibgibs.mjs +4 -4
- package/dist/api/commands/ibgib/get-ibgibs.mjs.map +1 -1
- package/dist/identity/device-delegate-helper.mjs +5 -5
- package/dist/identity/device-delegate-helper.mjs.map +1 -1
- package/dist/identity/keystone-sync-service.mjs +3 -3
- package/dist/identity/keystone-sync-service.mjs.map +1 -1
- package/dist/index.d.mts +4 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/dist/storage/storage-helpers.web.mjs +1 -1
- package/dist/storage/storage-helpers.web.mjs.map +1 -1
- package/dist/ui/component/identity/add-device/add-device.d.mts.map +1 -1
- package/dist/ui/component/identity/add-device/add-device.mjs +1 -1
- package/dist/ui/component/identity/add-device/add-device.mjs.map +1 -1
- package/dist/ui/component/identity/identity-header/identity-header.d.mts.map +1 -1
- package/dist/ui/component/identity/identity-header/identity-header.mjs +4 -4
- package/dist/ui/component/identity/identity-header/identity-header.mjs.map +1 -1
- package/dist/ui/component/identity/keystone-details/keystone-details.mjs +2 -2
- package/dist/ui/component/identity/keystone-details/keystone-details.mjs.map +1 -1
- package/dist/ui/component/privacy-policy/index.d.mts +11 -0
- package/dist/ui/component/privacy-policy/index.d.mts.map +1 -0
- package/dist/ui/component/privacy-policy/index.mjs +16 -0
- package/dist/ui/component/privacy-policy/index.mjs.map +1 -0
- package/dist/ui/component/privacy-policy/privacy-policy.css +263 -0
- package/dist/ui/component/privacy-policy/privacy-policy.d.mts +46 -0
- package/dist/ui/component/privacy-policy/privacy-policy.d.mts.map +1 -0
- package/dist/ui/component/privacy-policy/privacy-policy.html +27 -0
- package/dist/ui/component/privacy-policy/privacy-policy.mjs +128 -0
- package/dist/ui/component/privacy-policy/privacy-policy.mjs.map +1 -0
- package/dist/ui/ui-constants.d.mts +4 -0
- package/dist/ui/ui-constants.d.mts.map +1 -1
- package/dist/ui/ui-constants.mjs +6 -0
- package/dist/ui/ui-constants.mjs.map +1 -1
- package/dist/witness/agent/gemini/gemini-helpers.mjs +4 -4
- package/dist/witness/agent/gemini/gemini-helpers.mjs.map +1 -1
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.d.mts +7 -0
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.d.mts.map +1 -0
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.mjs +7 -0
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.mjs.map +1 -0
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.d.mts +24 -0
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.d.mts.map +1 -0
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.mjs +23 -0
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.mjs.map +1 -0
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.d.mts +85 -0
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.d.mts.map +1 -0
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mjs +343 -0
- package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mjs.map +1 -0
- package/package.json +5 -5
- package/src/AUTO-GENERATED-version.mts +1 -1
- package/src/api/commands/ibgib/get-ibgibs.mts +4 -4
- package/src/helpers.mts +1 -1
- package/src/helpers.web.respec.mts +41 -10
- package/src/identity/device-delegate-helper.mts +5 -5
- package/src/identity/keystone-sync-service.mts +3 -3
- package/src/index.mts +8 -0
- package/src/storage/storage-helpers.web.mts +1 -1
- package/src/ui/component/identity/add-device/add-device.mts +5 -4
- package/src/ui/component/identity/identity-header/identity-header.mts +4 -3
- package/src/ui/component/identity/keystone-details/keystone-details.mts +2 -2
- package/src/ui/component/privacy-policy/index.mts +18 -0
- package/src/ui/component/privacy-policy/privacy-policy.css +263 -0
- package/src/ui/component/privacy-policy/privacy-policy.html +27 -0
- package/src/ui/component/privacy-policy/privacy-policy.mts +168 -0
- package/src/ui/ui-constants.mts +7 -0
- package/src/witness/agent/gemini/gemini-helpers.mts +4 -4
- package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.mts +8 -0
- package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.mts +53 -0
- package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mts +424 -0
- package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.respec.mts +305 -0
- package/tools/auto-generated-agent-skills/skills/ibgib-create-app/SKILL.md +65 -39
- package/tools/auto-generated-agent-skills/skills/ibgib-create-client-app/SKILL.md +51 -0
- package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/SKILL.md +26 -22
- package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/generate-id.js +1 -1
- package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/SKILL.md +11 -7
- package/tools/auto-generated-agent-skills/skills/ibgib-create-client-identity/SKILL.md +78 -0
- package/tools/auto-generated-agent-skills/skills/ibgib-create-client-shell/SKILL.md +42 -0
- package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-server → ibgib-create-server-app}/SKILL.md +6 -6
- package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/Dockerfile.template +14 -0
- package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/docker-compose.yml.template +33 -0
- package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/server.mts.template +97 -0
- package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/tsconfig.server.json.template +29 -0
- package/tools/auto-generated-agent-skills/skills/ibgib-implementation-plan/SKILL.md +11 -5
- package/tsconfig.json +2 -2
- package/dist/api/commands/command-service.respec.d.mts +0 -7
- package/dist/api/commands/command-service.respec.d.mts.map +0 -1
- package/dist/api/commands/command-service.respec.mjs +0 -66
- package/dist/api/commands/command-service.respec.mjs.map +0 -1
- package/dist/assumptions.respec.d.mts +0 -2
- package/dist/assumptions.respec.d.mts.map +0 -1
- package/dist/assumptions.respec.mjs +0 -41
- package/dist/assumptions.respec.mjs.map +0 -1
- package/dist/helpers.web.respec.d.mts +0 -2
- package/dist/helpers.web.respec.d.mts.map +0 -1
- package/dist/helpers.web.respec.mjs +0 -12
- package/dist/helpers.web.respec.mjs.map +0 -1
- package/dist/identity/device-delegate.respec.d.mts +0 -2
- package/dist/identity/device-delegate.respec.d.mts.map +0 -1
- package/dist/identity/device-delegate.respec.mjs +0 -106
- package/dist/identity/device-delegate.respec.mjs.map +0 -1
- package/dist/identity/passkey.respec.d.mts +0 -2
- package/dist/identity/passkey.respec.d.mts.map +0 -1
- package/dist/identity/passkey.respec.mjs +0 -169
- package/dist/identity/passkey.respec.mjs.map +0 -1
- package/dist/spec-helper.node.respec.d.mts +0 -13
- package/dist/spec-helper.node.respec.d.mts.map +0 -1
- package/dist/spec-helper.node.respec.mjs +0 -50
- package/dist/spec-helper.node.respec.mjs.map +0 -1
- package/dist/util/device-helper.respec.d.mts +0 -2
- package/dist/util/device-helper.respec.d.mts.map +0 -1
- package/dist/util/device-helper.respec.mjs +0 -83
- package/dist/util/device-helper.respec.mjs.map +0 -1
- package/tools/auto-generated-agent-skills/skills/ibgib-create-shell/SKILL.md +0 -40
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/generate-version-file.js +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/bootstrap.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/constants.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/declarations.d.ts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/helpers.web.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/index.html.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/index.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/script.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/types.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/api/function-infos.web.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/witness/app/app-v1.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/witness/app/constants.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/witness/app/helper.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/witness/app/types.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-shell → ibgib-create-client-shell}/templates/ui/shell/shell-constants.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-shell → ibgib-create-client-shell}/templates/ui/shell/shell-service.mts.template +0 -0
- /package/tools/auto-generated-agent-skills/skills/{ibgib-create-shell → ibgib-create-client-shell}/templates/ui/shell/shell-types.mts.template +0 -0
package/src/index.mts
CHANGED
|
@@ -25,7 +25,15 @@ export * from "./identity/passkey-helper.mjs";
|
|
|
25
25
|
// Identity UI components
|
|
26
26
|
export * from "./ui/component/identity/index.mjs";
|
|
27
27
|
|
|
28
|
+
// Privacy Policy component
|
|
29
|
+
export * from "./ui/component/privacy-policy/index.mjs";
|
|
30
|
+
|
|
28
31
|
// UI constants & types
|
|
29
32
|
export * from "./ui/ui-constants.mjs";
|
|
30
33
|
export * from "./ui/ui-types.mjs";
|
|
31
34
|
|
|
35
|
+
// Workspace Projection Spaces
|
|
36
|
+
export * from "./witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mjs";
|
|
37
|
+
export * from "./witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.mjs";
|
|
38
|
+
export * from "./witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.mjs";
|
|
39
|
+
|
|
@@ -744,7 +744,7 @@ export async function storageDelete({
|
|
|
744
744
|
const lc = `[${storageDelete.name}]`;
|
|
745
745
|
let db: IDBDatabase | undefined = undefined;
|
|
746
746
|
try {
|
|
747
|
-
if (logalot) { console.log(`${lc} starting... (I:
|
|
747
|
+
if (logalot) { console.log(`${lc} starting... (I: genuuid)`); }
|
|
748
748
|
await new Promise<void>((resolve, reject) => {
|
|
749
749
|
const openDBRequest = indexedDB.open(dbName);
|
|
750
750
|
openDBRequest.onerror = () => {
|
|
@@ -7,11 +7,12 @@ import { IbGibAddr } from "@ibgib/ts-gib/dist/types.mjs";
|
|
|
7
7
|
import { IbGib_V1 } from "@ibgib/ts-gib/dist/V1/types.mjs";
|
|
8
8
|
import { getIbGibAddr } from "@ibgib/ts-gib/dist/helper.mjs";
|
|
9
9
|
import { KeystoneService_V1 } from "@ibgib/core-gib/dist/keystone/keystone-service-v1.mjs";
|
|
10
|
-
import { KeystoneProfileBuilder } from "@ibgib/core-gib/dist/keystone/policy/keystone-profile-builder.mjs";
|
|
11
10
|
import { KeystoneIbGib_V1 } from "@ibgib/core-gib/dist/keystone/keystone-types.mjs";
|
|
12
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
KEYSTONE_USERNAME_REGEXP, KEYSTONE_VERB_SYNC, KEYSTONE_VERB_CONNECT
|
|
13
|
+
} from "@ibgib/core-gib/dist/keystone/keystone-constants.mjs";
|
|
13
14
|
import { deriveDelegateSecret, createSyncDelegateKeystone } from "@ibgib/core-gib/dist/keystone/delegate/delegate-helpers.mjs";
|
|
14
|
-
import { getTimelinesGroupedByTjp,
|
|
15
|
+
import { getTimelinesGroupedByTjp, toDto } from "@ibgib/core-gib/dist/common/other/ibgib-helper.mjs";
|
|
15
16
|
import { updateSpecialIndex } from "@ibgib/core-gib/dist/timeline/timeline-api.mjs";
|
|
16
17
|
import { validateEmail } from "@ibgib/core-gib/dist/keystone/keystone-helpers.mjs";
|
|
17
18
|
import { FlatIbGibGraph } from "@ibgib/core-gib/dist/common/other/graph-types.mjs";
|
|
@@ -589,7 +590,7 @@ export class AddDeviceComponentInstance
|
|
|
589
590
|
|
|
590
591
|
const sovereignSyncProfileName = process.env.KEYSTONE_PROFILE_SOVEREIGN_SYNC;
|
|
591
592
|
if (!sovereignSyncProfileName || !sovereignSyncProfileName.trim()) {
|
|
592
|
-
throw new Error('KEYSTONE_PROFILE_SOVEREIGN_SYNC environment variable is missing. Expected valid profile name like "sync-profile.dev" or "sync-profile.prod". (E:
|
|
593
|
+
throw new Error('KEYSTONE_PROFILE_SOVEREIGN_SYNC environment variable is missing. Expected valid profile name like "sync-profile.dev" or "sync-profile.prod". (E: genuuid)');
|
|
593
594
|
}
|
|
594
595
|
|
|
595
596
|
const delegateKeystone = await createSyncDelegateKeystone({
|
|
@@ -22,6 +22,7 @@ import { getDeterministicColorInfo, getGlobalMetaspace_waitIfNeeded } from "../.
|
|
|
22
22
|
import {
|
|
23
23
|
EVENT_IBGIB_IDENTITY_REQUEST_CHANGE, EVENT_IBGIB_IDENTITY_CHANGED, EVENT_IBGIB_UI_MESSAGE,
|
|
24
24
|
EVENT_IBGIB_IDENTITY_UPDATE_AVAILABLE,
|
|
25
|
+
UI_ACTION_SHOW_IDENTITY_MANAGER, UI_ACTION_SHOW_KEYSTONE_CREATOR, UI_ACTION_SHOW_ADD_DEVICE
|
|
25
26
|
} from "../../../ui-constants.mjs";
|
|
26
27
|
import { EventIbGibIdentityUpdateAvailableDetail } from "../../../ui-types.mjs";
|
|
27
28
|
import { getKeystoneSyncService } from "../../../../identity/keystone-sync-service.mjs";
|
|
@@ -376,7 +377,7 @@ export class IdentityHeaderComponentInstance
|
|
|
376
377
|
e.stopPropagation();
|
|
377
378
|
this.closeDropdown();
|
|
378
379
|
window.dispatchEvent(new CustomEvent(EVENT_IBGIB_UI_MESSAGE, {
|
|
379
|
-
detail: { action:
|
|
380
|
+
detail: { action: UI_ACTION_SHOW_KEYSTONE_CREATOR },
|
|
380
381
|
bubbles: true,
|
|
381
382
|
composed: true
|
|
382
383
|
}));
|
|
@@ -386,7 +387,7 @@ export class IdentityHeaderComponentInstance
|
|
|
386
387
|
e.stopPropagation();
|
|
387
388
|
this.closeDropdown();
|
|
388
389
|
window.dispatchEvent(new CustomEvent(EVENT_IBGIB_UI_MESSAGE, {
|
|
389
|
-
detail: { action:
|
|
390
|
+
detail: { action: UI_ACTION_SHOW_ADD_DEVICE },
|
|
390
391
|
bubbles: true,
|
|
391
392
|
composed: true
|
|
392
393
|
}));
|
|
@@ -412,7 +413,7 @@ export class IdentityHeaderComponentInstance
|
|
|
412
413
|
|
|
413
414
|
private navigateToManager() {
|
|
414
415
|
window.dispatchEvent(new CustomEvent(EVENT_IBGIB_UI_MESSAGE, {
|
|
415
|
-
detail: { action:
|
|
416
|
+
detail: { action: UI_ACTION_SHOW_IDENTITY_MANAGER },
|
|
416
417
|
bubbles: true,
|
|
417
418
|
composed: true
|
|
418
419
|
}));
|
|
@@ -943,11 +943,11 @@ export class KeystoneDetailsComponentInstance
|
|
|
943
943
|
|
|
944
944
|
const metaspace = await getGlobalMetaspace_waitIfNeeded();
|
|
945
945
|
if (!metaspace) {
|
|
946
|
-
throw new Error(`(UNEXPECTED) metaspace falsy? (E:
|
|
946
|
+
throw new Error(`(UNEXPECTED) metaspace falsy? (E: genuuid)`);
|
|
947
947
|
}
|
|
948
948
|
const space = await metaspace.getLocalUserSpace({ lock: false });
|
|
949
949
|
if (!space) {
|
|
950
|
-
throw new Error(`(UNEXPECTED) space falsy? (E:
|
|
950
|
+
throw new Error(`(UNEXPECTED) space falsy? (E: genuuid)`);
|
|
951
951
|
}
|
|
952
952
|
const localSpaceId = space.ib ? parseSpaceIb({ spaceIb: space.ib }).spaceId : undefined;
|
|
953
953
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui/component/privacy-policy
|
|
3
|
+
*
|
|
4
|
+
* Privacy Policy UI component and registration helper.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export * from './privacy-policy.mjs';
|
|
8
|
+
|
|
9
|
+
import { getComponentSvc } from '../ibgib-component-service.mjs';
|
|
10
|
+
import { PrivacyPolicyComponentMeta } from './privacy-policy.mjs';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Registers the Privacy Policy UI component with the central component service.
|
|
14
|
+
*/
|
|
15
|
+
export async function registerPrivacyPolicyComponent(): Promise<void> {
|
|
16
|
+
const componentSvc = await getComponentSvc();
|
|
17
|
+
componentSvc.registerComponentMeta(new PrivacyPolicyComponentMeta());
|
|
18
|
+
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
ibgib — privacy-policy.css
|
|
3
|
+
Scoped styles for <ibgib-privacy-policy> Web Component.
|
|
4
|
+
Inherits CSS custom properties from the host application.
|
|
5
|
+
========================================================================= */
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
overflow-y: auto;
|
|
12
|
+
overflow-x: hidden;
|
|
13
|
+
color: var(--clr-text-primary, #e8f0e8);
|
|
14
|
+
font-family: var(--font-sans, system-ui, sans-serif);
|
|
15
|
+
line-height: 1.6;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.privacy-container {
|
|
20
|
+
max-width: 860px;
|
|
21
|
+
margin: 0 auto;
|
|
22
|
+
padding: 2rem 1.5rem 4rem;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* ── Header ── */
|
|
27
|
+
.privacy-header {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
padding-bottom: 1.25rem;
|
|
32
|
+
margin-bottom: 2rem;
|
|
33
|
+
border-bottom: 1px solid var(--clr-border, rgba(120, 248, 126, 0.12));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.btn-back {
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 0.5rem;
|
|
40
|
+
padding: 0.45rem 0.9rem;
|
|
41
|
+
font-size: 0.88rem;
|
|
42
|
+
font-family: inherit;
|
|
43
|
+
color: var(--clr-text-secondary, #8fa08f);
|
|
44
|
+
background: var(--clr-bg-glass, rgba(11, 17, 32, 0.7));
|
|
45
|
+
border: 1px solid var(--clr-border, rgba(120, 248, 126, 0.12));
|
|
46
|
+
border-radius: var(--radius-sm, 6px);
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition: all var(--t-fast, 120ms ease);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.btn-back:hover {
|
|
52
|
+
color: var(--clr-text-primary, #ffffff);
|
|
53
|
+
border-color: var(--clr-border-hover, rgba(120, 248, 126, 0.32));
|
|
54
|
+
background: var(--clr-accent-glow, rgba(120, 248, 126, 0.15));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.privacy-badge {
|
|
58
|
+
font-size: 0.85rem;
|
|
59
|
+
color: var(--clr-accent, #78f87e);
|
|
60
|
+
padding: 0.3rem 0.75rem;
|
|
61
|
+
border-radius: var(--radius-sm, 6px);
|
|
62
|
+
background: var(--clr-accent-glow, rgba(120, 248, 126, 0.1));
|
|
63
|
+
border: 1px solid var(--clr-border, rgba(120, 248, 126, 0.15));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* ── Loading State ── */
|
|
67
|
+
.privacy-loading {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
padding: 4rem 1rem;
|
|
73
|
+
gap: 1rem;
|
|
74
|
+
color: var(--clr-text-secondary, #8fa08f);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.spinner {
|
|
78
|
+
width: 32px;
|
|
79
|
+
height: 32px;
|
|
80
|
+
border: 3px solid var(--clr-border, rgba(120, 248, 126, 0.15));
|
|
81
|
+
border-top-color: var(--clr-accent, #78f87e);
|
|
82
|
+
border-radius: 50%;
|
|
83
|
+
animation: spin 0.8s linear infinite;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@keyframes spin {
|
|
87
|
+
to { transform: rotate(360deg); }
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* ── Error State ── */
|
|
91
|
+
.privacy-error {
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
padding: 3rem 1rem;
|
|
97
|
+
gap: 1rem;
|
|
98
|
+
color: var(--clr-danger, #ff5b5b);
|
|
99
|
+
background: rgba(255, 91, 91, 0.08);
|
|
100
|
+
border: 1px solid rgba(255, 91, 91, 0.25);
|
|
101
|
+
border-radius: var(--radius-md, 12px);
|
|
102
|
+
margin: 2rem 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.btn-retry {
|
|
106
|
+
padding: 0.4rem 1rem;
|
|
107
|
+
font-size: 0.88rem;
|
|
108
|
+
color: var(--clr-text-primary, #ffffff);
|
|
109
|
+
background: var(--clr-danger, #ff5b5b);
|
|
110
|
+
border: none;
|
|
111
|
+
border-radius: var(--radius-sm, 6px);
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* ── Markdown Rendered Typography ── */
|
|
116
|
+
.privacy-content {
|
|
117
|
+
display: block;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.privacy-content .policy-title {
|
|
121
|
+
font-size: 2.2rem;
|
|
122
|
+
color: var(--clr-text-primary, #ffffff);
|
|
123
|
+
margin-top: 0;
|
|
124
|
+
margin-bottom: 0.75rem;
|
|
125
|
+
line-height: 1.25;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.privacy-content .policy-h2 {
|
|
129
|
+
font-size: 1.35rem;
|
|
130
|
+
color: var(--clr-accent, #78f87e);
|
|
131
|
+
margin-top: 2.25rem;
|
|
132
|
+
margin-bottom: 0.75rem;
|
|
133
|
+
padding-bottom: 0.35rem;
|
|
134
|
+
border-bottom: 1px solid var(--clr-border, rgba(120, 248, 126, 0.12));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.privacy-content .policy-h3 {
|
|
138
|
+
font-size: 1.1rem;
|
|
139
|
+
color: var(--clr-text-primary, #e8f0e8);
|
|
140
|
+
margin-top: 1.5rem;
|
|
141
|
+
margin-bottom: 0.5rem;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.privacy-content .policy-h4 {
|
|
145
|
+
font-size: 0.95rem;
|
|
146
|
+
color: var(--clr-text-secondary, #8fa08f);
|
|
147
|
+
margin-top: 1.25rem;
|
|
148
|
+
margin-bottom: 0.4rem;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.privacy-content p {
|
|
152
|
+
color: var(--clr-text-primary, #e8f0e8);
|
|
153
|
+
font-size: 0.95rem;
|
|
154
|
+
margin: 0.75rem 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.privacy-content ul,
|
|
158
|
+
.privacy-content ol {
|
|
159
|
+
padding-left: 1.5rem;
|
|
160
|
+
margin: 0.5rem 0 1rem;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.privacy-content li {
|
|
164
|
+
color: var(--clr-text-primary, #e8f0e8);
|
|
165
|
+
font-size: 0.95rem;
|
|
166
|
+
margin-bottom: 0.35rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.privacy-content code {
|
|
170
|
+
font-family: var(--font-mono, monospace);
|
|
171
|
+
font-size: 0.85em;
|
|
172
|
+
background: rgba(255, 255, 255, 0.08);
|
|
173
|
+
padding: 0.15rem 0.35rem;
|
|
174
|
+
border-radius: 4px;
|
|
175
|
+
color: var(--clr-accent, #78f87e);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.privacy-content code.math {
|
|
179
|
+
color: var(--clr-info, #44aaff);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.privacy-content a {
|
|
183
|
+
color: var(--clr-accent, #78f87e);
|
|
184
|
+
text-decoration: underline;
|
|
185
|
+
transition: color var(--t-fast, 120ms ease);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.privacy-content a:hover {
|
|
189
|
+
color: var(--clr-border-hover, #a6fca9);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.privacy-content .divider {
|
|
193
|
+
border: 0;
|
|
194
|
+
border-top: 1px solid var(--clr-border, rgba(120, 248, 126, 0.12));
|
|
195
|
+
margin: 2.25rem 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* ── Alert Boxes ── */
|
|
199
|
+
.privacy-content .alert-box {
|
|
200
|
+
display: flex;
|
|
201
|
+
gap: 0.75rem;
|
|
202
|
+
padding: 1rem 1.25rem;
|
|
203
|
+
border-radius: var(--radius-sm, 6px);
|
|
204
|
+
margin: 1.25rem 0;
|
|
205
|
+
align-items: flex-start;
|
|
206
|
+
border: 1px solid var(--clr-border, rgba(120, 248, 126, 0.12));
|
|
207
|
+
background: var(--clr-bg-glass, rgba(11, 17, 32, 0.7));
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.privacy-content .alert-warning {
|
|
211
|
+
background: rgba(255, 204, 68, 0.08);
|
|
212
|
+
border-color: rgba(255, 204, 68, 0.3);
|
|
213
|
+
color: var(--clr-warn, #ffcc44);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.privacy-content .alert-important {
|
|
217
|
+
background: rgba(68, 170, 255, 0.08);
|
|
218
|
+
border-color: rgba(68, 170, 255, 0.3);
|
|
219
|
+
color: var(--clr-info, #44aaff);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.privacy-content .alert-note {
|
|
223
|
+
background: rgba(120, 248, 126, 0.08);
|
|
224
|
+
border-color: rgba(120, 248, 126, 0.3);
|
|
225
|
+
color: var(--clr-accent, #78f87e);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.privacy-content .alert-icon {
|
|
229
|
+
font-size: 1.2rem;
|
|
230
|
+
line-height: 1.2;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.privacy-content .alert-body {
|
|
234
|
+
font-size: 0.88rem;
|
|
235
|
+
line-height: 1.45;
|
|
236
|
+
color: var(--clr-text-primary, #e8f0e8);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* ── Footer ── */
|
|
240
|
+
.privacy-footer {
|
|
241
|
+
margin-top: 3.5rem;
|
|
242
|
+
padding-top: 1.5rem;
|
|
243
|
+
border-top: 1px solid var(--clr-border, rgba(120, 248, 126, 0.12));
|
|
244
|
+
font-size: 0.85rem;
|
|
245
|
+
color: var(--clr-text-secondary, #8fa08f);
|
|
246
|
+
display: flex;
|
|
247
|
+
justify-content: space-between;
|
|
248
|
+
flex-wrap: wrap;
|
|
249
|
+
gap: 1rem;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.privacy-footer a {
|
|
253
|
+
color: var(--clr-accent, #78f87e);
|
|
254
|
+
text-decoration: none;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.privacy-footer a:hover {
|
|
258
|
+
text-decoration: underline;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.hidden {
|
|
262
|
+
display: none !important;
|
|
263
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<div class="privacy-container">
|
|
2
|
+
<header class="privacy-header">
|
|
3
|
+
<button id="btn-back" class="btn-back" type="button">
|
|
4
|
+
<span class="icon">←</span>
|
|
5
|
+
<span>Return</span>
|
|
6
|
+
</button>
|
|
7
|
+
<span class="privacy-badge">🔒 Privacy Policy</span>
|
|
8
|
+
</header>
|
|
9
|
+
|
|
10
|
+
<div id="loading-spinner" class="privacy-loading">
|
|
11
|
+
<div class="spinner"></div>
|
|
12
|
+
<p>Loading Privacy Policy...</p>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div id="error-container" class="privacy-error hidden">
|
|
16
|
+
<p id="error-message">Unable to load Privacy Policy.</p>
|
|
17
|
+
<button id="btn-retry" class="btn-retry" type="button">Retry</button>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<main id="privacy-content" class="privacy-content hidden">
|
|
21
|
+
</main>
|
|
22
|
+
|
|
23
|
+
<footer class="privacy-footer">
|
|
24
|
+
<span>© ibgib contributors</span>
|
|
25
|
+
<span class="footer-link"><a href="https://ibgib.space" target="_blank" rel="noopener">ibgib.space</a></span>
|
|
26
|
+
</footer>
|
|
27
|
+
</div>
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import thisCss from "./privacy-policy.css";
|
|
2
|
+
import thisHtml from "./privacy-policy.html";
|
|
3
|
+
import commonComponentStylesCss from "../common-component-styles.css";
|
|
4
|
+
|
|
5
|
+
import { extractErrorMsg } from "@ibgib/helper-gib/dist/helpers/utils-helper.mjs";
|
|
6
|
+
import { convertMarkdownToHtml } from "@ibgib/helper-gib/dist/helpers/markdown-helper.mjs";
|
|
7
|
+
import { ROOT_ADDR } from "@ibgib/ts-gib/dist/V1/constants.mjs";
|
|
8
|
+
import { IbGibAddr } from "@ibgib/ts-gib/dist/types.mjs";
|
|
9
|
+
import { IbGib_V1 } from "@ibgib/ts-gib/dist/V1/types.mjs";
|
|
10
|
+
|
|
11
|
+
import { IbGibDynamicComponentMetaBase, IbGibDynamicComponentInstanceBase } from "../ibgib-dynamic-component-bases.mjs";
|
|
12
|
+
import { ElementsBase, IbGibDynamicComponentInstance } from "../component-types.mjs";
|
|
13
|
+
import { getComponentCtorArg } from "../../../app-bootstrap/init-orchestration.mjs";
|
|
14
|
+
|
|
15
|
+
export const PRIVACY_POLICY_COMPONENT_NAME = 'ibgib-privacy-policy';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Metadata for the Privacy Policy component.
|
|
19
|
+
*/
|
|
20
|
+
export class PrivacyPolicyComponentMeta extends IbGibDynamicComponentMetaBase {
|
|
21
|
+
protected lc: string = `[PrivacyPolicyComponentMeta]`;
|
|
22
|
+
|
|
23
|
+
routeRegExp?: RegExp = new RegExp(`^${PRIVACY_POLICY_COMPONENT_NAME}$|^privacy(-policy)?$`, 'i');
|
|
24
|
+
componentName = PRIVACY_POLICY_COMPONENT_NAME;
|
|
25
|
+
|
|
26
|
+
constructor() {
|
|
27
|
+
super(getComponentCtorArg());
|
|
28
|
+
if (typeof customElements !== 'undefined' && !customElements.get(this.componentName)) {
|
|
29
|
+
customElements.define(this.componentName, PrivacyPolicyComponentInstance);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async createInstance({
|
|
34
|
+
path,
|
|
35
|
+
ibGibAddr
|
|
36
|
+
}: {
|
|
37
|
+
path: string;
|
|
38
|
+
ibGibAddr: IbGibAddr;
|
|
39
|
+
}): Promise<IbGibDynamicComponentInstance> {
|
|
40
|
+
const lc = `${this.lc}[${this.createInstance.name}]`;
|
|
41
|
+
const component = document.createElement(this.componentName) as PrivacyPolicyComponentInstance;
|
|
42
|
+
await component.initialize({
|
|
43
|
+
ibGibAddr: ibGibAddr || ROOT_ADDR,
|
|
44
|
+
meta: this,
|
|
45
|
+
html: thisHtml,
|
|
46
|
+
css: [commonComponentStylesCss, thisCss],
|
|
47
|
+
});
|
|
48
|
+
return component;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* References to DOM elements within the Privacy Policy shadow root.
|
|
54
|
+
*/
|
|
55
|
+
interface PrivacyPolicyElements extends ElementsBase {
|
|
56
|
+
btnBack?: HTMLButtonElement;
|
|
57
|
+
loadingSpinner?: HTMLDivElement;
|
|
58
|
+
errorContainer?: HTMLDivElement;
|
|
59
|
+
errorMessage?: HTMLParagraphElement;
|
|
60
|
+
btnRetry?: HTMLButtonElement;
|
|
61
|
+
privacyContent?: HTMLElement;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Concrete Web Component implementation for rendering Privacy Policy markdown.
|
|
66
|
+
*/
|
|
67
|
+
export class PrivacyPolicyComponentInstance
|
|
68
|
+
extends IbGibDynamicComponentInstanceBase<IbGib_V1, PrivacyPolicyElements> {
|
|
69
|
+
|
|
70
|
+
protected lc: string = `[PrivacyPolicyComponentInstance]`;
|
|
71
|
+
|
|
72
|
+
/** Path or URL to the markdown privacy policy file */
|
|
73
|
+
public markdownUrl: string = '/PRIVACY_POLICY.md';
|
|
74
|
+
|
|
75
|
+
constructor() {
|
|
76
|
+
super();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
public override async created(): Promise<void> {
|
|
80
|
+
const lc = `${this.lc}[${this.created.name}]`;
|
|
81
|
+
try {
|
|
82
|
+
const shadow = this.shadowRoot!;
|
|
83
|
+
const contentEl = (shadow.querySelector('.privacy-container') || shadow.querySelector('#privacy-content') || this) as HTMLElement;
|
|
84
|
+
|
|
85
|
+
this.elements = {
|
|
86
|
+
contentEl,
|
|
87
|
+
btnBack: shadow.querySelector('#btn-back') as HTMLButtonElement,
|
|
88
|
+
loadingSpinner: shadow.querySelector('#loading-spinner') as HTMLDivElement,
|
|
89
|
+
errorContainer: shadow.querySelector('#error-container') as HTMLDivElement,
|
|
90
|
+
errorMessage: shadow.querySelector('#error-message') as HTMLParagraphElement,
|
|
91
|
+
btnRetry: shadow.querySelector('#btn-retry') as HTMLButtonElement,
|
|
92
|
+
privacyContent: shadow.querySelector('#privacy-content') as HTMLElement,
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
this.elements.btnBack?.addEventListener('click', () => {
|
|
96
|
+
if (window.history.length > 1) {
|
|
97
|
+
window.history.back();
|
|
98
|
+
} else {
|
|
99
|
+
window.location.href = '/';
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
this.elements.btnRetry?.addEventListener('click', () => {
|
|
104
|
+
this.loadPrivacyPolicy();
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
await this.loadPrivacyPolicy();
|
|
108
|
+
|
|
109
|
+
} catch (error) {
|
|
110
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
public override async disconnected(): Promise<void> {
|
|
115
|
+
const lc = `${this.lc}[${this.disconnected.name}]`;
|
|
116
|
+
// Cleanup if needed
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Fetches the markdown policy and converts it to formatted HTML in the DOM.
|
|
121
|
+
*/
|
|
122
|
+
public async loadPrivacyPolicy(): Promise<void> {
|
|
123
|
+
const lc = `${this.lc}[${this.loadPrivacyPolicy.name}]`;
|
|
124
|
+
try {
|
|
125
|
+
const el = this.elements;
|
|
126
|
+
if (el?.loadingSpinner) {
|
|
127
|
+
el.loadingSpinner.classList.remove('hidden');
|
|
128
|
+
}
|
|
129
|
+
if (el?.errorContainer) {
|
|
130
|
+
el.errorContainer.classList.add('hidden');
|
|
131
|
+
}
|
|
132
|
+
if (el?.privacyContent) {
|
|
133
|
+
el.privacyContent.classList.add('hidden');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const res = await fetch(this.markdownUrl);
|
|
137
|
+
if (!res.ok) {
|
|
138
|
+
throw new Error(`Failed to load ${this.markdownUrl} (status ${res.status}: ${res.statusText})`);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const mdText = await res.text();
|
|
142
|
+
const renderedHtml = convertMarkdownToHtml(mdText, {
|
|
143
|
+
linkTarget: '_blank',
|
|
144
|
+
linkRel: 'noopener',
|
|
145
|
+
enableAlerts: true
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
if (this.elements?.privacyContent) {
|
|
149
|
+
this.elements.privacyContent.innerHTML = renderedHtml;
|
|
150
|
+
this.elements.privacyContent.classList.remove('hidden');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
} catch (error) {
|
|
154
|
+
const msg = extractErrorMsg(error);
|
|
155
|
+
console.error(`${lc} ${msg}`);
|
|
156
|
+
if (this.elements?.errorMessage) {
|
|
157
|
+
this.elements.errorMessage.textContent = `Unable to load Privacy Policy: ${msg}`;
|
|
158
|
+
}
|
|
159
|
+
if (this.elements?.errorContainer) {
|
|
160
|
+
this.elements.errorContainer.classList.remove('hidden');
|
|
161
|
+
}
|
|
162
|
+
} finally {
|
|
163
|
+
if (this.elements?.loadingSpinner) {
|
|
164
|
+
this.elements.loadingSpinner.classList.add('hidden');
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
package/src/ui/ui-constants.mts
CHANGED
|
@@ -110,4 +110,11 @@ export const EVENT_IBGIB_IDENTITY_UPDATE_AVAILABLE = 'ibgib-identity-update-avai
|
|
|
110
110
|
export const EVENT_IBGIB_IDENTITY_RENEWAL_REQUIRED = 'ibgib-identity-renewal-required';
|
|
111
111
|
// #endregion Custom Events
|
|
112
112
|
|
|
113
|
+
// #region UI Message Actions
|
|
114
|
+
export const UI_ACTION_SHOW_IDENTITY_MANAGER = 'show-identity-manager';
|
|
115
|
+
export const UI_ACTION_SHOW_KEYSTONE_CREATOR = 'show-keystone-creator';
|
|
116
|
+
export const UI_ACTION_SHOW_ADD_DEVICE = 'show-add-device';
|
|
117
|
+
export const UI_ACTION_SHOW_PRIVACY_POLICY = 'show-privacy-policy';
|
|
118
|
+
// #endregion UI Message Actions
|
|
119
|
+
|
|
113
120
|
|
|
@@ -181,19 +181,19 @@ export function getFunctionCallAndResponseParts({
|
|
|
181
181
|
}): { call: FunctionCallPart, response: FunctionResponsePart } {
|
|
182
182
|
const lc = `[${getFunctionCallAndResponseParts.name}]`;
|
|
183
183
|
try {
|
|
184
|
-
if (logalot) { console.log(`${lc} starting... (I:
|
|
184
|
+
if (logalot) { console.log(`${lc} starting... (I: genuuid)`); }
|
|
185
185
|
|
|
186
186
|
if (!functionInfoIbGib) {
|
|
187
|
-
throw new Error(`${lc} functionInfoIbGib parameter is required. (E:
|
|
187
|
+
throw new Error(`${lc} functionInfoIbGib parameter is required. (E: genuuid)`);
|
|
188
188
|
}
|
|
189
189
|
if (!functionInfoIbGib.data) {
|
|
190
|
-
throw new Error(`${lc} functionInfoIbGib.data is required. (E:
|
|
190
|
+
throw new Error(`${lc} functionInfoIbGib.data is required. (E: genuuid)`);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
const { fnName, fnArgs, fnResult } = functionInfoIbGib.data;
|
|
194
194
|
|
|
195
195
|
if (!fnName) {
|
|
196
|
-
throw new Error(`${lc} functionInfoIbGib.data.fnName is required. (E:
|
|
196
|
+
throw new Error(`${lc} functionInfoIbGib.data.fnName is required. (E: genuuid)`);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
// 1. Create FunctionCallPart
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module web-in-memory-workspace-projection-space-constants
|
|
3
|
+
*
|
|
4
|
+
* Constants for in-memory web workspace projection spaces.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const DEFAULT_WEB_IN_MEMORY_WORKSPACE_PROJECTION_SPACE_DESCRIPTION =
|
|
8
|
+
'Web in-memory space witness for projecting and observing virtual workspace hierarchies in browser environments.';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module web-in-memory-workspace-projection-space-types
|
|
3
|
+
*
|
|
4
|
+
* Types for in-memory web workspace projection spaces.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
WorkspaceProjectionSpaceData_V1,
|
|
9
|
+
WorkspaceProjectionSpaceRel8ns_V1
|
|
10
|
+
} from '@ibgib/core-gib/dist/witness/space/workspace-projection-space/workspace-projection-space-types.mjs';
|
|
11
|
+
import {
|
|
12
|
+
DEFAULT_LOCAL_SPACE_POLLING_INTERVAL_MS,
|
|
13
|
+
IBGIB_SPACE_NAME_DEFAULT,
|
|
14
|
+
ZERO_SPACE_ID
|
|
15
|
+
} from '@ibgib/core-gib/dist/witness/space/space-constants.mjs';
|
|
16
|
+
import {
|
|
17
|
+
DEFAULT_WEB_IN_MEMORY_WORKSPACE_PROJECTION_SPACE_DESCRIPTION
|
|
18
|
+
} from './web-in-memory-workspace-projection-space-constants.mjs';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* In-memory virtual file entry.
|
|
22
|
+
*/
|
|
23
|
+
export interface VirtualFileEntry {
|
|
24
|
+
relPath: string;
|
|
25
|
+
content: Uint8Array;
|
|
26
|
+
isDirectory: boolean;
|
|
27
|
+
modifiedAt?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Data payload for WebInMemoryWorkspaceProjectionSpace_V1.
|
|
32
|
+
*/
|
|
33
|
+
export interface WebInMemoryWorkspaceProjectionSpaceData_V1 extends WorkspaceProjectionSpaceData_V1 {
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const DEFAULT_WEB_IN_MEMORY_WORKSPACE_PROJECTION_SPACE_DATA_V1: WebInMemoryWorkspaceProjectionSpaceData_V1 = {
|
|
37
|
+
version: '1',
|
|
38
|
+
uuid: ZERO_SPACE_ID,
|
|
39
|
+
name: IBGIB_SPACE_NAME_DEFAULT,
|
|
40
|
+
classname: 'WebInMemoryWorkspaceProjectionSpace_V1',
|
|
41
|
+
workspaceRoot: '/',
|
|
42
|
+
vcsFolderName: '.vcsgib',
|
|
43
|
+
persistOptsAndResultIbGibs: false,
|
|
44
|
+
validateIbGibAddrsMatchIbGibs: false,
|
|
45
|
+
longPollingIntervalMs: DEFAULT_LOCAL_SPACE_POLLING_INTERVAL_MS,
|
|
46
|
+
allowPrimitiveArgs: false,
|
|
47
|
+
catchAllErrors: true,
|
|
48
|
+
description: DEFAULT_WEB_IN_MEMORY_WORKSPACE_PROJECTION_SPACE_DESCRIPTION,
|
|
49
|
+
trace: false,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export interface WebInMemoryWorkspaceProjectionSpaceRel8ns_V1 extends WorkspaceProjectionSpaceRel8ns_V1 {
|
|
53
|
+
}
|