deltafold 0.2.0 → 0.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 (48) hide show
  1. package/README.md +33 -1
  2. package/dist/changelog.d.ts +10 -10
  3. package/dist/changelog.js +4 -4
  4. package/dist/changelog.js.map +1 -1
  5. package/dist/{document-BZcZo9nr.js → document-HfPyYxEd.js} +20 -20
  6. package/dist/{document-BZcZo9nr.js.map → document-HfPyYxEd.js.map} +1 -1
  7. package/dist/{document-DWHsgywm.d.ts → document-f2Zy7NQO.d.ts} +41 -41
  8. package/dist/{document-DWHsgywm.d.ts.map → document-f2Zy7NQO.d.ts.map} +1 -1
  9. package/dist/html.d.ts +2 -2
  10. package/dist/html.js +2 -2
  11. package/dist/html.js.map +1 -1
  12. package/dist/index.d.ts +437 -105
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +750 -273
  15. package/dist/index.js.map +1 -1
  16. package/dist/markdown.d.ts +2 -2
  17. package/dist/markdown.js +2 -2
  18. package/dist/markdown.js.map +1 -1
  19. package/dist/{mdast-DiRsYwPU.js → mdast-Oqkh0Gs1.js} +2 -2
  20. package/dist/{mdast-DiRsYwPU.js.map → mdast-Oqkh0Gs1.js.map} +1 -1
  21. package/dist/{package-BfBYnaCz.d.ts → package-BsMlK5xD.d.ts} +126 -116
  22. package/dist/{package-BfBYnaCz.d.ts.map → package-BsMlK5xD.d.ts.map} +1 -1
  23. package/package.json +5 -5
  24. package/src/features/documents/changelog.ts +8 -8
  25. package/src/features/documents/document.ts +39 -39
  26. package/src/features/documents/index.ts +2 -2
  27. package/src/features/execution/executor.ts +485 -313
  28. package/src/features/execution/handler.ts +30 -30
  29. package/src/features/execution/interaction.ts +11 -11
  30. package/src/features/execution/observation.ts +489 -0
  31. package/src/features/execution/observer.ts +395 -0
  32. package/src/features/package.ts +13 -8
  33. package/src/features/planning/history.ts +10 -10
  34. package/src/features/planning/identifiers.ts +7 -4
  35. package/src/features/planning/resolve-error.ts +13 -13
  36. package/src/features/planning/resolve.ts +11 -4
  37. package/src/features/planning/validate.ts +1 -1
  38. package/src/foundation/action.ts +17 -17
  39. package/src/foundation/change.ts +10 -10
  40. package/src/foundation/instruction.ts +5 -5
  41. package/src/foundation/migration.ts +12 -12
  42. package/src/foundation/plan.ts +23 -18
  43. package/src/foundation/rule.ts +6 -6
  44. package/src/foundation/shortcut.ts +6 -6
  45. package/src/foundation/version.ts +6 -6
  46. package/src/index.ts +14 -12
  47. package/src/renderers/html.ts +1 -1
  48. package/src/renderers/markdown.ts +1 -1
@@ -1,27 +1,27 @@
1
- import { f as Version, t as Package } from "./package-BfBYnaCz.js";
1
+ import { p as Version, t as Package } from "./package-BsMlK5xD.js";
2
2
  import { Pipeable } from "effect";
3
- /** @since @next */
3
+ /** @since 0.0.1 */
4
4
  type Text = {
5
5
  readonly _tag: "Text";
6
6
  readonly value: string;
7
7
  };
8
- /** @since @next */
8
+ /** @since 0.0.1 */
9
9
  type Code = {
10
10
  readonly _tag: "Code";
11
11
  readonly value: string;
12
12
  };
13
- /** @since @next */
13
+ /** @since 0.0.1 */
14
14
  type Link = {
15
15
  readonly _tag: "Link";
16
16
  readonly url: string;
17
17
  readonly children: ReadonlyArray<Inline>;
18
18
  };
19
- /** @since @next */
19
+ /** @since 0.0.1 */
20
20
  type Strong = {
21
21
  readonly _tag: "Strong";
22
22
  readonly children: ReadonlyArray<Inline>;
23
23
  };
