@koyori-app/arc-vue 0.1.0-alpha.2 → 0.1.0-alpha.3

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/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # @koyori-app/arc-vue
2
+
3
+ Vue 3 Gantt chart component for [arc](https://github.com/koyori-app/arc). The layout is computed by the `@koyori-app/arc` WebAssembly core; this package draws it.
4
+
5
+ Pre-release (`0.1.0-alpha`). The API may change between versions.
6
+
7
+ ## Install
8
+
9
+ Install both packages. `@koyori-app/arc` (the Wasm core) and `vue` are peer dependencies.
10
+
11
+ ```sh
12
+ npm install @koyori-app/arc-vue @koyori-app/arc
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ Import the stylesheet once, then pass tasks and dependencies to `GanttChart`.
18
+
19
+ ```vue
20
+ <script setup lang="ts">
21
+ import { GanttChart, type GanttDep, type GanttTask } from '@koyori-app/arc-vue';
22
+ import '@koyori-app/arc-vue/style.css';
23
+
24
+ const tasks: GanttTask[] = [
25
+ { id: 'a', title: 'Design', progress_pct: 100, start: '2026-06-01', end: '2026-06-05' },
26
+ { id: 'b', title: 'Build', progress_pct: 40, start: '2026-06-08', end: '2026-06-19' },
27
+ ];
28
+ const deps: GanttDep[] = [{ blocker_task_id: 'a', blocked_task_id: 'b' }];
29
+ </script>
30
+
31
+ <template>
32
+ <GanttChart :tasks="tasks" :deps="deps" today="2026-06-10" @task-click="(task) => console.log(task.id)" />
33
+ </template>
34
+ ```
35
+
36
+ ### Data shapes
37
+
38
+ ```ts
39
+ interface GanttTask {
40
+ id: string;
41
+ title: string;
42
+ progress_pct: number; // 0 to 100
43
+ start: string; // ISO 8601 date ("2026-06-01") or date-time
44
+ end?: string; // same formats as start
45
+ }
46
+
47
+ interface GanttDep {
48
+ blocker_task_id: string;
49
+ blocked_task_id: string;
50
+ }
51
+ ```
52
+
53
+ ### Props
54
+
55
+ | Prop | Type | Notes |
56
+ | --- | --- | --- |
57
+ | `tasks` | `GanttTask[]` | Required. |
58
+ | `deps` | `GanttDep[]` | Dependency arrows. |
59
+ | `today` | `string` | ISO 8601 date or date-time for the today line. |
60
+ | `tzOffsetMinutes` | `number` | Viewer time zone as minutes east of UTC (JST is `540`). Date-times with an offset are drawn on this zone's calendar day. Never read from the browser. |
61
+ | `legend` | `'shown' \| 'hidden'` | `'hidden'` leaves the colour legend out (see `loadLegendSpec`). |
62
+ | `backend` | `'svg' \| 'canvas'` | Defaults to `svg`. |
63
+ | `deviceTier` | `'low' \| 'high'` | Overrides the detected device tier (useful for visual tests). |
64
+
65
+ The `taskClick` event receives the clicked `GanttTask`.
66
+
67
+ ## Server-side rendering
68
+
69
+ The component loads the Wasm module in `onMounted`, so it renders on the server without touching Wasm and draws the chart after it mounts in the browser. Do not call the Wasm exports of `@koyori-app/arc` (or `loadLegendSpec`, which initialises the module) during server rendering; call them from `onMounted` or other client-only code.
70
+
71
+ ## License
72
+
73
+ MPL-2.0 OR GPL-2.0-or-later.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koyori-app/arc-vue",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.3",
4
4
  "type": "module",
5
5
  "license": "MPL-2.0 OR GPL-2.0-or-later",
6
6
  "repository": {
@@ -43,7 +43,7 @@
43
43
  "vitest": "^4.1.10",
44
44
  "vue": "^3.5.39",
45
45
  "vue-tsc": "^3.3.7",
46
- "@koyori-app/arc": "0.1.0-alpha.2"
46
+ "@koyori-app/arc": "0.1.0-alpha.3"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "vite build",
@@ -1,12 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/vue3-vite';
2
- import { default as GanttChart } from './GanttChart.vue';
3
- declare const meta: Meta<typeof GanttChart>;
4
- export default meta;
5
- type Story = StoryObj<typeof GanttChart>;
6
- export declare const Default: Story;
7
- export declare const Empty: Story;
8
- export declare const NoDependencies: Story;
9
- export declare const ProgressLineEdgeCases: Story;
10
- export declare const CanvasBackend: Story;
11
- export declare const LegendHidden: Story;
12
- export declare const LegendHiddenCanvas: Story;