@critical-path/svelte 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @critical-path/svelte
2
2
 
3
+ ## 0.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e2a7eef: Introduce Bret Victor's Ladder of Abstraction and Critical Path Method (CPM) timeline synthesis to the framework data model:
8
+ - **Core Domain**: Multi-scale timeline synthesis model across Macro phase rollups, Standard CPM Gantt schedule (early/late bounds, float/slack calculation, bottleneck identification), and Concrete grounding (deliverables, file attachments, daily effort distribution, and reality deltas). Added `calculateCriticalPath`, `getTimelineLadder`, and `getTaskLadder` to `CriticalPathEngine`.
9
+ - **Server Router**: HTTP endpoints `GET /projects/:id/critical-path`, `GET /projects/:id/ladder`, and `GET /tasks/:id/ladder`.
10
+ - **Client SDK**: `CriticalPathClient` methods `calculateCriticalPath`, `getTimelineLadder`, and `getTaskLadder`.
11
+ - **MCP**: New AI tools `calculate_critical_path`, `get_timeline_ladder`, and `get_task_ladder`.
12
+ - **React**: Custom hooks `useTimelineLadder`, `useCriticalPath`, and `useTaskLadder`.
13
+ - **Svelte 5**: Svelte 5 Runes state classes `TimelineLadderState` and `CriticalPathState`.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [e2a7eef]
18
+ - @critical-path/core@0.16.0
19
+ - @critical-path/client@0.10.0
20
+ - @critical-path/mcp@0.3.0
21
+
3
22
  ## 0.12.0
4
23
 
5
24
  ### Minor Changes
package/README.md CHANGED
@@ -138,6 +138,68 @@ Combines threaded comments with inline attachments (`attachment.commentId === co
138
138
  {/each}
139
139
  ```
140
140
 
141
+ ### 4. Bret Victor's Ladder of Abstraction (`TimelineLadderState`)
142
+
143
+ Fluidly traverse between Macro phase health, Standard Gantt tasks with CPM critical paths, and Concrete deliverables/effort using Svelte 5 Runes:
144
+
145
+ ```svelte
146
+ <script lang="ts">
147
+ import { onMount } from 'svelte';
148
+ import { createCriticalPathClient, createTimelineLadderState, createCriticalPathState } from '@critical-path/svelte';
149
+
150
+ const client = createCriticalPathClient({ baseUrl: '/api/critical-path' });
151
+ const ladderState = createTimelineLadderState(client, 'proj_1', { level: 'all' });
152
+ const cpmState = createCriticalPathState(client, 'proj_1');
153
+
154
+ onMount(() => {
155
+ ladderState.fetch();
156
+ cpmState.fetch();
157
+ });
158
+ </script>
159
+
160
+ <!-- Level Switcher -->
161
+ <div class="flex gap-2">
162
+ <button on:click={() => ladderState.setLevel('macro')}>Macro</button>
163
+ <button on:click={() => ladderState.setLevel('standard')}>Standard Gantt</button>
164
+ <button on:click={() => ladderState.setLevel('concrete')}>Concrete</button>
165
+ <button on:click={() => ladderState.setLevel('all')}>All Rungs</button>
166
+ </div>
167
+
168
+ {#if ladderState.loading}
169
+ <p>Loading timeline ladder...</p>
170
+ {:else}
171
+ <!-- Macro Rung -->
172
+ {#if ladderState.macro}
173
+ <div class="macro-banner">
174
+ <h3>Phase Health: {ladderState.macro.health} ({ladderState.macro.overallProgressPercentage}% Complete)</h3>
175
+ <p>Total Duration: {ladderState.macro.totalDurationHours}h | Critical Path: {ladderState.macro.criticalPathDurationHours}h</p>
176
+ </div>
177
+ {/if}
178
+
179
+ <!-- Standard Rung -->
180
+ {#if ladderState.standard}
181
+ <div class="standard-gantt">
182
+ <h4>Gantt Schedule</h4>
183
+ {#each ladderState.standard.tasks as item}
184
+ <div class:is-critical={item.isCritical}>
185
+ {item.task.title} (Early Start: {item.schedule.earlyStart}h, Total Slack: {item.schedule.totalSlack}h)
186
+ </div>
187
+ {/each}
188
+ </div>
189
+ {/if}
190
+
191
+ <!-- Concrete Rung -->
192
+ {#if ladderState.concrete}
193
+ <div class="concrete-grounding">
194
+ <h4>Concrete Ground Truth</h4>
195
+ {#each Object.entries(ladderState.concrete) as [taskId, evidence]}
196
+ <div>Task {taskId}: {evidence.deliverables.length} deliverables, {evidence.attachments.length} files</div>
197
+ {/each}
198
+ </div>
199
+ {/if}
200
+ {/if}
201
+ ```
202
+
141
203
  ---
142
204
 
143
205
  ## 📄 License
@@ -0,0 +1,13 @@
1
+ import type { CriticalPathClient } from '@critical-path/client';
2
+ import type { CriticalPathAnalysis } from '@critical-path/core';
3
+ export declare class CriticalPathState {
4
+ private client;
5
+ projectId: string;
6
+ data: CriticalPathAnalysis | null;
7
+ loading: boolean;
8
+ error: Error | null;
9
+ constructor(client: CriticalPathClient, projectId: string);
10
+ fetch(): Promise<void>;
11
+ }
12
+ export declare function createCriticalPathState(client: CriticalPathClient, projectId: string): CriticalPathState;
13
+ //# sourceMappingURL=critical-path-state.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"critical-path-state.svelte.d.ts","sourceRoot":"","sources":["../src/critical-path-state.svelte.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,qBAAa,iBAAiB;IAM1B,OAAO,CAAC,MAAM;IACP,SAAS,EAAE,MAAM;IAN1B,IAAI,8BAA6C;IACjD,OAAO,UAA0B;IACjC,KAAK,eAA8B;gBAGzB,MAAM,EAAE,kBAAkB,EAC3B,SAAS,EAAE,MAAM;IAGpB,KAAK;CAWZ;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,kBAAkB,EAC1B,SAAS,EAAE,MAAM,GAChB,iBAAiB,CAEnB"}
package/dist/index.d.ts CHANGED
@@ -11,4 +11,6 @@ export * from './deliverable-summary-state.svelte.js';
11
11
  export * from './kanban-state.svelte.js';
12
12
  export * from './task-transitions-state.svelte.js';
13
13
  export * from './webmcp-state.svelte.js';
14
+ export * from './critical-path-state.svelte.js';
15
+ export * from './timeline-ladder-state.svelte.js';
14
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE/E,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,aAAa,GAAG,kBAAkB,CAEnF;AAED,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE/E,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,aAAa,GAAG,kBAAkB,CAEnF;AAED,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC"}