24
- /** @since @next */
24
+ /** @since 0.0.1 */
25
25
  type Emphasis = {
26
26
  readonly _tag: "Emphasis";
27
27
  readonly children: ReadonlyArray<Inline>;
@@ -29,28 +29,28 @@ type Emphasis = {
29
29
  /**
30
30
  * Phrasing content.
31
31
  *
32
- * @since @next
32
+ * @since 0.0.1
33
33
  */
34
34
  type Inline = Text | Code | Link | Strong | Emphasis;
35
- /** @since @next */
35
+ /** @since 0.0.1 */
36
36
  type Paragraph = {
37
37
  readonly _tag: "Paragraph";
38
38
  readonly children: ReadonlyArray<Inline>;
39
39
  };
40
- /** @since @next */
40
+ /** @since 0.0.1 */
41
41
  type List = {
42
42
  readonly _tag: "List";
43
43
  readonly ordered: boolean;
44
44
  /** One entry per item. */
45
45
  readonly items: ReadonlyArray<ReadonlyArray<Block>>;
46
46
  };
47
- /** @since @next */
47
+ /** @since 0.0.1 */
48
48
  type CodeBlock = {
49
49
  readonly _tag: "CodeBlock";
50
50
  readonly value: string;
51
51
  readonly lang: string | undefined;
52
52
  };
53
- /** @since @next */
53
+ /** @since 0.0.1 */
54
54
  type Title = Pipeable.Pipeable & {
55
55
  readonly _tag: "Title";
56
56
  readonly children: ReadonlyArray<Inline>;
@@ -61,7 +61,7 @@ type Title = Pipeable.Pipeable & {
61
61
  * A titled part of a document. Its `id` must be unique within the containing release,
62
62
  * or within the document outside releases.
63
63
  *
64
- * @since @next
64
+ * @since 0.0.1
65
65
  */
66
66
  type Section = Pipeable.Pipeable & {
67
67
  readonly _tag: "Section";
@@ -75,12 +75,12 @@ type Section = Pipeable.Pipeable & {
75
75
  /** Set on a release section, which scopes the identifiers of its sections. */
76
76
  readonly release: Version | undefined;
77
77
  };
78
- /** @since @next */
78
+ /** @since 0.0.1 */
79
79
  type Block = Paragraph | List | CodeBlock | Section;
80
80
  /**
81
81
  * A complete document returned by changelog builders.
82
82
  *
83
- * @since @next
83
+ * @since 0.0.1
84
84
  */
85
85
  type Document = {
86
86
  readonly _tag: "Document";
@@ -90,29 +90,29 @@ type Document = {
90
90
  /**
91
91
  * Text, or inline nodes.
92
92
  *
93
- * @since @next
93
+ * @since 0.0.1
94
94
  */
95
95
  type InlineInput = string | Inline | ReadonlyArray<string | Inline>;
96
- /** @since @next */
96
+ /** @since 0.0.1 */
97
97
  declare const Text: (value: string) => Text;
98
- /** @since @next */
98
+ /** @since 0.0.1 */
99
99
  declare const Code: (value: string) => Code;
100
- /** @since @next */
100
+ /** @since 0.0.1 */
101
101
  declare const Link: (text: InlineInput, url: string) => Link;
102
- /** @since @next */
102
+ /** @since 0.0.1 */
103
103
  declare const Strong: (children: InlineInput) => Strong;
104
- /** @since @next */
104
+ /** @since 0.0.1 */
105
105
  declare const Emphasis: (children: InlineInput) => Emphasis;
106
- /** @since @next */
106
+ /** @since 0.0.1 */
107
107
  declare const Paragraph: (children: InlineInput) => Paragraph;
108
- /** @since @next */
108
+ /** @since 0.0.1 */
109
109
  declare const CodeBlock: (value: string, options?: {
110
110
  readonly lang?: string;
111
111
  }) => CodeBlock;
112
112
  /**
113
113
  * Builds a list. Each item is text, an inline node, a block, or several blocks.
114
114
  *
115
- * @since @next
115
+ * @since 0.0.1
116
116
  */
117
117
  declare const List: (items: ReadonlyArray<string | Inline | Block | ReadonlyArray<Block>>, options?: {
118
118
  readonly ordered?: boolean;
@@ -120,7 +120,7 @@ declare const List: (items: ReadonlyArray<string | Inline | Block | ReadonlyArra
120
120
  /**
121
121
  * An insertion point inside a plugin's scope.
122
122
  *
123
- * @since @next
123
+ * @since 0.0.1
124
124
  */
125
125
  type Anchor = {
126
126
  readonly _tag: "Anchor";
@@ -134,7 +134,7 @@ declare const makeTitle: (text: InlineInput, options?: {
134
134
  * Builds a title. `Document.Title.pre` and `Document.Title.post` are the insertion points
135
135
  * around a scoped section's title.
136
136
  *
137
- * @since @next
137
+ * @since 0.0.1
138
138
  */
139
139
  declare const Title: typeof makeTitle & {
140
140
  pre: Anchor;
@@ -143,13 +143,13 @@ declare const Title: typeof makeTitle & {
143
143
  /**
144
144
  * The insertion points around a scoped section's body.
145
145
  *
146
- * @since @next
146
+ * @since 0.0.1
147
147
  */
148
148
  declare const Body: {
149
149
  readonly pre: Anchor;
150
150
  readonly post: Anchor;
151
151
  };
152
- /** @since @next */
152
+ /** @since 0.0.1 */
153
153
  declare const Section: (id: string, options?: SectionOptions) => Section;
154
154
  type SectionOptions = {
155
155
  readonly title?: Title | string;
@@ -158,19 +158,19 @@ type SectionOptions = {
158
158
  /**
159
159
  * Sets an absolute heading level on a title. Levels outside 1 to 6 fail at render time.
160
160
  *
161
- * @since @next
161
+ * @since 0.0.1
162
162
  */
163
163
  declare const withLevel: (level: number) => (title: Title) => Title;
164
164
  /**
165
165
  * Sets the title of a section.
166
166
  *
167
- * @since @next
167
+ * @since 0.0.1
168
168
  */
169
169
  declare const withTitle: (title: Title | string) => (section: Section) => Section;
170
170
  /**
171
171
  * Appends blocks to a section's body.
172
172
  *
173
- * @since @next
173
+ * @since 0.0.1
174
174
  */
175
175
  declare const append: (...blocks: ReadonlyArray<Block>) => (section: Section) => Section;
176
176
  declare const DocumentError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
@@ -179,7 +179,7 @@ declare const DocumentError_base: new <A extends Record<string, any> = {}>(args:
179
179
  /**
180
180
  * A document structure that cannot be rendered.
181
181
  *
182
- * @since @next
182
+ * @since 0.0.1
183
183
  */
184
184
  declare class DocumentError extends DocumentError_base<{
185
185
  readonly reason: "duplicate-section" | "heading-level" | "reserved-id";
@@ -188,22 +188,22 @@ declare class DocumentError extends DocumentError_base<{
188
188
  /**
189
189
  * Release-scoped plugins run once per included release.
190
190
  *
191
- * @since @next
191
+ * @since 0.0.1
192
192
  */
193
193
  declare const Release = "release";
194
194
  /**
195
195
  * History-scoped plugins run once per history document.
196
196
  *
197
- * @since @next
197
+ * @since 0.0.1
198
198
  */
199
199
  declare const History = "history";
200
- /** @since @next */
200
+ /** @since 0.0.1 */
201
201
  type ReleaseContext<M> = {
202
202
  readonly package: Package;
203
203
  readonly version: Version;
204
204
  readonly metadata: M;
205
205
  };
206
- /** @since @next */
206
+ /** @since 0.0.1 */
207
207
  type HistoryContext<M> = {
208
208
  readonly package: Package;
209
209
  readonly releases: ReadonlyArray<ReleaseContext<M>>;
@@ -211,7 +211,7 @@ type HistoryContext<M> = {
211
211
  /**
212
212
  * Plugin output: blocks to insert, or `null` for nothing.
213
213
  *
214
- * @since @next
214
+ * @since 0.0.1
215
215
  */
216
216
  type PluginOutput = Block | ReadonlyArray<Block> | null;
217
217
  /**
@@ -221,7 +221,7 @@ type PluginOutput = Block | ReadonlyArray<Block> | null;
221
221
  * `Document.Body.post` of that scope's section. Each insertion point receives every
222
222
  * plugin's content in configuration order.
223
223
  *
224
- * @since @next
224
+ * @since 0.0.1
225
225
  */
226
226
  type PluginOptions<M> = {
227
227
  readonly scope: typeof Release;
@@ -237,21 +237,21 @@ type PluginOptions<M> = {
237
237
  * they must not fetch metadata or execute migrations. Output is inserted once and is not
238
238
  * processed by other plugins.
239
239
  *
240
- * @since @next
240
+ * @since 0.0.1
241
241
  */
242
242
  type Plugin<M> = {
243
243
  readonly _tag: "Plugin";
244
244
  readonly id: string;
245
245
  } & PluginOptions<M>;
246
- /** @since @next */
246
+ /** @since 0.0.1 */
247
247
  declare const makePlugin: <M>(id: string, options: PluginOptions<M>) => Plugin<M>;
248
248
  /**
249
249
  * `Document.Plugin.make`
250
250
  *
251
- * @since @next
251
+ * @since 0.0.1
252
252
  */
253
253
  declare const Plugin: {
254
254
  readonly make: typeof makePlugin;
255
255
  };
256
256
  export { Text as C, withTitle as D, withLevel as E, Strong as S, append as T, PluginOptions as _, CodeBlock as a, ReleaseContext as b, Emphasis as c, Inline as d, InlineInput as f, Plugin as g, Paragraph as h, Code as i, History as l, List as m, Block as n, Document as o, Link as p, Body as r, DocumentError as s, Anchor as t, HistoryContext as u, PluginOutput as v, Title as w, Section as x, Release as y };
257
- //# sourceMappingURL=document-DWHsgywm.d.ts.map
257
+ //# sourceMappingURL=document-f2Zy7NQO.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-DWHsgywm.d.ts","names":[],"sources":["../src/features/documents/document.ts"],"mappings":";;;KAMY;WAAkB;WAAuB;;;KAEzC;WAAkB;WAAuB;;;KAEzC;WACF;WACA;WACA,UAAU,cAAc;;;KAGtB;WAAoB;WAAyB,UAAU,cAAc;;;KAErE;WAAsB;WAA2B,UAAU,cAAc;;;;;;;KAOz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;;;;cASrE,cAAK;;;;;;;;;cAUL;WAAS,KAAG;WAAyB,MAAI;;;cAMzC,UAAO,YAAc,UAAW,mBAAsB;KAW9D;WACK,QAAQ;WACR,WAAW,cAAc;;;;;;;cAsBtB,YAAS,mBACP,OACN,UAAQ;;;;;;cAQJ,YAAS,OACb,oBAAc,SACZ,YAAU;;;;;;cAQR,YAAM,QACN,cAAc,YAAM,SACtB,YAAU;;;;;;;;;cAQR,sBAAsB;WACzB;WACA;;;;;;;cAUG;;;;;;cAMA;;KAGD,eAAe;WACjB,SAAS;WACT,SAAS;WACT,UAAU;;;KAIR,eAAe;WACjB,SAAS;WACT,UAAU,cAAc,eAAe;;;;;;;KAQrC,eAAe,QAAQ,cAAc;;;;;;;;;;KAWrC,cAAc;WAEd,cAAc;WACd,IAAI;WACJ,UAAU,SAAS,eAAe,OAAO;;WAGzC,cAAc;WACd,IAAI;WACJ,UAAU,SAAS,eAAe,OAAO;;;;;;;;;KAUzC,OAAO;WAAgB;WAAyB;IAAe,cAAc;;cAG5E,aAAc,GAAC,YAAY,SAAW,cAAc,OAAK,OAAO;;;;;;cAWhE;WAAW,aAAI"}
package/dist/html.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { o as Document } from "./document-DWHsgywm.js";
1
+ import { o as Document } from "./document-f2Zy7NQO.js";
2
2
  /**
3
3
  * Renders a document as an HTML fragment. Throws `DocumentError` for unsupported structure.
4
4
  *
5
- * @since @next
5
+ * @since 0.0.1
6
6
  */
7
7
  export declare const render: (document: Document) => string;
8
8
  //# sourceMappingURL=html.d.ts.map
package/dist/html.js CHANGED
@@ -1,11 +1,11 @@
1
- import { t as toMdast } from "./mdast-DiRsYwPU.js";
1
+ import { t as toMdast } from "./mdast-Oqkh0Gs1.js";
2
2
  import { toHtml } from "hast-util-to-html";
3
3
  import { toHast } from "mdast-util-to-hast";
4
4
  // src/renderers/html.ts
5
5
  /**
6
6
  * Renders a document as an HTML fragment. Throws `DocumentError` for unsupported structure.
7
7
  *
8
- * @since @next
8
+ * @since 0.0.1
9
9
  */
10
10
  const render = (document) => toHtml(toHast(toMdast(document)));
11
11
  export { render };
package/dist/html.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"html.js","names":[],"sources":["../src/renderers/html.ts"],"sourcesContent":["import { toHtml } from \"hast-util-to-html\";\nimport { toHast } from \"mdast-util-to-hast\";\n\nimport type { Document } from \"../features/documents/document.ts\";\nimport { toMdast } from \"./mdast.ts\";\n\n/**\n * Renders a document as an HTML fragment. Throws `DocumentError` for unsupported structure.\n *\n * @since @next\n */\nexport const render = (document: Document): string => toHtml(toHast(toMdast(document)));\n"],"mappings":";;;;;;;;;AAWA,MAAa,UAAU,aAA+B,OAAO,OAAO,QAAQ,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"html.js","names":[],"sources":["../src/renderers/html.ts"],"sourcesContent":["import { toHtml } from \"hast-util-to-html\";\nimport { toHast } from \"mdast-util-to-hast\";\n\nimport type { Document } from \"../features/documents/document.ts\";\nimport { toMdast } from \"./mdast.ts\";\n\n/**\n * Renders a document as an HTML fragment. Throws `DocumentError` for unsupported structure.\n *\n * @since 0.0.1\n */\nexport const render = (document: Document): string => toHtml(toHast(toMdast(document)));\n"],"mappings":";;;;;;;;;AAWA,MAAa,UAAU,aAA+B,OAAO,OAAO,QAAQ,QAAQ,CAAC,CAAC"}