@dfosco/storyboard-core 4.2.0-beta.20 → 4.2.0-beta.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfosco/storyboard-core",
3
- "version": "4.2.0-beta.20",
3
+ "version": "4.2.0-beta.21",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -38,7 +38,7 @@ import fs from 'node:fs'
38
38
  import path from 'node:path'
39
39
  import { Buffer } from 'node:buffer'
40
40
  import { materializeFromText, serializeEvent } from './materializer.js'
41
- import { toCanvasId, parseCanvasId, canvasIdBasename, isLegacyCanvasId } from './identity.js'
41
+ import { toCanvasId, parseCanvasId } from './identity.js'
42
42
  import {
43
43
  GH_INSTALL_URL,
44
44
  GitHubEmbedError,
@@ -207,15 +207,11 @@ function parseExportNames(filePath) {
207
207
 
208
208
  /**
209
209
  * Find a canvas JSONL file by canonical ID.
210
- * Tries an exact canonical match first. If the input is a legacy bare name
211
- * (no path segments), falls back to basename matching across all canvases.
212
- * Basename fallback only succeeds when exactly one canvas matches — ambiguous
213
- * lookups return null with a console warning.
210
+ * Only matches canonical path-based IDs from toCanvasId().
214
211
  */
215
212
  function findCanvasPath(root, canvasId) {
216
213
  const files = findCanvasFiles(root)
217
214
 
218
- // 1. Exact canonical match — always wins
219
215
  for (const file of files) {
220
216
  const id = toCanvasId(file)
221
217
  if (id === canvasId) {
@@ -223,26 +219,6 @@ function findCanvasPath(root, canvasId) {
223
219
  }
224
220
  }
225
221
 
226
- // 2. Legacy basename fallback — only for bare names like "overview"
227
- if (isLegacyCanvasId(canvasId)) {
228
- const matches = []
229
- for (const file of files) {
230
- if (canvasIdBasename(toCanvasId(file)) === canvasId) {
231
- matches.push(file)
232
- }
233
- }
234
- if (matches.length === 1) {
235
- return path.resolve(root, matches[0])
236
- }
237
- if (matches.length > 1) {
238
- console.warn(
239
- `[storyboard] Ambiguous canvas name "${canvasId}" matches ${matches.length} canvases: ` +
240
- matches.map(f => toCanvasId(f)).join(', ') +
241
- '. Use the full path-based ID to disambiguate.'
242
- )
243
- }
244
- }
245
-
246
222
  return null
247
223
  }
248
224