@soulcraft/sdk 1.4.8 → 1.4.9

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.
@@ -2,12 +2,7 @@
2
2
  * @module formats/types
3
3
  * @description Soulcraft portable content format type definitions.
4
4
  *
5
- * These types mirror `@soulcraft/formats` exactly. Once `@soulcraft/formats`
6
- * ships compiled `.d.ts` output (rather than raw `.ts` source), this module
7
- * can be replaced with simple re-exports. Until then, the types live here
8
- * to avoid pulling `@soulcraft/formats`' Zod schemas into the SDK's type-check.
9
- *
10
- * See: handoff action "Remove duplicate format types from SDK src/modules/formats/"
5
+ * All types are re-exported from `@soulcraft/formats` (compiled dist/).
11
6
  *
12
7
  * | Format | Extension | Purpose |
13
8
  * |---------|------------------|----------------------------------------------|
@@ -16,39 +11,10 @@
16
11
  * | WSLIDE | `.wslide.json` | Slide deck presentations |
17
12
  * | WQUIZ | `.wquiz.json` | Assessments and quizzes |
18
13
  */
19
- export type { WvizDocument, WvizEntity, WvizEdge, WvizSnapshot, WvizViewType, } from './wviz.js';
14
+ export type { WvizDocument, WvizEntity, WvizEdge, WvizSnapshot, WvizViewType } from './wviz.js';
20
15
  export type { WdocDocument, WdocMeta, WdocBlock, WdocInlineContent, WdocTextNode, WdocMark, WdocParagraphBlock, WdocHeadingBlock, WdocBlockquoteBlock, WdocCodeBlock, WdocBulletListBlock, WdocOrderedListBlock, WdocListItemBlock, WdocTaskListBlock, WdocTaskItemBlock, WdocImageBlock, WdocVideoBlock, WdocIconBlock, WdocSvgEmbedBlock, WdocEmbedBlock, WdocTableBlock, WdocTableRowBlock, WdocTableCellBlock, WdocTableHeaderBlock, WdocHorizontalRuleBlock, WdocCalloutBlock, } from './wdoc.js';
21
- export type { WslideDocument, WslideSlide, WslideBackground, WslideLayout, WslideTransition, WslideConfig, } from './wslide.js';
22
- export type { WquizDocument, WquizQuestion, WquizQuestionType, WquizAnswer, WquizScoringRules, } from './wquiz.js';
23
- /**
24
- * Discriminant string identifying the Soulcraft document format.
25
- *
26
- * Stored as the `format` field on every document. Use this for narrowing:
27
- * ```typescript
28
- * if (doc.format === 'wdoc') { ... }
29
- * ```
30
- */
31
- export type SoulcraftFormat = 'wviz' | 'wdoc' | 'wslide' | 'wquiz';
32
- /**
33
- * All Soulcraft format strings as a const array — useful for validation.
34
- *
35
- * @example
36
- * ```typescript
37
- * const isKnownFormat = (s: string): s is SoulcraftFormat =>
38
- * (SOULCRAFT_FORMATS as readonly string[]).includes(s)
39
- * ```
40
- */
41
- export declare const SOULCRAFT_FORMATS: readonly ["wviz", "wdoc", "wslide", "wquiz"];
42
- /**
43
- * Minimal base shape shared by all Soulcraft format documents.
44
- *
45
- * Every Soulcraft document has a `format` discriminant and a `version` string.
46
- * Cast an unknown JSON object to this type first, then narrow by `format`.
47
- */
48
- export interface SoulcraftFormatDocument {
49
- /** Format discriminant. Use to narrow to the specific document type. */
50
- format: SoulcraftFormat;
51
- /** Schema version string (e.g. `'1.0'`). */
52
- version: string;
53
- }
16
+ export type { WslideDocument, WslideSlide, WslideBackground, WslideLayout, WslideTransition, WslideConfig } from './wslide.js';
17
+ export type { WquizDocument, WquizQuestion, WquizQuestionType, WquizAnswer, WquizScoringRules } from './wquiz.js';
18
+ export type { SoulcraftFormat, SoulcraftFormatDocument } from '@soulcraft/formats';
19
+ export { SOULCRAFT_FORMATS } from '@soulcraft/formats';
54
20
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/formats/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,YAAY,EACV,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,YAAY,GACb,MAAM,WAAW,CAAA;AAElB,YAAY,EACV,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,WAAW,CAAA;AAElB,YAAY,EACV,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,YAAY,GACb,MAAM,aAAa,CAAA;AAEpB,YAAY,EACV,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,iBAAiB,GAClB,MAAM,YAAY,CAAA;AAMnB;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;AAElE;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,8CAAoF,CAAA;AAElH;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,wEAAwE;IACxE,MAAM,EAAE,eAAe,CAAA;IACvB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAA;CAChB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/formats/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE/F,YAAY,EACV,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,WAAW,CAAA;AAElB,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE9H,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAMjH,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA"}
@@ -2,12 +2,7 @@
2
2
  * @module formats/types
3
3
  * @description Soulcraft portable content format type definitions.
4
4
  *
5
- * These types mirror `@soulcraft/formats` exactly. Once `@soulcraft/formats`
6
- * ships compiled `.d.ts` output (rather than raw `.ts` source), this module
7
- * can be replaced with simple re-exports. Until then, the types live here
8
- * to avoid pulling `@soulcraft/formats`' Zod schemas into the SDK's type-check.
9
- *
10
- * See: handoff action "Remove duplicate format types from SDK src/modules/formats/"
5
+ * All types are re-exported from `@soulcraft/formats` (compiled dist/).
11
6
  *
