@dfosco/storyboard-core 2.7.1 → 2.8.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/package.json
CHANGED
|
@@ -98,8 +98,14 @@
|
|
|
98
98
|
setLocal(EXPANDED_KEY, JSON.stringify(expanded))
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
// Prefix a root-relative path with the deploy base path (handles branch deploys)
|
|
102
|
+
function withBase(path: string): string {
|
|
103
|
+
const base = basePath.endsWith('/') ? basePath.slice(0, -1) : basePath
|
|
104
|
+
return `${base}${path.startsWith('/') ? path : `/${path}`}`
|
|
105
|
+
}
|
|
106
|
+
|
|
101
107
|
function protoRoute(dirName: string): string {
|
|
102
|
-
return `/${dirName}`
|
|
108
|
+
return withBase(`/${dirName}`)
|
|
103
109
|
}
|
|
104
110
|
|
|
105
111
|
function formatName(name: string): string {
|
|
@@ -240,7 +246,7 @@
|
|
|
240
246
|
<section class="protoGroup">
|
|
241
247
|
{#if proto.hideFlows && proto.flows.length === 1}
|
|
242
248
|
<!-- Single flow, hidden — navigates directly to the flow -->
|
|
243
|
-
<a class="listItem" href={proto.flows[0].route}>
|
|
249
|
+
<a class="listItem" href={withBase(proto.flows[0].route)}>
|
|
244
250
|
<div class="cardBody">
|
|
245
251
|
<p class="protoName" class:otherflows={proto.dirName === '__global__'}>
|
|
246
252
|
{#if proto.icon}<span class="protoIcon">{proto.icon}</span>{/if}
|
|
@@ -344,7 +350,7 @@
|
|
|
344
350
|
{#if !(proto.hideFlows && proto.flows.length === 1) && isExpanded(proto.dirName) && proto.flows.length > 0}
|
|
345
351
|
<div class="flowList">
|
|
346
352
|
{#each proto.flows as flow (flow.key)}
|
|
347
|
-
<a href={flow.route} class="listItem flowItem">
|
|
353
|
+
<a href={withBase(flow.route)} class="listItem flowItem">
|
|
348
354
|
{#if showThumbnails}
|
|
349
355
|
<div class="thumbnail">
|
|
350
356
|
{@html placeholderSvg(flow.key)}
|