@refrakt-md/plan 0.9.7 → 0.9.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.
- package/dist/cli-plugin.d.ts.map +1 -1
- package/dist/cli-plugin.js +55 -15
- package/dist/cli-plugin.js.map +1 -1
- package/dist/commands/bundle-behaviors.d.ts +4 -0
- package/dist/commands/bundle-behaviors.d.ts.map +1 -1
- package/dist/commands/bundle-behaviors.js +13 -2
- package/dist/commands/bundle-behaviors.js.map +1 -1
- package/dist/commands/init.d.ts +27 -3
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +341 -43
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/project-setup.d.ts +24 -0
- package/dist/commands/project-setup.d.ts.map +1 -0
- package/dist/commands/project-setup.js +79 -0
- package/dist/commands/project-setup.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -11
- package/dist/index.js.map +1 -1
- package/dist/render.d.ts +31 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +57 -0
- package/dist/render.js.map +1 -0
- package/dist/tags/spec.d.ts.map +1 -1
- package/dist/tags/spec.js +2 -1
- package/dist/tags/spec.js.map +1 -1
- package/dist/util.d.ts +5 -0
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +7 -1
- package/dist/util.js.map +1 -1
- package/package.json +20 -8
package/dist/index.js
CHANGED
|
@@ -15,12 +15,11 @@ import { planPipelineHooks } from './pipeline.js';
|
|
|
15
15
|
export const plan = {
|
|
16
16
|
name: 'plan',
|
|
17
17
|
displayName: 'Plan',
|
|
18
|
-
version: '0.9.
|
|
18
|
+
version: '0.9.9',
|
|
19
19
|
runes: {
|
|
20
20
|
'spec': {
|
|
21
21
|
transform: spec,
|
|
22
22
|
description: 'Specification document with status tracking, versioning, and entity registry integration',
|
|
23
|
-
reinterprets: { heading: 'spec title', blockquote: 'scope summary', paragraph: 'specification content' },
|
|
24
23
|
fixture: `{% spec id="SPEC-001" status="accepted" version="1.0" %}
|
|
25
24
|
# Authentication System
|
|
26
25
|
|
|
@@ -34,7 +33,6 @@ Tokens expire after 24 hours and can be refreshed.
|
|
|
34
33
|
transform: work,
|
|
35
34
|
aliases: ['task'],
|
|
36
35
|
description: 'Work item with acceptance criteria, references, and implementation tracking',
|
|
37
|
-
reinterprets: { heading: 'work item title or section heading', paragraph: 'description', list: 'acceptance criteria or references' },
|
|
38
36
|
fixture: `{% work id="RF-142" status="ready" priority="high" complexity="moderate" milestone="v0.5.0" %}
|
|
39
37
|
# Implement dark mode support
|
|
40
38
|
|
|
@@ -52,7 +50,6 @@ Use CSS custom properties with media query swapping.
|
|
|
52
50
|
'bug': {
|
|
53
51
|
transform: bug,
|
|
54
52
|
description: 'Bug report with structured reproduction steps and severity tracking',
|
|
55
|
-
reinterprets: { heading: 'bug title or section heading', list: 'reproduction steps or environment details', paragraph: 'expected/actual behaviour' },
|
|
56
53
|
fixture: `{% bug id="RF-201" status="confirmed" severity="major" %}
|
|
57
54
|
# Showcase bleed breaks with overflow:hidden parent
|
|
58
55
|
|
|
@@ -72,7 +69,6 @@ Showcase is clipped at the section edge.
|
|
|
72
69
|
transform: decision,
|
|
73
70
|
aliases: ['adr'],
|
|
74
71
|
description: 'Architecture decision record capturing context, options, decision, rationale, and consequences',
|
|
75
|
-
reinterprets: { heading: 'decision title or section heading', paragraph: 'context, rationale, or consequences', list: 'options considered' },
|
|
76
72
|
fixture: `{% decision id="ADR-007" status="accepted" date="2026-03-11" %}
|
|
77
73
|
# Use CSS custom properties for token injection
|
|
78
74
|
|
|
@@ -98,7 +94,6 @@ Custom properties cascade naturally without JavaScript.
|
|
|
98
94
|
'milestone': {
|
|
99
95
|
transform: milestone,
|
|
100
96
|
description: 'Named release target with scope, goals, and status tracking',
|
|
101
|
-
reinterprets: { heading: 'milestone title', list: 'goals' },
|
|
102
97
|
fixture: `{% milestone name="v0.5.0" target="2026-03-29" status="active" %}
|
|
103
98
|
# v0.5.0 — Layout & Tint
|
|
104
99
|
|
|
@@ -110,31 +105,26 @@ Custom properties cascade naturally without JavaScript.
|
|
|
110
105
|
'backlog': {
|
|
111
106
|
transform: backlog,
|
|
112
107
|
description: 'Aggregation view of work items and bugs with filtering, sorting, and grouping',
|
|
113
|
-
reinterprets: {},
|
|
114
108
|
fixture: `{% backlog filter="status:ready" sort="priority" group="status" /%}`,
|
|
115
109
|
},
|
|
116
110
|
'decision-log': {
|
|
117
111
|
transform: decisionLog,
|
|
118
112
|
description: 'Chronological view of architecture decision records',
|
|
119
|
-
reinterprets: {},
|
|
120
113
|
fixture: `{% decision-log sort="date" /%}`,
|
|
121
114
|
},
|
|
122
115
|
'plan-progress': {
|
|
123
116
|
transform: planProgress,
|
|
124
117
|
description: 'Progress summary showing status counts per entity type',
|
|
125
|
-
reinterprets: {},
|
|
126
118
|
fixture: `{% plan-progress /%}`,
|
|
127
119
|
},
|
|
128
120
|
'plan-activity': {
|
|
129
121
|
transform: planActivity,
|
|
130
122
|
description: 'Recent activity feed sorted by file modification time',
|
|
131
|
-
reinterprets: {},
|
|
132
123
|
fixture: `{% plan-activity limit="10" /%}`,
|
|
133
124
|
},
|
|
134
125
|
'plan-history': {
|
|
135
126
|
transform: planHistory,
|
|
136
127
|
description: 'Git-native entity history timeline showing attribute transitions, criteria progress, and lifecycle events',
|
|
137
|
-
reinterprets: {},
|
|
138
128
|
fixture: `{% plan-history limit="20" /%}`,
|
|
139
129
|
},
|
|
140
130
|
},
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,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vB,WAAW,EAAE,wDAAwD;YACrE,OAAO,EAAE,sBAAsB;SAC/B;QACD,eAAe,EAAE;YAChB,SAAS,EAAE,YAAY;YACvB,WAAW,EAAE,uDAAuD;YACpE,OAAO,EAAE,iCAAiC;SAC1C;QACD,cAAc,EAAE;YACf,SAAS,EAAE,WAAW;YACtB,WAAW,EAAE,2GAA2G;YACxH,OAAO,EAAE,gCAAgC;SACzC;KACD;IACD,KAAK,EAAE;QACN,KAAK,EAAE,MAA4D;KACnE;IACD,SAAS,EAAE;QACV,mBAAmB,EAAE,YAAY;QACjC,kBAAkB,EAAE,kBAAkB;KACtC;IACD,QAAQ,EAAE,iBAAiB;CAC3B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/render.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge-safe entity rendering module.
|
|
3
|
+
*
|
|
4
|
+
* Renders a single plan entity's Markdoc source to a serialized tree
|
|
5
|
+
* (RendererNode) that can be identity-transformed by any theme and
|
|
6
|
+
* rendered to HTML.
|
|
7
|
+
*
|
|
8
|
+
* This module has NO Node.js dependencies and runs on Cloudflare Workers.
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* import { renderEntity } from '@refrakt-md/plan/render';
|
|
12
|
+
* import { identityTransform } from '@refrakt-md/lumina/transform';
|
|
13
|
+
* import { renderToHtml } from '@refrakt-md/transform';
|
|
14
|
+
*
|
|
15
|
+
* const tree = renderEntity(source);
|
|
16
|
+
* const html = renderToHtml(identityTransform(tree));
|
|
17
|
+
*/
|
|
18
|
+
import type { RendererNode } from '@refrakt-md/transform';
|
|
19
|
+
/**
|
|
20
|
+
* Render a plan entity's Markdoc source to a serialized tree (RendererNode).
|
|
21
|
+
*
|
|
22
|
+
* The returned tree has the same structure as the static plan site produces
|
|
23
|
+
* before the identity transform — preamble, body sections, meta fields, etc.
|
|
24
|
+
*
|
|
25
|
+
* The consumer is responsible for:
|
|
26
|
+
* 1. Applying the theme's identity transform (e.g. lumina)
|
|
27
|
+
* 2. Rendering to HTML (e.g. renderToHtml from @refrakt-md/transform)
|
|
28
|
+
* 3. Any presentation wrapping (tabs, panels, etc.)
|
|
29
|
+
*/
|
|
30
|
+
export declare function renderEntity(source: string): RendererNode;
|
|
31
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAuB1D;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAUzD"}
|
package/dist/render.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge-safe entity rendering module.
|
|
3
|
+
*
|
|
4
|
+
* Renders a single plan entity's Markdoc source to a serialized tree
|
|
5
|
+
* (RendererNode) that can be identity-transformed by any theme and
|
|
6
|
+
* rendered to HTML.
|
|
7
|
+
*
|
|
8
|
+
* This module has NO Node.js dependencies and runs on Cloudflare Workers.
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* import { renderEntity } from '@refrakt-md/plan/render';
|
|
12
|
+
* import { identityTransform } from '@refrakt-md/lumina/transform';
|
|
13
|
+
* import { renderToHtml } from '@refrakt-md/transform';
|
|
14
|
+
*
|
|
15
|
+
* const tree = renderEntity(source);
|
|
16
|
+
* const html = renderToHtml(identityTransform(tree));
|
|
17
|
+
*/
|
|
18
|
+
import Markdoc from '@markdoc/markdoc';
|
|
19
|
+
import { serializeTree } from '@refrakt-md/runes';
|
|
20
|
+
import { tags as coreTagOverrides, nodes as coreNodes } from '@refrakt-md/runes';
|
|
21
|
+
import { spec } from './tags/spec.js';
|
|
22
|
+
import { work } from './tags/work.js';
|
|
23
|
+
import { bug } from './tags/bug.js';
|
|
24
|
+
import { decision } from './tags/decision.js';
|
|
25
|
+
import { milestone } from './tags/milestone.js';
|
|
26
|
+
// ── Tag Schemas ─────────────────────────────────────────────
|
|
27
|
+
const planTags = {
|
|
28
|
+
spec,
|
|
29
|
+
work,
|
|
30
|
+
task: work,
|
|
31
|
+
bug,
|
|
32
|
+
decision,
|
|
33
|
+
adr: decision,
|
|
34
|
+
milestone,
|
|
35
|
+
};
|
|
36
|
+
// ── Main API ────────────────────────────────────────────────
|
|
37
|
+
/**
|
|
38
|
+
* Render a plan entity's Markdoc source to a serialized tree (RendererNode).
|
|
39
|
+
*
|
|
40
|
+
* The returned tree has the same structure as the static plan site produces
|
|
41
|
+
* before the identity transform — preamble, body sections, meta fields, etc.
|
|
42
|
+
*
|
|
43
|
+
* The consumer is responsible for:
|
|
44
|
+
* 1. Applying the theme's identity transform (e.g. lumina)
|
|
45
|
+
* 2. Rendering to HTML (e.g. renderToHtml from @refrakt-md/transform)
|
|
46
|
+
* 3. Any presentation wrapping (tabs, panels, etc.)
|
|
47
|
+
*/
|
|
48
|
+
export function renderEntity(source) {
|
|
49
|
+
const tags = { ...coreTagOverrides, ...planTags };
|
|
50
|
+
const ast = Markdoc.parse(source);
|
|
51
|
+
const renderable = Markdoc.transform(ast, {
|
|
52
|
+
tags,
|
|
53
|
+
nodes: coreNodes,
|
|
54
|
+
});
|
|
55
|
+
return serializeTree(renderable);
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,IAAI,IAAI,gBAAgB,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,+DAA+D;AAE/D,MAAM,QAAQ,GAAwB;IACrC,IAAI;IACJ,IAAI;IACJ,IAAI,EAAE,IAAI;IACV,GAAG;IACH,QAAQ;IACR,GAAG,EAAE,QAAQ;IACb,SAAS;CACT,CAAC;AAEF,+DAA+D;AAE/D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,MAAc;IAC1C,MAAM,IAAI,GAAG,EAAE,GAAG,gBAAgB,EAAE,GAAG,QAAQ,EAAE,CAAC;IAElD,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE;QACzC,IAAI;QACJ,KAAK,EAAE,SAAS;KAChB,CAAC,CAAC;IAEH,OAAO,aAAa,CAAC,UAAgC,CAAiB,CAAC;AACxE,CAAC"}
|
package/dist/tags/spec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../src/tags/spec.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../src/tags/spec.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAQvC,eAAO,MAAM,IAAI,gBAiEf,CAAC"}
|
package/dist/tags/spec.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Markdoc from '@markdoc/markdoc';
|
|
2
2
|
const { Tag } = Markdoc;
|
|
3
3
|
import { createContentModelSchema, createComponentRenderable, asNodes, RenderableNodeCursor } from '@refrakt-md/runes';
|
|
4
|
+
import { stripHorizontalRules } from '../util.js';
|
|
4
5
|
const statusValues = ['draft', 'review', 'accepted', 'superseded', 'deprecated'];
|
|
5
6
|
export const spec = createContentModelSchema({
|
|
6
7
|
attributes: {
|
|
@@ -36,7 +37,7 @@ export const spec = createContentModelSchema({
|
|
|
36
37
|
const blurb = summaryNodes.count() > 0 ? summaryNodes.wrap('div').next() : undefined;
|
|
37
38
|
const contentChildren = [];
|
|
38
39
|
if (bodyNodes.count() > 0) {
|
|
39
|
-
contentChildren.push(...bodyNodes.toArray());
|
|
40
|
+
contentChildren.push(...stripHorizontalRules(bodyNodes.toArray()));
|
|
40
41
|
}
|
|
41
42
|
const bodyDiv = new Tag('div', {}, contentChildren);
|
|
42
43
|
return createComponentRenderable({ rune: 'spec',
|
package/dist/tags/spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../../src/tags/spec.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../../src/tags/spec.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM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YACD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC;SAClJ,CAAC,CAAC;IACJ,CAAC;CACD,CAAC,CAAC"}
|
package/dist/util.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import type { RenderableTreeNode } from '@markdoc/markdoc';
|
|
2
|
+
/** Remove top-level `hr` elements from a renderable node array.
|
|
3
|
+
* Plan content uses `---` as editorial separators in markdown source;
|
|
4
|
+
* these don't serve a purpose in the rendered output. */
|
|
5
|
+
export declare function stripHorizontalRules(nodes: RenderableTreeNode[]): RenderableTreeNode[];
|
|
1
6
|
/** Convert heading text to a kebab-case data-name slug. */
|
|
2
7
|
export declare function slugify(text: string): string;
|
|
3
8
|
/**
|
package/dist/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAI3D;;0DAE0D;AAC1D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,EAAE,CAEtF;AAED,2DAA2D;AAC3D,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK5C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG,EAAE,CA6BjE"}
|
package/dist/util.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import Markdoc from '@markdoc/markdoc';
|
|
2
2
|
const { Tag } = Markdoc;
|
|
3
3
|
import { asNodes } from '@refrakt-md/runes';
|
|
4
|
+
/** Remove top-level `hr` elements from a renderable node array.
|
|
5
|
+
* Plan content uses `---` as editorial separators in markdown source;
|
|
6
|
+
* these don't serve a purpose in the rendered output. */
|
|
7
|
+
export function stripHorizontalRules(nodes) {
|
|
8
|
+
return nodes.filter(n => !(n instanceof Tag && n.name === 'hr'));
|
|
9
|
+
}
|
|
4
10
|
/** Convert heading text to a kebab-case data-name slug. */
|
|
5
11
|
export function slugify(text) {
|
|
6
12
|
return text
|
|
@@ -22,7 +28,7 @@ export function buildSections(sections, config) {
|
|
|
22
28
|
const slug = slugify(headingText);
|
|
23
29
|
const canonicalName = section.$canonicalName;
|
|
24
30
|
const headingNode = section.$headingNode;
|
|
25
|
-
const bodyContent = Markdoc.transform(asNodes(section.body), config);
|
|
31
|
+
const bodyContent = stripHorizontalRules(Markdoc.transform(asNodes(section.body), config));
|
|
26
32
|
const children = [];
|
|
27
33
|
if (headingNode) {
|
|
28
34
|
const renderedHeading = Markdoc.transform([headingNode], config);
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,2DAA2D;AAC3D,MAAM,UAAU,OAAO,CAAC,IAAY;IACnC,OAAO,IAAI;SACT,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AACzB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,QAAe,EAAE,MAAW;IACzD,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Q,CAAC,GAAG,CAAC,CAAC,OAAY,EAAE,EAAE;QACpC,MAAM,WAAW,GAAG,OAAO,CAAC,QAAkB,CAAC;QAC/C,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QAClC,MAAM,aAAa,GAAG,OAAO,CAAC,cAAoC,CAAC;QAEnE,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,MAAM,WAAW,GAAG,oBAAoB,CACvC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,CAAyB,CACxE,CAAC;QAEF,MAAM,QAAQ,GAAU,EAAE,CAAC;QAC3B,IAAI,WAAW,EAAE,CAAC;YACjB,MAAM,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,EAAE,MAAM,CAAyB,CAAC;YACzF,gEAAgE;YAChE,IAAI,aAAa,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACjD,MAAM,OAAO,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;gBACnC,IAAI,OAAO,YAAY,GAAG,EAAE,CAAC;oBAC5B,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC,GAAG,aAAa,CAAC;gBAC1D,CAAC;YACF,CAAC;YACD,QAAQ,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC;QACnC,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC;QAE9B,OAAO,IAAI,GAAG,CAAC,SAAS,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refrakt-md/plan",
|
|
3
3
|
"description": "Planning runes for refrakt.md — specs, work items, bugs, decisions, and milestones",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
"./cards": {
|
|
43
43
|
"types": "./dist/cards.d.ts",
|
|
44
44
|
"default": "./dist/cards.js"
|
|
45
|
+
},
|
|
46
|
+
"./render": {
|
|
47
|
+
"types": "./dist/render.d.ts",
|
|
48
|
+
"default": "./dist/render.js"
|
|
45
49
|
}
|
|
46
50
|
},
|
|
47
51
|
"files": [
|
|
@@ -53,17 +57,25 @@
|
|
|
53
57
|
},
|
|
54
58
|
"dependencies": {
|
|
55
59
|
"@markdoc/markdoc": "0.4.0",
|
|
56
|
-
"@refrakt-md/behaviors": "0.9.
|
|
57
|
-
"@refrakt-md/content": "0.9.
|
|
58
|
-
"@refrakt-md/highlight": "0.9.
|
|
59
|
-
"@refrakt-md/html": "0.9.
|
|
60
|
-
"@refrakt-md/runes": "0.9.
|
|
61
|
-
"@refrakt-md/transform": "0.9.
|
|
62
|
-
"@refrakt-md/types": "0.9.
|
|
60
|
+
"@refrakt-md/behaviors": "0.9.9",
|
|
61
|
+
"@refrakt-md/content": "0.9.9",
|
|
62
|
+
"@refrakt-md/highlight": "0.9.9",
|
|
63
|
+
"@refrakt-md/html": "0.9.9",
|
|
64
|
+
"@refrakt-md/runes": "0.9.9",
|
|
65
|
+
"@refrakt-md/transform": "0.9.9",
|
|
66
|
+
"@refrakt-md/types": "0.9.9",
|
|
63
67
|
"reflect-metadata": "^0.2.0"
|
|
64
68
|
},
|
|
65
69
|
"devDependencies": {
|
|
66
70
|
"esbuild": "^0.27.4",
|
|
67
71
|
"pagefind": "^1.3.0"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"esbuild": "^0.27.0"
|
|
75
|
+
},
|
|
76
|
+
"peerDependenciesMeta": {
|
|
77
|
+
"esbuild": {
|
|
78
|
+
"optional": true
|
|
79
|
+
}
|
|
68
80
|
}
|
|
69
81
|
}
|