kaabalah 6.2.0 → 6.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +31 -1
  2. package/dist/{chunk-6G2QXVWA.js → chunk-25YFW677.js} +165 -15
  3. package/dist/chunk-25YFW677.js.map +1 -0
  4. package/dist/{chunk-IRA4VGG4.js → chunk-HSPUNESW.js} +6 -6
  5. package/dist/{chunk-IRA4VGG4.js.map → chunk-HSPUNESW.js.map} +1 -1
  6. package/dist/{chunk-CQSSLFU6.mjs → chunk-NMIXWQBN.mjs} +3 -3
  7. package/dist/{chunk-CQSSLFU6.mjs.map → chunk-NMIXWQBN.mjs.map} +1 -1
  8. package/dist/{chunk-ZDWTBYDE.mjs → chunk-VWGXOGEJ.mjs} +160 -16
  9. package/dist/chunk-VWGXOGEJ.mjs.map +1 -0
  10. package/dist/cli.js +61 -2
  11. package/dist/cli.js.map +1 -1
  12. package/dist/core/index.d.mts +2 -4
  13. package/dist/core/index.d.ts +2 -4
  14. package/dist/{constants-C0XjrYIG.d.mts → correspondence-model-DWXbAjC-.d.mts} +279 -1
  15. package/dist/{constants-C0XjrYIG.d.ts → correspondence-model-DWXbAjC-.d.ts} +279 -1
  16. package/dist/gematria/index.d.mts +1 -2
  17. package/dist/gematria/index.d.ts +1 -2
  18. package/dist/index.d.mts +2 -3
  19. package/dist/index.d.ts +2 -3
  20. package/dist/index.js +45 -21
  21. package/dist/index.mjs +2 -2
  22. package/dist/semantic/index.d.mts +1 -1
  23. package/dist/semantic/index.d.ts +1 -1
  24. package/dist/semantic/index.js +8 -8
  25. package/dist/semantic/index.mjs +2 -2
  26. package/dist/tarot/index.d.mts +13 -3
  27. package/dist/tarot/index.d.ts +13 -3
  28. package/dist/tarot/index.js +38 -14
  29. package/dist/tarot/index.mjs +1 -1
  30. package/package.json +1 -1
  31. package/dist/chunk-6G2QXVWA.js.map +0 -1
  32. package/dist/chunk-ZDWTBYDE.mjs.map +0 -1
  33. package/dist/correspondence-model-BrtIu5tW.d.mts +0 -281
  34. package/dist/correspondence-model-CpFOWeBr.d.ts +0 -281