12
7
  * | Format | Extension | Purpose |
13
8
  * |---------|------------------|----------------------------------------------|
@@ -16,14 +11,5 @@
16
11
  * | WSLIDE | `.wslide.json` | Slide deck presentations |
17
12
  * | WQUIZ | `.wquiz.json` | Assessments and quizzes |
18
13
  */
19
- /**
20
- * All Soulcraft format strings as a const array — useful for validation.
21
- *
22
- * @example
23
- * ```typescript
24
- * const isKnownFormat = (s: string): s is SoulcraftFormat =>
25
- * (SOULCRAFT_FORMATS as readonly string[]).includes(s)
26
- * ```
27
- */
28
- export const SOULCRAFT_FORMATS = ['wviz', 'wdoc', 'wslide', 'wquiz'];
14
+ export { SOULCRAFT_FORMATS } from '@soulcraft/formats';
29
15
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/formats/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAsEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAA+C,CAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/formats/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA0CH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1,263 +1,10 @@
1
1
  /**
2
2
  * @module formats/wdoc
3
- * @description Type definitions for the WDOC (Workshop Document) format.
3
+ * @description Re-exports WDOC types from `@soulcraft/formats`.
4
4
  *
5
5
  * WDOC is a block-based JSON document format compatible with the TipTap/ProseMirror
6
- * document schema. It extends plain Markdown with rich content blocks (video, icon,
7
- * table, callout, embed) and is the native format for Workshop's document editor.
8
- *
9
- * WDOC files are stored in the VFS with the `.wdoc` extension. The format is a
10
- * strict superset of Markdown — all Markdown content can be represented as WDOC,
11
- * but not vice versa.
12
- *
13
- * @example Reading a WDOC from the VFS
14
- * ```typescript
15
- * const buf = await sdk.vfs.readFile('/projects/my-project/README.wdoc')
16
- * const doc: WdocDocument = JSON.parse(buf.toString('utf-8'))
17
- * console.log(doc.meta.title)
18
- * ```
19
- */
20
- /**
21
- * A WDOC document — the top-level container for all block content.
22
- */
23
- export interface WdocDocument {
24
- /** Format discriminator. Always `'doc'`. */
25
- type: 'doc';
26
- /** Schema version. Currently `'1.0'`. */
27
- version: string;
28
- /** Document metadata (title, author, timestamps, tags). */
29
- meta: WdocMeta;
30
- /** Ordered list of content blocks. */
31
- content: WdocBlock[];
32
- }
33
- /**
34
- * Document-level metadata stored in the WDOC header.
35
- */
36
- export interface WdocMeta {
37
- /** Human-readable document title. */
38
- title?: string;
39
- /** Template ID this document was created from. */
40
- template?: string;
41
- /** ISO 8601 creation timestamp. */
42
- created?: string;
43
- /** ISO 8601 last-modified timestamp. */
44
- modified?: string;
45
- /** Document author (user ID or display name). */
46
- author?: string;
47
- /** Arbitrary tags for categorization. */
48
- tags?: string[];
49
- /** Whether this document was assembled from multiple source files. */
50
- merged?: boolean;
51
- /** Number of source files when `merged` is true. */
52
- sourceCount?: number;
53
- }
54
- /**
55
- * A text leaf node with optional formatting marks.
56
- */
57
- export interface WdocTextNode {
58
- type: 'text';
59
- /** The raw text content. */
60
- text: string;
61
- /** Applied inline formatting marks. */
62
- marks?: WdocMark[];
63
- }
64
- /**
65
- * An inline formatting mark applied to a text node.
66
- */
67
- export type WdocMark = {
68
- type: 'bold';
69
- } | {
70
- type: 'italic';
71
- } | {
72
- type: 'strike';
73
- } | {
74
- type: 'code';
75
- } | {
76
- type: 'underline';
77
- } | {
78
- type: 'link';
79
- attrs: {
80
- href: string;
81
- target?: string;
82
- };
83
- } | {
84
- type: 'highlight';
85
- attrs?: {
86
- color?: string;
87
- };
88
- } | {
89
- type: 'textStyle';
90
- attrs?: {
91
- color?: string;
92
- fontSize?: string;
93
- };
94
- };
95
- /** Inline content — text nodes or inline icon blocks. */
96
- export type WdocInlineContent = WdocTextNode | WdocIconBlock;
97
- /**
98
- * Union of all block types that can appear in a WDOC document.
6
+ * document schema. It is the native format for Workshop's document editor and is
7
+ * stored in the VFS with the `.wdoc` extension.
99
8
  */
