@xnetjs/data 0.0.2 → 0.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/README.md +112 -0
- package/dist/account-MWNCH4GJ.js +12 -0
- package/dist/account-ledger-R2GAFJL6.js +38 -0
- package/dist/auth/index.d.ts +420 -0
- package/dist/auth/index.js +102 -0
- package/dist/budget-NN7P35XP.js +12 -0
- package/dist/canvas-6WYBNH53.js +10 -0
- package/dist/channel-AT3LQF4A.js +12 -0
- package/dist/chat-message-DSVO72B3.js +10 -0
- package/dist/chunk-2ZNJWIQG.js +84 -0
- package/dist/chunk-3J3HILXO.js +46 -0
- package/dist/chunk-3RUDVTMH.js +5543 -0
- package/dist/chunk-4EYKGTSQ.js +49 -0
- package/dist/chunk-53F4PRNC.js +32 -0
- package/dist/chunk-5EXHNXPL.js +48 -0
- package/dist/{chunk-BQBPA5HS.js → chunk-5HC5NO57.js} +16 -2
- package/dist/chunk-6KLGA6IR.js +47 -0
- package/dist/chunk-6OMG4I7M.js +41 -0
- package/dist/chunk-7PDRDSFH.js +69 -0
- package/dist/chunk-BQLQSWKZ.js +232 -0
- package/dist/chunk-BY5O6LNC.js +380 -0
- package/dist/chunk-DCTRX6II.js +40 -0
- package/dist/{chunk-VYR5GPJP.js → chunk-DWEXKD6E.js} +9 -3
- package/dist/chunk-EBNMV2VO.js +896 -0
- package/dist/chunk-FVEACSKE.js +102 -0
- package/dist/chunk-GU6THOAB.js +45 -0
- package/dist/chunk-H4GA4BBK.js +75 -0
- package/dist/chunk-IJ44LR7N.js +76 -0
- package/dist/chunk-J4ANIXIV.js +402 -0
- package/dist/chunk-JDFNMFOZ.js +45 -0
- package/dist/chunk-K7DOZWWT.js +1811 -0
- package/dist/chunk-KQAT4XBL.js +49 -0
- package/dist/chunk-KQUALW4O.js +183 -0
- package/dist/chunk-LYSWLCOI.js +47 -0
- package/dist/chunk-MBTUO3ZL.js +65 -0
- package/dist/chunk-NI4FHG2K.js +52 -0
- package/dist/chunk-OCMSAKWV.js +78 -0
- package/dist/chunk-OGJCRNGE.js +57 -0
- package/dist/chunk-OPPHF3TF.js +143 -0
- package/dist/{chunk-IDMBCRUC.js → chunk-OSAWNZVM.js} +1 -1
- package/dist/chunk-PMUQACPY.js +33 -0
- package/dist/chunk-PNESGUH5.js +63 -0
- package/dist/chunk-Q3IEGH4B.js +51 -0
- package/dist/chunk-QJW5LDP4.js +52 -0
- package/dist/chunk-QWFTRZQT.js +142 -0
- package/dist/{chunk-SZC345Z2.js → chunk-RL64OJJ5.js} +1025 -1110
- package/dist/chunk-S5RP5RKY.js +416 -0
- package/dist/chunk-S6U6TCMN.js +722 -0
- package/dist/chunk-SVNGSZZA.js +69 -0
- package/dist/chunk-T5AZAOG5.js +54 -0
- package/dist/chunk-TCTZW4A6.js +42 -0
- package/dist/chunk-U64CW73O.js +109 -0
- package/dist/chunk-UDWKWTAX.js +6526 -0
- package/dist/chunk-UQM3G5A2.js +148 -0
- package/dist/chunk-VQ7JHB67.js +57 -0
- package/dist/chunk-W7EBL7ZU.js +73 -0
- package/dist/chunk-WEPK7SZF.js +65 -0
- package/dist/chunk-XHEA5UER.js +75 -0
- package/dist/chunk-XMSKJ5PV.js +66 -0
- package/dist/chunk-XROI44ZP.js +64 -0
- package/dist/chunk-Y3S5SRVM.js +45 -0
- package/dist/chunk-YEFKQYKA.js +43 -0
- package/dist/chunk-YSUIXD2Y.js +105 -0
- package/dist/chunk-ZCOFZY5M.js +70 -0
- package/dist/chunk-ZLU4Y3O2.js +50 -0
- package/dist/chunk-ZPZ7XDA6.js +54 -0
- package/dist/chunk-ZZ6TWKGS.js +40 -0
- package/dist/clone-C0Jhk2UN.d.ts +2205 -0
- package/dist/comment-QSWYAQVS.js +10 -0
- package/dist/crm-L5RYAAF3.js +68 -0
- package/dist/dashboard-JMKTTRA7.js +10 -0
- package/dist/database/index.d.ts +882 -0
- package/dist/database/index.js +523 -0
- package/dist/database-GIXSPZJW.js +10 -0
- package/dist/database-field-3EPAMZUR.js +10 -0
- package/dist/database-row-6Q6TRVE4.js +10 -0
- package/dist/database-select-option-BBBJFLLH.js +10 -0
- package/dist/database-view-5PLSOBI2.js +10 -0
- package/dist/experiment-DOVOZ34Y.js +10 -0
- package/dist/external-item-P2E5X7BZ.js +14 -0
- package/dist/external-reference-7BSFF6SA.js +8 -0
- package/dist/feed-2IXHHP6O.js +12 -0
- package/dist/feed-item-DPE6LN7I.js +12 -0
- package/dist/folder-6KM3KYD5.js +21 -0
- package/dist/game-5AK5XWBR.js +50 -0
- package/dist/grant-WTQSNT5A.js +8 -0
- package/dist/grant-expiration-cleaner-CY6BcmlR.d.ts +249 -0
- package/dist/import-batch-IXBJLQPJ.js +12 -0
- package/dist/inbox-state-E5NSVOGP.js +12 -0
- package/dist/index.d.ts +224 -4548
- package/dist/index.js +2252 -4754
- package/dist/map-RG5Y3CPC.js +10 -0
- package/dist/media-asset-QTCGLIZA.js +8 -0
- package/dist/memory-PNRTMBZO.js +12 -0
- package/dist/metric-65SVOX5C.js +10 -0
- package/dist/milestone-XEO6ZGDG.js +12 -0
- package/dist/moderation-FFHETMRB.js +30 -0
- package/dist/observation-2Y3QKUXM.js +10 -0
- package/dist/page-2V27JGKJ.js +10 -0
- package/dist/posting-GBOSZCMZ.js +12 -0
- package/dist/profile-BLLDWIDK.js +8 -0
- package/dist/project-CQL5LN26.js +10 -0
- package/dist/query-ast-C3m6kZYv.d.ts +226 -0
- package/dist/reaction-T2DTJBBV.js +10 -0
- package/dist/registry-DunPv__d.d.ts +99 -0
- package/dist/saved-view-4R2DBCL3.js +10 -0
- package/dist/schema/index.d.ts +6489 -0
- package/dist/schema/index.js +677 -0
- package/dist/schema-extension-LNRF2YRD.js +18 -0
- package/dist/space-IJU24PBH.js +42 -0
- package/dist/space-membership-DEUMM7NV.js +14 -0
- package/dist/store/index.d.ts +518 -0
- package/dist/store/index.js +135 -0
- package/dist/store-DtIDjk7c.d.ts +355 -0
- package/dist/sync/awareness.d.ts +69 -0
- package/dist/sync/awareness.js +20 -0
- package/dist/system-ILHCZOVO.js +38 -0
- package/dist/tag-SKCHM3U5.js +16 -0
- package/dist/task-7AOBP7WC.js +16 -0
- package/dist/task-view-NUGKELJP.js +10 -0
- package/dist/transaction-ZDSEGDIR.js +12 -0
- package/dist/transcription-PSCLDAGX.js +12 -0
- package/dist/types-S-BJAKyK.d.ts +1576 -0
- package/dist/updates.d.ts +44 -0
- package/dist/updates.js +16 -0
- package/dist/user-widget-RLY2N46A.js +8 -0
- package/dist/view-types-DSde-uT_.d.ts +316 -0
- package/package.json +32 -9
- package/dist/canvas-HSIKIQFK.js +0 -7
- package/dist/chunk-2L5ZUGG5.js +0 -53
- package/dist/chunk-4MTS5KAQ.js +0 -22
- package/dist/chunk-GZHARFKC.js +0 -25
- package/dist/chunk-WKIKJTI2.js +0 -45
- package/dist/comment-277JD7DV.js +0 -7
- package/dist/database-W3KEHLI3.js +0 -7
- package/dist/database-row-3O2QSNZN.js +0 -7
- package/dist/grant-QVZ454YC.js +0 -7
- package/dist/page-O4WTOIEO.js +0 -7
- package/dist/task-SEKAYJH7.js +0 -7
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineSchema,
|
|
3
|
+
select,
|
|
4
|
+
text,
|
|
5
|
+
url
|
|
6
|
+
} from "./chunk-EBNMV2VO.js";
|
|
7
|
+
import {
|
|
8
|
+
presets
|
|
9
|
+
} from "./chunk-RL64OJJ5.js";
|
|
10
|
+
|
|
11
|
+
// src/schema/schemas/external-reference.ts
|
|
12
|
+
var ExternalReferenceSchema = defineSchema({
|
|
13
|
+
name: "ExternalReference",
|
|
14
|
+
namespace: "xnet://xnet.fyi/",
|
|
15
|
+
properties: {
|
|
16
|
+
/** Canonical external URL */
|
|
17
|
+
url: url({ required: true }),
|
|
18
|
+
/** Normalized provider identifier */
|
|
19
|
+
provider: select({
|
|
20
|
+
options: [
|
|
21
|
+
{ id: "github", name: "GitHub" },
|
|
22
|
+
{ id: "figma", name: "Figma" },
|
|
23
|
+
{ id: "youtube", name: "YouTube" },
|
|
24
|
+
{ id: "loom", name: "Loom" },
|
|
25
|
+
{ id: "vimeo", name: "Vimeo" },
|
|
26
|
+
{ id: "codesandbox", name: "CodeSandbox" },
|
|
27
|
+
{ id: "spotify", name: "Spotify" },
|
|
28
|
+
{ id: "twitter", name: "Twitter" },
|
|
29
|
+
{ id: "instagram", name: "Instagram" },
|
|
30
|
+
{ id: "tiktok", name: "TikTok" },
|
|
31
|
+
{ id: "generic", name: "Generic Link" }
|
|
32
|
+
],
|
|
33
|
+
default: "generic"
|
|
34
|
+
}),
|
|
35
|
+
/** Normalized reference kind */
|
|
36
|
+
kind: select({
|
|
37
|
+
options: [
|
|
38
|
+
{ id: "issue", name: "Issue" },
|
|
39
|
+
{ id: "pull-request", name: "Pull Request" },
|
|
40
|
+
{ id: "design", name: "Design" },
|
|
41
|
+
{ id: "video", name: "Video" },
|
|
42
|
+
{ id: "sandbox", name: "Sandbox" },
|
|
43
|
+
{ id: "social", name: "Social Post" },
|
|
44
|
+
{ id: "audio", name: "Audio" },
|
|
45
|
+
{ id: "link", name: "Link" }
|
|
46
|
+
],
|
|
47
|
+
default: "link"
|
|
48
|
+
}),
|
|
49
|
+
/** Provider-specific stable identifier */
|
|
50
|
+
refId: text({}),
|
|
51
|
+
/** Compact display title */
|
|
52
|
+
title: text({ required: true, maxLength: 500 }),
|
|
53
|
+
/** Secondary display label */
|
|
54
|
+
subtitle: text({ maxLength: 500 }),
|
|
55
|
+
/** Small icon or provider marker */
|
|
56
|
+
icon: text({ maxLength: 32 }),
|
|
57
|
+
/** Optional richer preview/embed URL */
|
|
58
|
+
embedUrl: url({}),
|
|
59
|
+
/** Provider-specific metadata stored as JSON */
|
|
60
|
+
metadata: text({ maxLength: 1e4 })
|
|
61
|
+
},
|
|
62
|
+
document: void 0,
|
|
63
|
+
// Standalone/personal content: owner-only by default (exploration 0192).
|
|
64
|
+
authorization: presets.private()
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export {
|
|
68
|
+
ExternalReferenceSchema
|
|
69
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
created,
|
|
3
|
+
createdBy,
|
|
4
|
+
defineSchema,
|
|
5
|
+
number,
|
|
6
|
+
person,
|
|
7
|
+
relation,
|
|
8
|
+
select
|
|
9
|
+
} from "./chunk-EBNMV2VO.js";
|
|
10
|
+
|
|
11
|
+
// src/schema/schemas/space-membership.ts
|
|
12
|
+
var SPACE_MEMBERSHIP_SCHEMA_IRI = "xnet://xnet.fyi/SpaceMembership@1.0.0";
|
|
13
|
+
var SpaceMembershipSchema = defineSchema({
|
|
14
|
+
name: "SpaceMembership",
|
|
15
|
+
namespace: "xnet://xnet.fyi/",
|
|
16
|
+
properties: {
|
|
17
|
+
/** The space this membership belongs to */
|
|
18
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0", required: true }),
|
|
19
|
+
/** The member DID */
|
|
20
|
+
member: person({ required: true }),
|
|
21
|
+
/** Role within the space */
|
|
22
|
+
role: select({
|
|
23
|
+
options: [
|
|
24
|
+
{ id: "viewer", name: "Viewer", color: "gray" },
|
|
25
|
+
{ id: "commenter", name: "Commenter", color: "yellow" },
|
|
26
|
+
{ id: "member", name: "Member", color: "blue" },
|
|
27
|
+
{ id: "admin", name: "Admin", color: "purple" },
|
|
28
|
+
{ id: "owner", name: "Owner", color: "red" }
|
|
29
|
+
],
|
|
30
|
+
required: true,
|
|
31
|
+
default: "member"
|
|
32
|
+
}),
|
|
33
|
+
/** Who added this member (DID) */
|
|
34
|
+
addedBy: person({}),
|
|
35
|
+
/** When the member was added (ms since epoch) */
|
|
36
|
+
addedAt: number({}),
|
|
37
|
+
createdAt: created(),
|
|
38
|
+
createdBy: createdBy()
|
|
39
|
+
},
|
|
40
|
+
document: void 0
|
|
41
|
+
});
|
|
42
|
+
function spaceMembershipId(spaceId, memberDid) {
|
|
43
|
+
return `spacemember:${spaceId}:${memberDid}`;
|
|
44
|
+
}
|
|
45
|
+
function isSpaceRole(value) {
|
|
46
|
+
return value === "viewer" || value === "commenter" || value === "member" || value === "admin" || value === "owner";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
SPACE_MEMBERSHIP_SCHEMA_IRI,
|
|
51
|
+
SpaceMembershipSchema,
|
|
52
|
+
spaceMembershipId,
|
|
53
|
+
isSpaceRole
|
|
54
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spaceCascadeAuthorization
|
|
3
|
+
} from "./chunk-OCMSAKWV.js";
|
|
4
|
+
import {
|
|
5
|
+
created,
|
|
6
|
+
createdBy,
|
|
7
|
+
date,
|
|
8
|
+
defineSchema,
|
|
9
|
+
relation,
|
|
10
|
+
text,
|
|
11
|
+
url
|
|
12
|
+
} from "./chunk-EBNMV2VO.js";
|
|
13
|
+
|
|
14
|
+
// src/schema/schemas/feed.ts
|
|
15
|
+
var FEED_SCHEMA_IRI = "xnet://xnet.fyi/Feed@1.0.0";
|
|
16
|
+
var FeedSchema = defineSchema({
|
|
17
|
+
name: "Feed",
|
|
18
|
+
namespace: "xnet://xnet.fyi/",
|
|
19
|
+
properties: {
|
|
20
|
+
/** Human-readable feed title (from the feed's <title>, or user-set). */
|
|
21
|
+
title: text({ required: true, maxLength: 500 }),
|
|
22
|
+
/** The RSS/Atom feed URL polled by the connector. */
|
|
23
|
+
feedUrl: url({ required: true }),
|
|
24
|
+
/** The feed's human-facing website, when advertised. */
|
|
25
|
+
siteUrl: url({}),
|
|
26
|
+
/** Short description of the feed. */
|
|
27
|
+
description: text({ maxLength: 2e3 }),
|
|
28
|
+
/** The home Space — drives the authorization cascade. */
|
|
29
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
30
|
+
/** When this feed was last successfully polled (Unix ms). */
|
|
31
|
+
lastPolledAt: date({ includeTime: true }),
|
|
32
|
+
createdAt: created(),
|
|
33
|
+
createdBy: createdBy()
|
|
34
|
+
},
|
|
35
|
+
document: void 0,
|
|
36
|
+
authorization: spaceCascadeAuthorization()
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
FEED_SCHEMA_IRI,
|
|
41
|
+
FeedSchema
|
|
42
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spaceCascadeAuthorization
|
|
3
|
+
} from "./chunk-OCMSAKWV.js";
|
|
4
|
+
import {
|
|
5
|
+
defineSchema,
|
|
6
|
+
json,
|
|
7
|
+
number,
|
|
8
|
+
relation,
|
|
9
|
+
select,
|
|
10
|
+
text
|
|
11
|
+
} from "./chunk-EBNMV2VO.js";
|
|
12
|
+
|
|
13
|
+
// src/schema/schemas/metric.ts
|
|
14
|
+
var MetricSchema = defineSchema({
|
|
15
|
+
name: "Metric",
|
|
16
|
+
namespace: "xnet://xnet.fyi/",
|
|
17
|
+
properties: {
|
|
18
|
+
/** Display name, e.g. "Meditate" or "Sleep latency". */
|
|
19
|
+
name: text({ required: true, maxLength: 200 }),
|
|
20
|
+
/** Emoji or icon URL. */
|
|
21
|
+
icon: text({ maxLength: 500 }),
|
|
22
|
+
/** Accent color for streak chips / charts. */
|
|
23
|
+
color: text({ maxLength: 40 }),
|
|
24
|
+
/**
|
|
25
|
+
* What kind of value an Observation carries — drives both logging UI and
|
|
26
|
+
* aggregation. `boolean` is the classic habit check-in (value 0/1);
|
|
27
|
+
* `scale` is a bounded rating (mood 1–5); the rest are free numerics.
|
|
28
|
+
*/
|
|
29
|
+
kind: select({
|
|
30
|
+
options: [
|
|
31
|
+
{ id: "boolean", name: "Yes / No" },
|
|
32
|
+
{ id: "count", name: "Count" },
|
|
33
|
+
{ id: "duration", name: "Duration" },
|
|
34
|
+
{ id: "scale", name: "Scale" },
|
|
35
|
+
{ id: "number", name: "Number" }
|
|
36
|
+
],
|
|
37
|
+
default: "boolean"
|
|
38
|
+
}),
|
|
39
|
+
/** Unit label for numeric kinds, e.g. "min", "pages", "glasses". */
|
|
40
|
+
unit: text({ maxLength: 40 }),
|
|
41
|
+
/** Lower bound for `scale` kind (e.g. 1). */
|
|
42
|
+
scaleMin: number({}),
|
|
43
|
+
/** Upper bound for `scale` kind (e.g. 5). */
|
|
44
|
+
scaleMax: number({}),
|
|
45
|
+
/**
|
|
46
|
+
* A recurring schedule makes this Metric a habit. `none` = ad-hoc /
|
|
47
|
+
* continuous (no streak, no "miss").
|
|
48
|
+
*/
|
|
49
|
+
schedule: select({
|
|
50
|
+
options: [
|
|
51
|
+
{ id: "none", name: "No schedule" },
|
|
52
|
+
{ id: "daily", name: "Daily" },
|
|
53
|
+
{ id: "weekly", name: "Weekly" },
|
|
54
|
+
{ id: "specificDays", name: "Specific days" }
|
|
55
|
+
],
|
|
56
|
+
default: "none"
|
|
57
|
+
}),
|
|
58
|
+
/** Weekdays (0 = Sun … 6 = Sat) for `specificDays`, or anchor for `weekly`. */
|
|
59
|
+
scheduleDays: json({}),
|
|
60
|
+
/** Which direction counts as improvement, for the verdict engine. */
|
|
61
|
+
polarity: select({
|
|
62
|
+
options: [
|
|
63
|
+
{ id: "higherBetter", name: "Higher is better" },
|
|
64
|
+
{ id: "lowerBetter", name: "Lower is better" },
|
|
65
|
+
{ id: "neutral", name: "Neutral" }
|
|
66
|
+
],
|
|
67
|
+
default: "higherBetter"
|
|
68
|
+
}),
|
|
69
|
+
/** Optional target value (e.g. "50 pushups", "≥ 7 h sleep"). */
|
|
70
|
+
target: number({}),
|
|
71
|
+
/**
|
|
72
|
+
* Implementation intention — "after I pour my morning coffee, I will…".
|
|
73
|
+
* A written cue roughly doubles follow-through (Gollwitzer, 1999).
|
|
74
|
+
*/
|
|
75
|
+
cue: text({ maxLength: 280 }),
|
|
76
|
+
/**
|
|
77
|
+
* Optional owning experiment. A Metric can be standalone (mood, sleep) and
|
|
78
|
+
* referenced by many experiments, so this is not required.
|
|
79
|
+
*/
|
|
80
|
+
experiment: relation({ target: "xnet://xnet.fyi/Experiment@1.0.0" }),
|
|
81
|
+
/** Canonical home; empty = Unfiled (exploration 0169). */
|
|
82
|
+
folder: relation({ target: "xnet://xnet.fyi/Folder@1.0.0" }),
|
|
83
|
+
/** Order among siblings — fractional index. */
|
|
84
|
+
sortKey: text({ maxLength: 500 }),
|
|
85
|
+
/** Workspace-wide labels, referenced by id (exploration 0169). */
|
|
86
|
+
tags: relation({ target: "xnet://xnet.fyi/Tag@1.0.0", multiple: true }),
|
|
87
|
+
/** Canonical SECURITY home; empty = personal/private (exploration 0179). */
|
|
88
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
89
|
+
/**
|
|
90
|
+
* Per-node visibility. Defaults to `private` — mood/health/habit data is
|
|
91
|
+
* sensitive and must never leak to public surfaces by accident (0180).
|
|
92
|
+
*/
|
|
93
|
+
visibility: select({
|
|
94
|
+
options: [
|
|
95
|
+
{ id: "inherit", name: "Inherit", color: "gray" },
|
|
96
|
+
{ id: "private", name: "Private", color: "gray" },
|
|
97
|
+
{ id: "unlisted", name: "Unlisted", color: "yellow" },
|
|
98
|
+
{ id: "public", name: "Public", color: "green" }
|
|
99
|
+
],
|
|
100
|
+
default: "private"
|
|
101
|
+
})
|
|
102
|
+
},
|
|
103
|
+
// Inherits access from its home Space (exploration 0181/0192).
|
|
104
|
+
authorization: spaceCascadeAuthorization()
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
MetricSchema
|
|
109
|
+
};
|