handoff-app 1.0.6-canary.0 → 1.0.6

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": "handoff-app",
3
- "version": "1.0.6-canary.0",
3
+ "version": "1.0.6",
4
4
  "description": "Automated documentation toolchain for building client side documentation from figma",
5
5
  "author ": {
6
6
  "name": "Convertiv",
@@ -234,7 +234,7 @@ export const AbstractComponentsPageCard = ({
234
234
  return (
235
235
  <div className={cn(layout === 'single' && 'grid grid-cols-[130px_1fr] items-start gap-6')}>
236
236
  <Link href={available ? (absolute ? path : `/system/component/${id}`) : '#'} className="block bg-gray-50">
237
- <img src={image} width={1528} height={1250} alt="Components" className="mb-5 rounded-lg" />
237
+ <img src={`${process.env.HANDOFF_APP_BASE_PATH ?? ''}${image}`} width={1528} height={1250} alt="Components" className="mb-5 rounded-lg" />
238
238
  </Link>
239
239
  <div>
240
240
  <h2 className="text-base font-medium">{title}</h2>
@@ -289,8 +289,15 @@ export const staticBuildMenu = () => {
289
289
  return sections.concat(custom).sort((a: SectionLink, b: SectionLink) => a.weight - b.weight);
290
290
  };
291
291
 
292
+ const buildBasePath = () => {
293
+ if(!process.env.HANDOFF_APP_BASE_PATH) {
294
+ return '';
295
+ }
296
+ return (process.env.HANDOFF_APP_BASE_PATH ?? '').replace(/^\//, '') + '/';
297
+ };
298
+
292
299
  const staticBuildComponentMenu = (type?: boolean | string) => {
293
- const basePath = (process.env.HANDOFF_APP_BASE_PATH ?? '').replace(/^\//, '');
300
+ const basePath = buildBasePath();
294
301
  let menu = [];
295
302
  let components = fetchComponents({ includeTokens: false });
296
303
  if (typeof type === 'string' && type !== '') {
@@ -321,7 +328,7 @@ const staticBuildComponentMenu = (type?: boolean | string) => {
321
328
  };
322
329
 
323
330
  const staticBuildTokensMenu = () => {
324
- const basePath = (process.env.HANDOFF_APP_BASE_PATH ?? '').replace(/^\//, '');
331
+ const basePath = buildBasePath();
325
332
 
326
333
  const menu = [
327
334
  {
@@ -374,7 +381,7 @@ const staticBuildTokensMenu = () => {
374
381
  };
375
382
 
376
383
  const staticBuildTokenMenu = () => {
377
- const basePath = (process.env.HANDOFF_APP_BASE_PATH ?? '').replace(/^\//, '');
384
+ const basePath = buildBasePath();
378
385
 
379
386
  let subSections = {
380
387
  title: 'Tokens',