100
- export type WdocBlock = WdocParagraphBlock | WdocHeadingBlock | WdocBlockquoteBlock | WdocCodeBlock | WdocBulletListBlock | WdocOrderedListBlock | WdocListItemBlock | WdocTaskListBlock | WdocTaskItemBlock | WdocImageBlock | WdocVideoBlock | WdocIconBlock | WdocSvgEmbedBlock | WdocEmbedBlock | WdocTableBlock | WdocTableRowBlock | WdocTableCellBlock | WdocTableHeaderBlock | WdocHorizontalRuleBlock | WdocCalloutBlock;
101
- /** A paragraph block. */
102
- export interface WdocParagraphBlock {
103
- type: 'paragraph';
104
- attrs?: {
105
- textAlign?: 'left' | 'center' | 'right' | 'justify';
106
- };
107
- content?: WdocInlineContent[];
108
- }
109
- /** A heading block (H1–H6). */
110
- export interface WdocHeadingBlock {
111
- type: 'heading';
112
- attrs: {
113
- level: 1 | 2 | 3 | 4 | 5 | 6;
114
- textAlign?: 'left' | 'center' | 'right';
115
- };
116
- content?: WdocInlineContent[];
117
- }
118
- /** A block quotation. */
119
- export interface WdocBlockquoteBlock {
120
- type: 'blockquote';
121
- content?: WdocBlock[];
122
- }
123
- /** A fenced code block with optional language syntax highlighting. */
124
- export interface WdocCodeBlock {
125
- type: 'codeBlock';
126
- attrs?: {
127
- language?: string;
128
- };
129
- content?: WdocTextNode[];
130
- }
131
- /** An unordered (bullet) list. */
132
- export interface WdocBulletListBlock {
133
- type: 'bulletList';
134
- content?: WdocListItemBlock[];
135
- }
136
- /** An ordered (numbered) list. */
137
- export interface WdocOrderedListBlock {
138
- type: 'orderedList';
139
- attrs?: {
140
- start?: number;
141
- };
142
- content?: WdocListItemBlock[];
143
- }
144
- /** A single list item (used in both bullet and ordered lists). */
145
- export interface WdocListItemBlock {
146
- type: 'listItem';
147
- content?: WdocBlock[];
148
- }
149
- /** A task/checklist. */
150
- export interface WdocTaskListBlock {
151
- type: 'taskList';
152
- content?: WdocTaskItemBlock[];
153
- }
154
- /** A single task item with a checked/unchecked state. */
155
- export interface WdocTaskItemBlock {
156
- type: 'taskItem';
157
- attrs: {
158
- checked: boolean;
159
- };
160
- content?: WdocBlock[];
161
- }
162
- /** A horizontal rule divider. */
163
- export interface WdocHorizontalRuleBlock {
164
- type: 'horizontalRule';
165
- }
166
- /** An image block. */
167
- export interface WdocImageBlock {
168
- type: 'image';
169
- attrs: {
170
- src: string;
171
- alt?: string;
172
- title?: string;
173
- width?: number;
174
- height?: number;
175
- };
176
- }
177
- /** A video block (self-hosted or embedded). */
178
- export interface WdocVideoBlock {
179
- type: 'video';
180
- attrs: {
181
- src: string;
182
- provider?: 'youtube' | 'vimeo' | 'self-hosted';
183
- poster?: string;
184
- title?: string;
185
- width?: number;
186
- height?: number;
187
- };
188
- }
189
- /** An inline icon from the Iconify library. */
190
- export interface WdocIconBlock {
191
- type: 'icon';
192
- attrs: {
193
- /** Iconify icon identifier, e.g. `'mdi:rocket-launch'`. */
194
- icon: string;
195
- size?: number;
196
- color?: string;
197
- };
198
- marks?: WdocMark[];
199
- }
200
- /** An SVG file embed. */
201
- export interface WdocSvgEmbedBlock {
202
- type: 'svgEmbed';
203
- attrs: {
204
- /** Path to the `.svg` file in the VFS. */
205
- src: string;
206
- editable?: boolean;
207
- /** When true, inline the SVG content rather than referencing it. */
208
- inline?: boolean;
209
- width?: number;
210
- height?: number;
211
- };
212
- /** Inlined SVG markup when `attrs.inline` is true. */
213
- content?: string;
214
- }
215
- /** An oEmbed/iframe embed (Twitter, Figma, CodePen, etc.). */
216
- export interface WdocEmbedBlock {
217
- type: 'embed';
218
- attrs: {
219
- url: string;
220
- provider?: 'twitter' | 'figma' | 'codepen' | 'youtube' | 'gist' | 'other';
221
- width?: number;
222
- height?: number;
223
- };
224
- }
225
- /** A table block. */
226
- export interface WdocTableBlock {
227
- type: 'table';
228
- content?: WdocTableRowBlock[];
229
- }
230
- /** A table row. */
231
- export interface WdocTableRowBlock {
232
- type: 'tableRow';
233
- content?: (WdocTableCellBlock | WdocTableHeaderBlock)[];
234
- }
235
- /** A table body cell. */
236
- export interface WdocTableCellBlock {
237
- type: 'tableCell';
238
- attrs?: {
239
- colspan?: number;
240
- rowspan?: number;
241
- };
242
- content?: WdocBlock[];
243
- }
244
- /** A table header cell. */
245
- export interface WdocTableHeaderBlock {
246
- type: 'tableHeader';
247
- attrs?: {
248
- colspan?: number;
249
- rowspan?: number;
250
- };
251
- content?: WdocBlock[];
252
- }
253
- /** A styled callout/alert block. */
254
- export interface WdocCalloutBlock {
255
- type: 'callout';
256
- attrs: {
257
- variant: 'info' | 'warning' | 'success' | 'error' | 'tip';
258
- /** Optional Iconify icon override. */
259
- icon?: string;
260
- };
261
- content?: WdocBlock[];
262
- }
9
+ export type { WdocDocument, WdocMeta, WdocBlock, WdocInlineContent, WdocTextNode, WdocMark, WdocParagraphBlock, WdocHeadingBlock, WdocBlockquoteBlock, WdocCodeBlock, WdocBulletListBlock, WdocOrderedListBlock, WdocListItemBlock, WdocTaskListBlock, WdocTaskItemBlock, WdocImageBlock, WdocVideoBlock, WdocIconBlock, WdocSvgEmbedBlock, WdocEmbedBlock, WdocTableBlock, WdocTableRowBlock, WdocTableCellBlock, WdocTableHeaderBlock, WdocHorizontalRuleBlock, WdocCalloutBlock, } from '@soulcraft/formats/wdoc';
263
10
  //# sourceMappingURL=wdoc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wdoc.d.ts","sourceRoot":"","sources":["../../../src/modules/formats/wdoc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,IAAI,EAAE,KAAK,CAAA;IACX,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAA;IACf,2DAA2D;IAC3D,IAAI,EAAE,QAAQ,CAAA;IACd,sCAAsC;IACtC,OAAO,EAAE,SAAS,EAAE,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,sEAAsE;IACtE,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAMD;;GAEG;AACH,MAA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AAI,EAAE,aAAa,CAAA;IACnB,KAAK,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9C,OAAO,CAAC,EAAE,SAAS,EAAE,CAAA;CACtB;AAMD,oCAAoC;AACpC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE;QACL,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,CAAA;QACzD,sCAAsC;QACtC,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,OAAO,CAAC,EAAE,SAAS,EAAE,CAAA;CACtB"}
