dsh-artifact-studio 0.7.3 → 0.9.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.
@@ -0,0 +1,150 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <meta name="color-scheme" content="light dark">
7
+ <title>Page design reference</title>
8
+ <!-- Render through composePage with resolved tokens. The skill supplies this file's installed path. -->
9
+ <style>
10
+ * { box-sizing: border-box; }
11
+ [hidden] { display: none !important; }
12
+ html { background: var(--artifact-color-background); scrollbar-color: var(--artifact-color-control) var(--artifact-color-background); }
13
+ body { margin: 0; color: var(--artifact-color-text); font: var(--artifact-font-size-2)/1.6 var(--artifact-font-family); overflow-wrap: anywhere; caret-color: var(--artifact-color-primary); }
14
+ ::selection { background: var(--artifact-color-action); color: var(--artifact-color-action-text); }
15
+ :focus-visible { outline: 2px solid var(--artifact-color-focus); outline-offset: 3px; }
16
+ button, input, select { font: inherit; }
17
+ button { cursor: pointer; }
18
+ a { color: var(--artifact-color-primary); text-underline-offset: .2em; }
19
+ h1, h2, h3, p { margin: 0; }
20
+ h1, h2 { font-family: var(--artifact-font-display); font-weight: 600; text-wrap: balance; }
21
+ h1 { max-width: 16ch; font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.03; letter-spacing: -.03em; }
22
+ h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; }
23
+ h3 { font-size: var(--artifact-font-size-2); line-height: 1.4; }
24
+ p { max-width: 65ch; }
25
+ code, .num { font-family: var(--artifact-font-mono); }
26
+ .num { text-align: right; font-variant-numeric: tabular-nums; }
27
+ .page { width: min(100% - 2 * var(--artifact-space-4), 72rem); margin: auto; padding: var(--artifact-space-6) 0; }
28
+ .header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--artifact-space-5); padding-bottom: var(--artifact-space-5); border-bottom: 1px solid var(--artifact-color-border); }
29
+ .lede { max-width: 55ch; margin-top: var(--artifact-space-4); color: var(--artifact-color-muted); }
30
+ .theme { display: flex; flex-wrap: wrap; gap: var(--artifact-space-1); flex-shrink: 0; }
31
+ .button { min-height: 44px; padding: var(--artifact-space-1) var(--artifact-space-3); border: 1px solid var(--artifact-color-control); border-radius: var(--artifact-radius-sm); background: var(--artifact-color-surface); color: var(--artifact-color-text); font-size: var(--artifact-font-size-1); font-weight: 600; }
32
+ .button:hover:not(:disabled) { border-color: var(--artifact-color-text); }
33
+ .button--primary, .theme [aria-pressed="true"] { border-color: var(--artifact-color-action); background: var(--artifact-color-action); color: var(--artifact-color-action-text); }
34
+ .button:disabled { opacity: .5; cursor: not-allowed; }
35
+ .section { padding-top: var(--artifact-space-6); }
36
+ .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--artifact-space-4); margin-bottom: var(--artifact-space-4); }
37
+ .note { max-width: 42ch; color: var(--artifact-color-muted); font-size: var(--artifact-font-size-1); }
38
+ .foundations { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--artifact-space-5); }
39
+ .type-example { padding-top: var(--artifact-space-3); }
40
+ .type-example p + p { margin-top: var(--artifact-space-2); }
41
+ .display-example { font: 600 var(--artifact-font-size-5)/1.15 var(--artifact-font-display); letter-spacing: -.02em; }
42
+ .swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--artifact-space-3); }
43
+ .swatch { display: grid; gap: var(--artifact-space-1); font-size: var(--artifact-font-size-1); }
44
+ .swatch::before { content: ""; height: 44px; border: 1px solid var(--artifact-color-border); border-radius: var(--artifact-radius-sm); background: var(--swatch); }
45
+ .split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--artifact-space-4); align-items: start; }
46
+ .card { padding: var(--artifact-space-4); background: var(--artifact-color-surface); border: 1px solid var(--artifact-color-border); border-radius: var(--artifact-radius-lg); }
47
+ .card > p { margin-top: var(--artifact-space-2); }
48
+ .card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--artifact-space-3); }
49
+ .card-head h3 { font: 600 var(--artifact-font-size-4)/1.2 var(--artifact-font-display); }
50
+ .facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--artifact-space-3); margin: var(--artifact-space-4) 0 0; }
51
+ .facts div { border-top: 1px solid var(--artifact-color-border); padding-top: var(--artifact-space-2); }
52
+ .facts dt { color: var(--artifact-color-muted); font-size: var(--artifact-font-size-1); }
53
+ .facts dd { margin: var(--artifact-space-0) 0 0; font-weight: 600; }
54
+ .callout { background: var(--artifact-color-raised); border-radius: var(--artifact-radius-md); padding: var(--artifact-space-4); }
55
+ .callout p { margin-top: var(--artifact-space-1); }
56
+ .badge { display: inline-flex; align-items: center; gap: var(--artifact-space-1); font-size: var(--artifact-font-size-1); font-weight: 600; }
57
+ .badge::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
58
+ .badge--success { color: var(--artifact-color-success); }
59
+ .badge--warning { color: var(--artifact-color-warning); }
60
+ .badge--danger { color: var(--artifact-color-danger); }
61
+ .form { display: grid; gap: var(--artifact-space-3); max-width: 36rem; }
62
+ .field { display: grid; gap: var(--artifact-space-1); font-size: var(--artifact-font-size-1); font-weight: 600; }
63
+ .input { min-height: 44px; width: 100%; min-width: 0; padding: var(--artifact-space-1) var(--artifact-space-2); border: 1px solid var(--artifact-color-control); border-radius: var(--artifact-radius-sm); background: var(--artifact-color-surface); color: var(--artifact-color-text); }
64
+ .input::placeholder { color: var(--artifact-color-muted); opacity: 1; }
65
+ .input[aria-invalid="true"] { border-color: var(--artifact-color-danger); }
66
+ .actions { display: flex; flex-wrap: wrap; gap: var(--artifact-space-1); }
67
+ .status { color: var(--artifact-color-success); }
68
+ .error { color: var(--artifact-color-danger); }
69
+ .table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--artifact-color-border); border-radius: var(--artifact-radius-md); background: var(--artifact-color-surface); }
70
+ table { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: var(--artifact-font-size-1); }
71
+ caption { padding: var(--artifact-space-3); text-align: left; font-weight: 600; }
72
+ th, td { padding: var(--artifact-space-2) var(--artifact-space-3); text-align: left; border-bottom: 1px solid var(--artifact-color-border); }
73
+ thead { background: var(--artifact-color-raised); }
74
+ tbody tr:last-child > * { border-bottom: 0; }
75
+ .table-hint { margin-top: var(--artifact-space-1); }
76
+ footer { margin-top: var(--artifact-space-6); border-top: 1px solid var(--artifact-color-border); padding-top: var(--artifact-space-4); }
77
+ @media (max-width: 760px) { .header, .section-head { display: grid; gap: var(--artifact-space-3); } .foundations, .split { grid-template-columns: minmax(0, 1fr); } .page { padding-top: var(--artifact-space-4); } }
78
+ @media (max-width: 420px) { .page { width: calc(100% - 2 * var(--artifact-space-3)); } .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card-head { flex-wrap: wrap; } }
79
+ @media (prefers-reduced-motion: no-preference) { .button { transition: border-color .15s ease; } }
80
+ </style>
81
+ </head>
82
+ <body>
83
+ <main class="page">
84
+ <header class="header">
85
+ <div><h1>Page design reference</h1><p class="lede">A quiet editorial starting point for readable artifacts. Use the project's design language when it exists. Reuse the relevant patterns, not this specimen's content.</p></div>
86
+ <div class="theme" role="group" aria-label="Inspect theme"><button type="button" class="button" data-theme="light" aria-pressed="true">Light</button><button type="button" class="button" data-theme="dark" aria-pressed="false">Dark</button><button type="button" class="button" data-theme="host" aria-pressed="false">Follow host</button></div>
87
+ </header>
88
+ <section class="section" aria-labelledby="foundations">
89
+ <div class="section-head"><h2 id="foundations">Foundations</h2><p class="note">Warm neutral backgrounds, rust actions, and separate colors for focus and status.</p></div>
90
+ <div class="foundations"><div class="type-example"><p class="display-example">Make the decision clear.</p><p>Headings establish the hierarchy. Body text explains the evidence. Keep the reading measure near 65 characters and group related content with the spacing scale.</p><p class="note">Captions explain a source or a limit. They do not repeat the heading.</p></div>
91
+ <div class="swatches"><div class="swatch" style="--swatch:var(--artifact-color-background)">Page</div><div class="swatch" style="--swatch:var(--artifact-color-surface)">Surface</div><div class="swatch" style="--swatch:var(--artifact-color-raised)">Raised</div><div class="swatch" style="--swatch:var(--artifact-color-action)">Action</div><div class="swatch" style="--swatch:var(--artifact-color-focus)">Focus</div><div class="swatch" style="--swatch:var(--artifact-color-success)">Success</div></div></div>
92
+ </section>
93
+ <section class="section" aria-labelledby="grouping">
94
+ <div class="section-head"><h2 id="grouping">Group by meaning</h2><p class="note">Use a card for an object and a callout for a decision or limitation.</p></div>
95
+ <div class="split"><article class="card"><div class="card-head"><h3>Release review</h3><span class="badge badge--warning">Needs review</span></div><p class="note">Sample content. The mobile layout needs a review before deployment.</p><dl class="facts"><div><dt>Owner</dt><dd>Design team</dd></div><div><dt>Open checks</dt><dd class="num">3</dd></div></dl></article><aside class="callout"><h3>One system per artifact</h3><p>Use the project palette, type, and spacing together. Do not mix selected project colors with an unrelated default theme.</p></aside></div>
96
+ </section>
97
+ <section class="section" aria-labelledby="controls">
98
+ <div class="section-head"><h2 id="controls">Controls that work</h2><p class="note">This form simulates a local choice. It does not save preferences or send data.</p></div>
99
+ <form class="form" novalidate>
100
+ <label class="field" for="workspace">Workspace name<input class="input" id="workspace" name="workspaceName" autocomplete="off" maxlength="80" required aria-describedby="workspace-error" placeholder="Enter a workspace name"></label>
101
+ <p id="workspace-error" class="error" hidden>Enter a workspace name, then try again.</p>
102
+ <label class="field" for="cadence">Review cadence<select class="input" id="cadence" name="reviewCadence"><option value="weekly">Weekly</option><option value="fortnightly">Every two weeks</option><option value="monthly">Monthly</option></select></label>
103
+ <div class="actions"><button class="button button--primary" type="button" id="apply">Preview choice</button><button class="button" type="button" id="reset-choice">Reset</button><button class="button" type="button" disabled>Unavailable</button></div>
104
+ <p class="status" role="status" id="choice-status">No choice previewed yet.</p>
105
+ </form>
106
+ </section>
107
+ <section class="section" aria-labelledby="data">
108
+ <div class="section-head"><h2 id="data">Readable data</h2><p class="note">Name the units and comparison. Use text and color together for status.</p></div>
109
+ <div class="table-wrap" tabindex="0" role="region" aria-label="Sample release checks, scroll horizontally"><table><caption>Sample release checks. Illustrative data.</caption><thead><tr><th scope="col">Check</th><th scope="col">Owner</th><th scope="col" class="num">Open items</th><th scope="col">Status</th></tr></thead><tbody>
110
+ <tr><th scope="row">API contract</th><td>Engineering</td><td class="num">0</td><td><span class="badge badge--success">Passed</span></td></tr>
111
+ <tr><th scope="row">Mobile layout</th><td>Design</td><td class="num">2</td><td><span class="badge badge--warning">Review</span></td></tr>
112
+ <tr><th scope="row">Deployment approval</th><td>Release team</td><td class="num">1</td><td><span class="badge badge--danger">Blocked</span></td></tr>
113
+ </tbody></table></div><p class="note table-hint">If columns do not fit, scroll within the table or focus it and use the arrow keys.</p>
114
+ </section>
115
+ <footer><p class="note">Use only the parts the content needs. A static report does not need fake loading states or a form. Keep charts, tables, and details tied to the same data.</p></footer>
116
+ </main>
117
+ <script>
118
+ const root = document.documentElement;
119
+ const hostTheme = root.getAttribute('data-artifact-theme');
120
+ const themeButtons = [...document.querySelectorAll('button[data-theme]')];
121
+ function setTheme(value) {
122
+ if (value === 'host') {
123
+ if (hostTheme === null) root.removeAttribute('data-artifact-theme');
124
+ else root.setAttribute('data-artifact-theme', hostTheme);
125
+ } else root.setAttribute('data-artifact-theme', value);
126
+ for (const button of themeButtons) button.setAttribute('aria-pressed', String(button.dataset.theme === value));
127
+ }
128
+ for (const button of themeButtons) button.addEventListener('click', () => setTheme(button.dataset.theme));
129
+ setTheme('host');
130
+ const form = document.querySelector('form');
131
+ const workspace = document.getElementById('workspace');
132
+ const error = document.getElementById('workspace-error');
133
+ const status = document.getElementById('choice-status');
134
+ function previewChoice() {
135
+ const valid = workspace.value.trim().length > 0;
136
+ workspace.setAttribute('aria-invalid', String(!valid));
137
+ error.hidden = valid;
138
+ if (!valid) { status.textContent = 'Choice not previewed. Enter a workspace name.'; workspace.focus(); return; }
139
+ const cadence = document.getElementById('cadence');
140
+ status.textContent = 'Preview only: ' + workspace.value.trim() + ', ' + cadence.selectedOptions[0].text.toLowerCase() + ' review. Nothing was saved or sent.';
141
+ }
142
+ form.addEventListener('submit', (event) => { event.preventDefault(); previewChoice(); });
143
+ document.getElementById('apply').addEventListener('click', previewChoice);
144
+ document.getElementById('reset-choice').addEventListener('click', () => {
145
+ form.reset(); workspace.removeAttribute('aria-invalid'); error.hidden = true;
146
+ status.textContent = 'No choice previewed yet.'; workspace.focus();
147
+ });
148
+ </script>
149
+ </body>
150
+ </html>
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "dsh-artifact-studio",
3
- "version": "0.7.3",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
- "description": "Local-first artifacts for DeepSeek Harness: the agent creates pages and documents as versioned files, and you open, edit, restore, and export them beside the chat.",
5
+ "description": "Local-first artifacts for DeepSeek Harness: the agent creates pages, documents, spreadsheets, and mockups as versioned files, and you open, edit, restore, and export them beside the chat.",
6
6
  "keywords": [
7
7
  "dsh",
8
8
  "dsh-plugin",
@@ -10,6 +10,8 @@
10
10
  "deepseek",
11
11
  "artifacts",
12
12
  "documents",
13
+ "spreadsheets",
14
+ "sheets",
13
15
  "design-system",
14
16
  "local-first"
15
17
  ],
@@ -28,7 +30,9 @@
28
30
  "client.js",
29
31
  "client.doc.js",
30
32
  "client.canvas.js",
33
+ "client.sheet.js",
31
34
  "assets",
35
+ "examples/page-design-system.html",
32
36
  "cordis.patch.yml",
33
37
  "locale/*.json",
34
38
  "icon.svg",
@@ -65,6 +69,8 @@
65
69
  "@open-pencil/core": "0.16.0",
66
70
  "@open-pencil/scene-graph": "0.16.0",
67
71
  "docx": "9.15.3",
72
+ "fast-formula-parser": "^1.0.19",
73
+ "fflate": "^0.8.3",
68
74
  "marked": "^17.0.1"
69
75
  },
70
76
  "devDependencies": {