@@ -1,281 +0,0 @@
1
- import { D as NodeType, O as Node, E as NodeId, N as NumerologyTypes, J as NodeData, K as KaabalahTypes, y as WesternAstrologyTypes, z as TarotTypes } from './constants-C0XjrYIG.js';
2
-
3
- /**
4
- * TreeOfLife represents a graph structure for mapping Kaabalah, Tarot, Astrology and other
5
- * esoteric correspondences. It can be used to create multiple independent instances
6
- * for different use cases or to isolate different sets of correspondences.
7
- */
8
- declare class TreeOfLife {
9
- private nodes;
10
- private adjacent;
11
- private edges;
12
- private mutationSources;
13
- private modules;
14
- private getCurrentMutationSource;
15
- runWithMutationSource<T>(source: CorrespondenceSource, fn: () => T): T;
16
- /**
17
- * Loads the tree of life system to be used
18
- * @param systemKey - the key of the system to load
19
- */
20
- loadSystem(systemKey: SystemKey): void;
21
- /**
22
- * Loads a part of a system into the tree of life
23
- * @param partKey - the key of the part to load
24
- */
25
- loadPart(partKey: PartKey): void;
26
- /**
27
- * Unloads the tree of life system and all its parts
28
- */
29
- unloadSystem(): void;
30
- get activeSystem(): SystemKey | null;
31
- get availableParts(): string[];
32
- get loadedParts(): PartKey[];
33
- get availableBridges(): Bridge[];
34
- get bridgedParts(): string[];
35
- /**
36
- * Upserts a node to the tree
37
- * @param node - the node to upsert
38
- * @returns the id of the added node
39
- */
40
- upsertNode<T extends NodeType>(node: Node<T>): NodeId<T>;
41
- getNode<T extends NodeType>(id: NodeId<T>): Node<T> | undefined;
42
- getNodes(): Node<NodeType>[];
43
- getEdge(left: NodeId<NodeType>, right: NodeId<NodeType>): CorrespondenceEdge | undefined;
44
- getEdges(nodeId?: NodeId<NodeType>): CorrespondenceEdge[];
45
- /**
46
- * Links two nodes bi-directionally
47
- * @param firstNode - the id of the first node
48
- * @param secondNode - the id of the second node
49
- */
50
- link(firstNode: NodeId<NodeType>, secondNode: NodeId<NodeType>, options?: {
51
- metadata?: CorrespondenceMetadata;
52
- source?: CorrespondenceSource;
53
- }): void;
54
- /**
55
- * Gets the current node and all its direct relations, or, when filtered by node type, only the direct relations of that type.
56
- * @param id - the id of the node to get the relations for
57
- * @param nodeType - the node type to filter the relations by
58
- * @returns the current node and all its direct relations
59
- */
60
- related<T extends NodeType, U extends NodeType>(id: NodeId<T>, nodeType?: U): Node<U>[];
61
- /**
62
- * Sugar for `related(id, type)[0]`
63
- * @param id - the id of the node to get the related node for
64
- * @param type - the type of the node to get the related node for
65
- * @returns the related node
66
- */
67
- relatedFirst<T extends NodeType, U extends NodeType>(id: NodeId<T>, type: U): Node<U> | undefined;
68
- /**
69
- * Gets all the types of nodes that are directly connected to the given node
70
- * @param id - the id of the node to get related types for
71
- * @returns array of node types that are directly connected
72
- */
73
- relatedTypes<T extends NodeType>(id: NodeId<T>): T[];
74
- /**
75
- * BFS up to depth k, optional type filter for the result set
76
- * @param id - the id of the node to get the extended relations for
77
- * @param depth - the depth of the walk
78
- * @param type - the type of the nodes to filter the result set by
79
- * @returns the current node and all its extended relations
80
- */
81
- walk<T extends NodeType, U extends NodeType>(id: NodeId<T>, depth?: number, type?: U): Node<U>[];
82
- /**
83
- * Removes a node and all its relations from the graph, cleaning up adjacency sets.
84
- * @param id - the id of the node to remove
85
- */
86
- removeNode(id: NodeId<NodeType>): void;
87
- addNumber({ number, nodeId }: {
88
- number: number;
89
- nodeId?: NodeId<NodeType>;
90
- }): NodeId<NumerologyTypes>;
91
- /**
92
- * Adds a sphere (sephirah) to the tree with its Hebrew and English names
93
- * @param sphere - the identifier for the sphere
94
- * @param data - the sphere's Hebrew and English names
95
- * @returns the sphere's id
96
- */
97
- addSphere({ sphere, data, relatedNumber, }: {
98
- sphere: string;
99
- data: NodeData<KaabalahTypes.SPHERE>;
100
- relatedNumber: number;
101
- }): NodeId<KaabalahTypes.SPHERE>;
102
- /**
103
- * Adds a path between two spheres with its associated number
104
- * @param leftSphere - the id of the first sphere
105
- * @param rightSphere - the id of the second sphere
106
- * @param relatedNumber - the number associated with this path
107
- * @returns the path's id
108
- */
109
- addPath({ leftSphere, rightSphere, relatedNumber, data, }: {
110
- leftSphere: NodeId<KaabalahTypes.SPHERE>;
111
- rightSphere: NodeId<KaabalahTypes.SPHERE>;
112
- relatedNumber: number;
113
- data?: Omit<NodeData<KaabalahTypes.PATH>, "from" | "to">;
114
- }): NodeId<KaabalahTypes.PATH>;
115
- addLetters({ path, letters, }: {
116
- path: NodeId<KaabalahTypes.PATH>;
117
- letters: {
118
- letter: string;
119
- type: NodeType;
120
- data?: NodeData<NodeType>;
121
- }[];
122
- }): void;
123
- addWesternAstrologySign({ spheres, path, house, planets, element, modality, sign, relatedNumber, }: {
124
- spheres: NodeId<KaabalahTypes.SPHERE>[];
125
- path: NodeId<KaabalahTypes.PATH>;
126
- house: NodeId<WesternAstrologyTypes.HOUSE>;
127
- planets: NodeId<WesternAstrologyTypes.PLANET>[];
128
- element: NodeId<WesternAstrologyTypes.WESTERN_ELEMENT>;
129
- modality: NodeId<WesternAstrologyTypes.MODALITIES>;
130
- sign: string;
131
- relatedNumber: number;
132
- }): NodeId<WesternAstrologyTypes.WESTERN_ZODIAC_SIGN>;
133
- addTarotArkAnnu({ node, tarotArkAnnu, data, relatedNumber, suit, }: {
134
- node: NodeId<NodeType>;
135
- tarotArkAnnu: string;
136
- data: NodeData<TarotTypes.TAROT_ARK_ANNU>;
137
- relatedNumber: number;
138
- suit?: string;
139
- }): NodeId<TarotTypes.TAROT_ARK_ANNU>;
140
- }
141
-
142
- /**
143
- * Loads the Hermetic Qabalah system into the tree of life
144
- */
145
- declare function loadHermeticQabalah(tree: TreeOfLife): TreeOfLife;
146
- declare function loadColors(tree: TreeOfLife): TreeOfLife;
147
- declare function loadMusicalNotes(tree: TreeOfLife): TreeOfLife;
148
- declare const LOADERS$2: {
149
- base: typeof loadHermeticQabalah;
150
- colors: typeof loadColors;
151
- music: typeof loadMusicalNotes;
152
- westernAstrology: Loader;
153
- };
154
-
155
- declare const LOADERS$1: {
156
- base: Loader;
157
- colors: Loader;
158
- music: Loader;
159
- westernAstrology: Loader;
160
- tarot: Loader;
161
- };
162
-
163
- /**
164
- * Loads the Lurianic Kabbalah system into the tree of life
165
- */
166
- declare function loadLurianicKabbalah(tree: TreeOfLife): TreeOfLife;
167
- declare const LOADERS: {
168
- base: typeof loadLurianicKabbalah;
169
- };
170
-
171
- type System = {
172
- SYSTEM: "kaabalah" | "hermetic-qabalah" | "lurianic-kabbalah";
173
- LOADERS: Record<string, Loader>;
174
- UNLOADERS: Record<string, Unloader>;
175
- BRIDGES: Bridge[];
176
- };
177
- declare const SYSTEMS: System[];
178
- type SystemKey = (typeof SYSTEMS)[number]["SYSTEM"];
179
- type PartKey = keyof typeof LOADERS$1 | keyof typeof LOADERS$2 | keyof typeof LOADERS;
180
- type Loader = (t: TreeOfLife) => TreeOfLife;
181
- type Unloader = (t: TreeOfLife) => void;
182
- type Bridge = {
183
- id: string;
184
- needs: PartKey[];
185
- run: (t: TreeOfLife) => void;
186
- };
187
-
188
- type CorrespondenceSource = {
189
- kind: "manual";
190
- } | {
191
- kind: "system";
192
- system: SystemKey;
193
- } | {
194
- kind: "part";
195
- system: SystemKey;
196
- part: PartKey;
197
- } | {
198
- kind: "bridge";
199
- system: SystemKey;
200
- bridgeId: string;
201
- parts: PartKey[];
202
- } | {
203
- kind: "overlay";
204
- overlayId: string;
205
- label?: string;
206
- };
207
- interface CorrespondenceMetadata {
208
- kind?: string;
209
- label?: string;
210
- tags?: string[];
211
- attributes?: Record<string, unknown>;
212
- }
213
- interface CorrespondenceEdge {
214
- id: string;
215
- left: NodeId<NodeType>;
216
- right: NodeId<NodeType>;
217
- metadata?: CorrespondenceMetadata;
218
- sources: readonly CorrespondenceSource[];
219
- }
220
- type TreeNoteTarget = {
221
- kind: "node";
222
- nodeId: NodeId<NodeType>;
223
- } | {
224
- kind: "correspondence";
225
- left: NodeId<NodeType>;
226
- right: NodeId<NodeType>;
227
- };
228
- interface TreeNote {
229
- id: string;
230
- text: string;
231
- kind?: string;
232
- target: TreeNoteTarget;
233
- metadata?: Record<string, unknown>;
234
- }
235
- type TreeOverlayCorrespondence = {
236
- op: "add";
237
- left: NodeId<NodeType>;
238
- right: NodeId<NodeType>;
239
- metadata?: CorrespondenceMetadata;
240
- } | {
241
- op: "remove";
242
- left: NodeId<NodeType>;
243
- right: NodeId<NodeType>;
244
- } | {
245
- op: "annotate";
246
- left: NodeId<NodeType>;
247
- right: NodeId<NodeType>;
248
- metadata?: CorrespondenceMetadata;
249
- };
250
- interface TreeOverlay {
251
- id: string;
252
- name?: string;
253
- version?: string;
254
- nodes?: Node<NodeType>[];
255
- correspondences?: TreeOverlayCorrespondence[];
256
- notes?: TreeNote[];
257
- }
258
- interface TreeWorkspaceDescriptor {
259
- id?: string;
260
- name?: string;
261
- version?: string;
262
- system?: SystemKey;
263
- parts?: readonly string[];
264
- cacheKey?: string;
265
- }
266
- interface CorrespondenceStep {
267
- from: NodeId<NodeType>;
268
- to: NodeId<NodeType>;
269
- edge: CorrespondenceEdge;
270
- }
271
- interface CorrespondenceMatch<T extends NodeType = NodeType> {
272
- node: Node<T>;
273
- distance: number;
274
- path: readonly CorrespondenceStep[];
275
- }
276
- type CorrespondenceMap = Partial<{
277
- [K in NodeType]: CorrespondenceMatch<K>[];
278
- }>;
279
- declare function makeCorrespondenceId(left: NodeId<NodeType>, right: NodeId<NodeType>): string;
280
-
281
- export { type Bridge as B, type CorrespondenceSource as C, type Loader as L, type PartKey as P, type System as S, type TreeNoteTarget as T, type Unloader as U, type CorrespondenceMetadata as a, type CorrespondenceEdge as b, type TreeNote as c, type TreeOverlayCorrespondence as d, type TreeOverlay as e, type TreeWorkspaceDescriptor as f, type CorrespondenceStep as g, type CorrespondenceMatch as h, type CorrespondenceMap as i, SYSTEMS as j, type SystemKey as k, TreeOfLife as l, makeCorrespondenceId as m };