1
+ {"version":3,"file":"wdoc.d.ts","sourceRoot":"","sources":["../../../src/modules/formats/wdoc.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EACV,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,yBAAyB,CAAA"}
@@ -1,21 +1,10 @@
1
1
  /**
2
2
  * @module formats/wdoc
3
- * @description Type definitions for the WDOC (Workshop Document) format.
3
+ * @description Re-exports WDOC types from `@soulcraft/formats`.
4
4
  *
5
5
  * WDOC is a block-based JSON document format compatible with the TipTap/ProseMirror
6
- * document schema. It extends plain Markdown with rich content blocks (video, icon,
7
- * table, callout, embed) and is the native format for Workshop's document editor.
8
- *
9
- * WDOC files are stored in the VFS with the `.wdoc` extension. The format is a
10
- * strict superset of Markdown — all Markdown content can be represented as WDOC,
11
- * but not vice versa.
12
- *
13
- * @example Reading a WDOC from the VFS
14
- * ```typescript
15
- * const buf = await sdk.vfs.readFile('/projects/my-project/README.wdoc')
16
- * const doc: WdocDocument = JSON.parse(buf.toString('utf-8'))
17
- * console.log(doc.meta.title)
18
- * ```
6
+ * document schema. It is the native format for Workshop's document editor and is
7
+ * stored in the VFS with the `.wdoc` extension.
19
8
  */
20
9
  export {};
21
10
  //# sourceMappingURL=wdoc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wdoc.js","sourceRoot":"","sources":["../../../src/modules/formats/wdoc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG"}
1
+ {"version":3,"file":"wdoc.js","sourceRoot":"","sources":["../../../src/modules/formats/wdoc.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -1,122 +1,11 @@
1
1
  /**
2
2
  * @module formats/wquiz
3
- * @description Type definitions for the WQUIZ (Workshop Quiz) document format.
3
+ * @description Re-exports WQUIZ types from `@soulcraft/formats`.
4
4
  *
5
5
  * WQUIZ documents are portable assessment and quiz definitions. They support
6
- * multiple-choice, true/false, short-answer, and essay question types, with
7
- * per-question point values, optional explanations, and configurable scoring.
8
- *
9
- * WQUIZ files are stored in the VFS with the `.wquiz.json` extension. Academy
10
- * uses them for module assessments; Workshop can render them for self-check quizzes.
11
- *
12
- * Question content supports rich formatting via WDOC blocks, enabling code
13
- * snippets, images, and callouts inside questions and answer choices.
14
- *
15
- * @example Reading a WQUIZ from the VFS
16
- * ```typescript
17
- * const buf = await sdk.vfs.readFile('/assessments/module-1.wquiz.json')
18
- * const quiz: WquizDocument = JSON.parse(buf.toString('utf-8'))
19
- * console.log(`${quiz.questions.length} questions, ${quiz.scoring.totalPoints} points`)
20
- * ```
21
- */
22
- import type { WdocBlock } from './wdoc.js';
23
- /**
24
- * A WQUIZ assessment document.
25
- */
26
- export interface WquizDocument {
27
- /** Format discriminator. Always `'wquiz'`. */
28
- format: 'wquiz';
29
- /** Schema version. Currently `'1.0'`. */
30
- version: '1.0';
31
- /** Quiz title. */
32
- title: string;
33
- /** Optional description shown to the learner before starting. */
34
- description?: string;
35
- /** ISO 8601 creation timestamp. */
36
- createdAt?: string;
37
- /** ISO 8601 last-modified timestamp. */
38
- updatedAt?: string;
39
- /** Ordered list of questions. */
40
- questions: WquizQuestion[];
41
- /** Scoring configuration. */
42
- scoring: WquizScoringRules;
43
- /** Optional metadata for product-specific use (e.g. Academy module ID). */
44
- metadata?: Record<string, unknown>;
45
- }
46
- /**
47
- * Question type discriminant.
48
- *
49
- * - `multiple-choice` — One or more correct answers from a fixed list
50
- * - `true-false` — Binary correct/incorrect assertion
51
- * - `short-answer` — Free-text response, graded by exact match or AI review
52
- * - `essay` — Long-form free-text response, graded by human or AI review
53
- */
54
- export type WquizQuestionType = 'multiple-choice' | 'true-false' | 'short-answer' | 'essay';
55
- /**
56
- * A single quiz question.
57
- */
58
- export interface WquizQuestion {
59
- /** Stable unique identifier for this question. */
60
- id: string;
61
- /** Question type. */
62
- type: WquizQuestionType;
63
- /** Plain-text question stem (used as fallback when `content` is absent). */
64
- text: string;
65
- /** Rich-text question content (WDOC blocks). When present, rendered instead of `text`. */
66
- content?: WdocBlock[];
67
- /** Available answer choices (for `multiple-choice` and `true-false` types). */
68
- answers: WquizAnswer[];
69
- /**
70
- * IDs of correct answer choices.
71
- * - For `multiple-choice`: one or more answer IDs.
72
- * - For `true-false`: one of the two generated answer IDs.
73
- * - For `short-answer`: the accepted text strings (exact match).
74
- * - For `essay`: omit; graded externally.
75
- */
76
- correct?: string[];
77
- /** Explanation shown after the learner answers (Markdown or plain text). */
78
- explanation?: string;
79
- /** Point value for this question. Defaults to `1`. */
80
- points?: number;
81
- /** Whether to randomize the order of `answers` when presenting. Defaults to `false`. */
82
- shuffleAnswers?: boolean;
83
- }
84
- /**
85
- * A single answer choice within a question.
86
- */
87
- export interface WquizAnswer {
88
- /** Stable unique identifier for this answer choice. */
89
- id: string;
90
- /** Plain-text answer label (used as fallback when `content` is absent). */
91
- text: string;
92
- /** Rich-text answer content (WDOC blocks). When present, rendered instead of `text`. */
93
- content?: WdocBlock[];
94
- /** Per-choice feedback shown after the learner answers. */
95
- feedback?: string;
96
- /**
97
- * Partial-credit weight (0–1) for this answer choice.
98
- * Only used when `WquizScoringRules.allowPartialCredit` is `true`.
99
- * A weight of `1.0` means full credit; `0.5` means half credit.
100
- */
101
- weight?: number;
102
- }
103
- /**
104
- * Scoring rules for the entire quiz.
6
+ * multiple-choice, true/false, short-answer, and essay question types with
7
+ * per-question point values and configurable scoring. Stored in the VFS with
8
+ * the `.wquiz.json` extension; used by Academy for module assessments.
105
9
  */
106
- export interface WquizScoringRules {
107
- /** Minimum score (as a percentage 0–100) required to pass. */
108
- passingScore: number;
109
- /** Total possible points across all questions. */
110
- totalPoints: number;
111
- /** Whether partial credit is allowed on multi-select questions. Defaults to `false`. */
112
- allowPartialCredit?: boolean;
113
- /** Whether to penalize wrong answers (negative marking). Defaults to `false`. */
114
- negativeMark?: boolean;
115
- /** Maximum number of attempts allowed. `0` = unlimited. Defaults to `0`. */
116
- maxAttempts?: number;
117
- /** Time limit in seconds. `0` = no limit. Defaults to `0`. */
118
- timeLimitSeconds?: number;
119
- /** Whether to randomize question order when presenting. Defaults to `false`. */
120
- shuffleQuestions?: boolean;
121
- }
10
+ export type { WquizDocument, WquizQuestion, WquizQuestionType, WquizAnswer, WquizScoringRules } from '@soulcraft/formats/wquiz';
122
11
  //# sourceMappingURL=wquiz.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wquiz.d.ts","sourceRoot":"","sources":["../../../src/modules/formats/wquiz.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAM1C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,8CAA8C;IAC9C,MAAM,EAAE,OAA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;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAMD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAA;IACpB,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAA;IACnB,wFAAwF;IACxF,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,iFAAiF;IACjF,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B"}
1
+ {"version":3,"file":"wquiz.d.ts","sourceRoot":"","sources":["../../../src/modules/formats/wquiz.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA"}
@@ -1,23 +1,11 @@
1
1
  /**
2
2
  * @module formats/wquiz
3
- * @description Type definitions for the WQUIZ (Workshop Quiz) document format.
3
+ * @description Re-exports WQUIZ types from `@soulcraft/formats`.
4
4
  *
5
5
  * WQUIZ documents are portable assessment and quiz definitions. They support
6
- * multiple-choice, true/false, short-answer, and essay question types, with
7
- * per-question point values, optional explanations, and configurable scoring.
8
- *
9
- * WQUIZ files are stored in the VFS with the `.wquiz.json` extension. Academy
10
- * uses them for module assessments; Workshop can render them for self-check quizzes.
11
- *
12
- * Question content supports rich formatting via WDOC blocks, enabling code
13
- * snippets, images, and callouts inside questions and answer choices.
14
- *
15
- * @example Reading a WQUIZ from the VFS
16
- * ```typescript
17
- * const buf = await sdk.vfs.readFile('/assessments/module-1.wquiz.json')
18
- * const quiz: WquizDocument = JSON.parse(buf.toString('utf-8'))
19
- * console.log(`${quiz.questions.length} questions, ${quiz.scoring.totalPoints} points`)
20
- * ```
6
+ * multiple-choice, true/false, short-answer, and essay question types with
7
+ * per-question point values and configurable scoring. Stored in the VFS with
8
+ * the `.wquiz.json` extension; used by Academy for module assessments.
21
9
  */
22
10
  export {};
23
11
  //# sourceMappingURL=wquiz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wquiz.js","sourceRoot":"","sources":["../../../src/modules/formats/wquiz.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
1
+ {"version":3,"file":"wquiz.js","sourceRoot":"","sources":["../../../src/modules/formats/wquiz.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
@@ -1,130 +1,10 @@
1
1
  /**
2
2
  * @module formats/wslide
3
- * @description Type definitions for the WSLIDE (Workshop Slide Deck) document format.
3
+ * @description Re-exports WSLIDE types from `@soulcraft/formats`.
4
4
  *
5
5
  * WSLIDE documents are portable slide presentations. Each slide contains rich
6
6
  * content blocks (in WDOC format), a layout preset, optional background, and
7
- * transition configuration.
8
- *
9
- * WSLIDE files are stored in the VFS with the `.wslide.json` extension and can
10
- * be rendered by any Soulcraft product that embeds the Workshop slideshow viewer.
11
- *
12
- * Content blocks within each slide reuse the WDOC block types — the same block
13
- * system that powers the Workshop document editor applies inside slides.
14
- *
15
- * @example Reading a WSLIDE document from the VFS
16
- * ```typescript
17
- * const buf = await sdk.vfs.readFile('/presentations/onboarding.wslide.json')
18
- * const deck: WslideDocument = JSON.parse(buf.toString('utf-8'))
19
- * console.log(`${deck.slides.length} slides`)
20
- * ```
21
- */
22
- import type { WdocBlock } from './wdoc.js';
23
- /**
24
- * Predefined layout preset for a slide.
25
- *
26
- * - `title` — Centered title + subtitle
27
- * - `content` — Title bar + full content area below
28
- * - `two-column` — Title bar + two equal-width content columns
29
- * - `image-left` — Image panel on the left, content on the right
30
- * - `image-right` — Content on the left, image panel on the right
31
- * - `image-full` — Full-bleed background image with overlaid text
32
- * - `blank` — No preset layout; positions are fully custom
33
- */
34
- export type WslideLayout = 'title' | 'content' | 'two-column' | 'image-left' | 'image-right' | 'image-full' | 'blank';
35
- /**
36
- * Slide-to-slide transition animation.
37
- *
38
- * - `none` — Instant cut
39
- * - `fade` — Cross-fade dissolve
40
- * - `slide` / `slide-left` — Slide the new content in from the right
41
- * - `slide-right` — Slide the new content in from the left
42
- * - `slide-up` / `slide-down` — Vertical slide
43
- * - `zoom` / `zoom-in` — Zoom in from center
44
- * - `zoom-out` — Zoom out to reveal next slide
45
- */
46
- export type WslideTransition = 'none' | 'fade' | 'slide' | 'slide-left' | 'slide-right' | 'slide-up' | 'slide-down' | 'zoom' | 'zoom-in' | 'zoom-out';
47
- /**
48
- * A WSLIDE presentation document.
49
- */
50
- export interface WslideDocument {
51
- /** Format discriminator. Always `'wslide'`. */
52
- format: 'wslide';
53
- /** Schema version. Currently `'1.0'`. */
54
- version: '1.0';
55
- /** Presentation title. */
56
- title?: string;
57
- /** Author name or user ID. */
58
- author?: string;
59
- /** ISO 8601 creation timestamp. */
60
- createdAt?: string;
61
- /** ISO 8601 last-modified timestamp. */
62
- updatedAt?: string;
63
- /** Ordered list of slides. */
64
- slides: WslideSlide[];
65
- /** Presentation-level display settings. */
66
- config?: WslideConfig;
67
- }
68
- /**
69
- * A single slide in a WSLIDE presentation.
70
- */
71
- export interface WslideSlide {
72
- /** Unique slide identifier (stable across reorders). */
73
- id: string;
74
- /** Slide title shown in the navigation/outline panel. */
75
- title: string;
76
- /** Rich content blocks (WDOC format). */
77
- content: WdocBlock[];
78
- /** Speaker notes (plain text or Markdown). Not shown to the audience. */
79
- notes?: string;
80
- /** Background override for this slide (overrides the presentation default). */
81
- background?: WslideBackground;
82
- /** Layout preset for this slide. */
83
- layout?: WslideLayout;
84
- /** Transition to use when advancing TO this slide. */
85
- transition?: WslideTransition;
86
- /** Arbitrary per-slide metadata for product-specific use. */
87
- metadata?: Record<string, unknown>;
88
- }
89
- /**
90
- * Slide background configuration.
91
- */
92
- export interface WslideBackground {
93
- /** Background type. */
94
- type: 'color' | 'gradient' | 'image';
95
- /**
96
- * Background value:
97
- * - `color`: CSS hex or named color, e.g. `'#1a1a2e'`
98
- * - `gradient`: CSS gradient string, e.g. `'linear-gradient(135deg, #1a1a2e, #16213e)'`
99
- * - `image`: URL or VFS path to an image file
100
- */
101
- value: string;
102
- /** Opacity for image backgrounds (0–1). Defaults to 1. */
103
- opacity?: number;
104
- }
105
- /**
106
- * Presentation-level display configuration.
7
+ * transition configuration. Stored in the VFS with the `.wslide.json` extension.
107
8
  */
108
- export interface WslideConfig {
109
- /** Auto-advance interval in seconds. `0` = manual navigation. Defaults to `0`. */
110
- autoAdvance?: number;
111
- /** Show slide numbers in the viewer. Defaults to `true`. */
112
- showSlideNumbers?: boolean;
113
- /** Show a progress bar across the bottom. Defaults to `true`. */
114
- showProgress?: boolean;
115
- /** Show previous/next navigation arrows. Defaults to `true`. */
116
- showNavigation?: boolean;
117
- /** Show the speaker notes panel. Defaults to `false`. */
118
- showNotes?: boolean;
119
- /** Enable keyboard navigation (arrow keys, space). Defaults to `true`. */
120
- keyboardNavigation?: boolean;
121
- /** Loop back to the first slide after the last. Defaults to `false`. */
122
- loop?: boolean;
123
- /** Default transition for all slides (overridden per-slide by `WslideSlide.transition`). */
124
- defaultTransition?: WslideTransition;
125
- /** Slide aspect ratio. Defaults to `'16:9'`. */
126
- aspectRatio?: '16:9' | '4:3' | '16:10' | 'auto';
127
- /** Color theme. Defaults to `'auto'` (follows system preference). */
128
- theme?: 'dark' | 'light' | 'auto';
129
- }
9
+ export type { WslideDocument, WslideSlide, WslideBackground, WslideLayout, WslideTransition, WslideConfig } from '@soulcraft/formats/wslide';
130
10
  //# sourceMappingURL=wslide.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wslide.d.ts","sourceRoot":"","sources":["../../../src/modules/formats/wslide.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,K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,CAAC,CAAA;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uBAAuB;IACvB,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAA;IACpC;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,iEAAiE;IACjE,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gEAAgE;IAChE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,wEAAwE;IACxE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,4FAA4F;IAC5F,iBAAiB,CAAC,EAAE,gBAAgB,CAAA;IACpC,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAA;IAC/C,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;CAClC"}
1
+ {"version":3,"file":"wslide.d.ts","sourceRoot":"","sources":["../../../src/modules/formats/wslide.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA"}
@@ -1,23 +1,10 @@
1
1
  /**
2
2
  * @module formats/wslide
3
- * @description Type definitions for the WSLIDE (Workshop Slide Deck) document format.
3
+ * @description Re-exports WSLIDE types from `@soulcraft/formats`.
4
4
  *
5
5
  * WSLIDE documents are portable slide presentations. Each slide contains rich
6
6
  * content blocks (in WDOC format), a layout preset, optional background, and
7
- * transition configuration.
8
- *
9
- * WSLIDE files are stored in the VFS with the `.wslide.json` extension and can
10
- * be rendered by any Soulcraft product that embeds the Workshop slideshow viewer.
11
- *
12
- * Content blocks within each slide reuse the WDOC block types — the same block
13
- * system that powers the Workshop document editor applies inside slides.
14
- *
15
- * @example Reading a WSLIDE document from the VFS
16
- * ```typescript
17
- * const buf = await sdk.vfs.readFile('/presentations/onboarding.wslide.json')
18
- * const deck: WslideDocument = JSON.parse(buf.toString('utf-8'))
19
- * console.log(`${deck.slides.length} slides`)
20
- * ```
7
+ * transition configuration. Stored in the VFS with the `.wslide.json` extension.
21
8
  */
22
9
  export {};
23
10
  //# sourceMappingURL=wslide.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wslide.js","sourceRoot":"","sources":["../../../src/modules/formats/wslide.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
1
+ {"version":3,"file":"wslide.js","sourceRoot":"","sources":["../../../src/modules/formats/wslide.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -1,114 +1,11 @@
1
1
  /**
2
2
  * @module formats/wviz
3
- * @description Type definitions for the WVIZ (Soulcraft Visualization) document format.
3
+ * @description Re-exports WVIZ types from `@soulcraft/formats`.
4
4
  *
5
5
  * WVIZ documents are portable, self-contained graph snapshots. They capture a
6
6
  * filtered view of a Brainy knowledge graph — entities and edges — along with
7
- * enough metadata to render them in any Soulcraft view (graph, mindmap, tree, etc.)
8
- * without requiring a live Brainy connection.
9
- *
10
- * WVIZ files are stored in the VFS with the `.wviz.json` extension and can be
11
- * exported from Workshop's Explore panel or generated programmatically.
12
- *
13
- * @example Reading a WVIZ document from the VFS
14
- * ```typescript
15
- * const buf = await sdk.vfs.readFile('/visualizations/product-graph.wviz.json')
16
- * const viz: WvizDocument = JSON.parse(buf.toString('utf-8'))
17
- * console.log(viz.entities.length) // number of nodes
18
- * ```
19
- */
20
- /**
21
- * The rendering mode to use when displaying a WVIZ document.
22
- *
23
- * - `graph` — Force-directed node-link diagram (default)
24
- * - `mindmap` — Radial tree rooted at a central concept
25
- * - `tree` — Hierarchical top-down tree layout
26
- * - `tapestry` — Narrative woven-thread visualization (Soulcraft-specific)
27
- * - `workflow` — Left-to-right directed flow
28
- * - `board` — Kanban-style column layout
29
- * - `list` — Flat list view with metadata columns
30
- * - `table` — Sortable tabular grid
31
- * - `gallery` — Card grid with thumbnails
32
- * - `calendar` — Date-based calendar view
33
- * - `timeline` — Chronological timeline
34
- */
35
- export type WvizViewType = 'graph' | 'mindmap' | 'tree' | 'tapestry' | 'workflow' | 'board' | 'list' | 'table' | 'gallery' | 'calendar' | 'timeline';
36
- /**
37
- * A self-contained visualization document.
38
- *
39
- * Entities and edges are snapshotted at export time. They are NOT live references
40
- * to a Brainy graph — rendering does not require a Brainy connection.
41
- */
42
- export interface WvizDocument {
43
- /** Format discriminator. Always `'wviz'`. */
44
- format: 'wviz';
45
- /** Schema version. Currently `'1.0'`. */
46
- version: '1.0';
47
- /** Human-readable document title. */
48
- title?: string;
49
- /** Which view type to render this document with. */
50
- viewType: WvizViewType;
51
- /**
52
- * View-specific configuration (layout algorithm, color scheme, label settings, etc.).
53
- * Shape is view-type-specific and interpreted by the rendering component.
54
- */
55
- viewConfig: Record<string, unknown>;
56
- /** Snapshotted entity list. These are not live Brainy entity references. */
57
- entities: WvizEntity[];
58
- /** Edges connecting entities. */
59
- edges: WvizEdge[];
60
- /**
61
- * Saved node positions for force-directed layouts.
62
- * Key is entity ID; value is `{ x, y }` in canvas coordinates.
63
- * When present, the layout is pinned rather than recalculated on each render.
64
- */
65
- positions?: Record<string, {
66
- x: number;
67
- y: number;
68
- }>;
69
- /**
70
- * Provenance metadata describing where this snapshot came from.
71
- * Recorded at export time; not updated when entities change in Brainy.
72
- */
73
- snapshot?: WvizSnapshot;
74
- }
75
- /**
76
- * A single entity (node) in a WVIZ document.
77
- */
78
- export interface WvizEntity {
79
- /** Unique identifier within this document (matches the Brainy entity ID at export time). */
80
- id: string;
81
- /** Brainy NounType string (e.g. `'concept'`, `'person'`, `'task'`). */
82
- type: string;
83
- /** Human-readable name shown as the node label. */
84
- name: string;
85
- /** Additional metadata fields captured at export time. */
86
- metadata?: Record<string, unknown>;
87
- }
88
- /**
89
- * A directed edge (relationship) between two entities in a WVIZ document.
90
- */
91
- export interface WvizEdge {
92
- /** Source entity ID. Must match a `WvizEntity.id` in the same document. */
93
- from: string;
94
- /** Target entity ID. Must match a `WvizEntity.id` in the same document. */
95
- to: string;
96
- /** Brainy VerbType string describing the relationship (e.g. `'relatesTo'`, `'blocks'`). */
97
- verb: string;
98
- }
99
- /**
100
- * Provenance metadata for a WVIZ snapshot.
7
+ * enough metadata to render them in any Soulcraft view without requiring a live
8
+ * Brainy connection. Stored in the VFS with the `.wviz.json` extension.
101
9
  */
102
- export interface WvizSnapshot {
103
- /** ISO 8601 timestamp when this snapshot was taken. */
104
- createdAt: string;
105
- /** Workspace ID the entities were exported from. */
106
- sourceWorkspace?: string;
107
- /** Collection or workbench name at time of export. */
108
- sourceWorkbench?: string;
109
- /** Total entity count in the source (may differ from `entities.length` after filtering). */
110
- entityCount: number;
111
- /** Total edge count in the source. */
112
- edgeCount: number;
113
- }
10
+ export type { WvizDocument, WvizEntity, WvizEdge, WvizSnapshot, WvizViewType } from '@soulcraft/formats/wviz';
114
11
  //# sourceMappingURL=wviz.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wviz.d.ts","sourceRoot":"","sources":["../../../src/modules/formats/wviz.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,SAAS,GACT,MAAM,GACN,UAAU,GACV,UAAU,GACV,OAAO,GACP,MAAM,GACN,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,CAAA;AAMd;;;;;GAKG;AACH,MA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AAA;IACnB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAA;CAClB"}
1
+ {"version":3,"file":"wviz.d.ts","sourceRoot":"","sources":["../../../src/modules/formats/wviz.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA"}
@@ -1,21 +1,11 @@
1
1
  /**
2
2
  * @module formats/wviz
3
- * @description Type definitions for the WVIZ (Soulcraft Visualization) document format.
3
+ * @description Re-exports WVIZ types from `@soulcraft/formats`.
4
4
  *
5
5
  * WVIZ documents are portable, self-contained graph snapshots. They capture a
6
6
  * filtered view of a Brainy knowledge graph — entities and edges — along with
7
- * enough metadata to render them in any Soulcraft view (graph, mindmap, tree, etc.)
8
- * without requiring a live Brainy connection.
9
- *
10
- * WVIZ files are stored in the VFS with the `.wviz.json` extension and can be
11
- * exported from Workshop's Explore panel or generated programmatically.
12
- *
13
- * @example Reading a WVIZ document from the VFS
14
- * ```typescript
15
- * const buf = await sdk.vfs.readFile('/visualizations/product-graph.wviz.json')
16
- * const viz: WvizDocument = JSON.parse(buf.toString('utf-8'))
17
- * console.log(viz.entities.length) // number of nodes
18
- * ```
7
+ * enough metadata to render them in any Soulcraft view without requiring a live
8
+ * Brainy connection. Stored in the VFS with the `.wviz.json` extension.
19
9
  */
20
10
  export {};
21
11
  //# sourceMappingURL=wviz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wviz.js","sourceRoot":"","sources":["../../../src/modules/formats/wviz.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG"}
1
+ {"version":3,"file":"wviz.js","sourceRoot":"","sources":["../../../src/modules/formats/wviz.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
package/dist/version.d.ts CHANGED
@@ -7,5 +7,5 @@
7
7
  * in one place ensures it is always in sync with `package.json`.
8
8
  */
9
9
  /** The current @soulcraft/sdk package version. */
10
- export declare const SDK_VERSION = "1.4.6";
10
+ export declare const SDK_VERSION = "1.4.9";
11
11
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -7,5 +7,5 @@
7
7
  * in one place ensures it is always in sync with `package.json`.
8
8
  */
9
9
  /** The current @soulcraft/sdk package version. */
10
- export const SDK_VERSION = '1.4.6';
10
+ export const SDK_VERSION = '1.4.9';
11
11
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulcraft/sdk",
3
- "version": "1.4.8",
3
+ "version": "1.4.9",
4
4
  "description": "The unified Soulcraft platform SDK — data, auth, AI, billing, and notifications",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -56,6 +56,7 @@
56
56
  "dependencies": {
57
57
  "@anthropic-ai/sdk": "^0.39.0",
58
58
  "@msgpack/msgpack": "^3.0.0",
59
+ "@soulcraft/formats": "1.0.1",
59
60
  "better-auth": "^1.0.0",
60
61
  "lru-cache": "^11.0.0",
61
62
  "stripe": "^20.4.0"