@yoamigo.com/core 1.4.0 → 1.4.2

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/dist/plugin.js CHANGED
@@ -97,6 +97,15 @@ if (import.meta.hot) {
97
97
  // Ensure single React instance across all packages (prevents "Invalid hook call" errors)
98
98
  dedupe: ["react", "react-dom"]
99
99
  },
100
+ // Force Vite to pre-bundle @tabler/icons-react with the app's React instance
101
+ // This prevents Symbol mismatch issues when dynamically importing icons in DEV mode
102
+ optimizeDeps: {
103
+ include: [
104
+ ...tablerIconsPath ? ["@tabler/icons-react"] : [],
105
+ "react",
106
+ "react-dom"
107
+ ]
108
+ },
100
109
  server: {
101
110
  port: process.env.PORT ? parseInt(process.env.PORT, 10) : 5173,
102
111
  strictPort: false,
package/dist/prod.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { c as ContentStore, E as ContentStoreMode, C as ContentStoreProvider, g as MarkdownText, h as MarkdownTextProps, P as PageInfo, d as StaticImage, f as StaticImageProps, M as StaticText, S as StaticTextProps, d as YaImage, f as YaImageProps, M as YaText, S as YaTextProps, b as background, e as embed, i as image, l as link, p as parseEmbedUrl, t as text, a as useContentStore, u as useSafeTriangle, v as video } from './useSafeTriangle-D5RnB8wa.js';
1
+ export { A as AudioFieldValue, d as ContentStore, E as ContentStoreMode, C as ContentStoreProvider, h as MarkdownText, j as MarkdownTextProps, P as PageInfo, f as StaticImage, g as StaticImageProps, M as StaticText, S as StaticTextProps, f as YaImage, g as YaImageProps, M as YaText, S as YaTextProps, a as audio, b as background, e as embed, i as image, l as link, p as parseEmbedUrl, t as text, c as useContentStore, u as useSafeTriangle, v as video } from './useSafeTriangle-PCUZIdaA.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import React__default, { CSSProperties, ReactNode, ComponentType } from 'react';
4
4
  export { Link, LinkProps, NavigateFunction, RouteDefinition, Router, RouterProps, ScrollRestoration, createRouteDefinition, extractRouteParams, filePathToRoutePath, generatePath, sortRoutesBySpecificity, useNavigate } from './router.js';
package/dist/prod.js CHANGED
@@ -1387,6 +1387,9 @@ function embed(config) {
1387
1387
  function link(href) {
1388
1388
  return href;
1389
1389
  }
1390
+ function audio(config) {
1391
+ return JSON.stringify(config);
1392
+ }
1390
1393
 
1391
1394
  // src/hooks/useSafeTriangle.ts
1392
1395
  import { useState as useState5, useRef as useRef5, useCallback as useCallback3, useEffect as useEffect6, useId } from "react";
@@ -1630,6 +1633,7 @@ export {
1630
1633
  StaticLink as YaLink,
1631
1634
  MpText as YaText,
1632
1635
  StaticVideo as YaVideo,
1636
+ audio,
1633
1637
  background,
1634
1638
  contentRegistry,
1635
1639
  createRouteDefinition,
@@ -315,6 +315,18 @@ declare function MarkdownText({ content, className }: MarkdownTextProps): react_
315
315
  * ```
316
316
  */
317
317
 
318
+ /**
319
+ * Audio field value for linking audio assets to content fields.
320
+ * Used by audio players and other audio components.
321
+ */
322
+ interface AudioFieldValue {
323
+ /** Asset ID from the website_assets table */
324
+ assetId: string;
325
+ /** Original filename */
326
+ filename: string;
327
+ /** CDN URL for the audio file */
328
+ url: string;
329
+ }
318
330
  /**
319
331
  * Text content for YaText fields.
320
332
  *
@@ -414,6 +426,17 @@ declare function embed(config: EmbedFieldValue): string;
414
426
  * "footer.twitterLink.href": link("https://twitter.com/username"),
415
427
  */
416
428
  declare function link(href: string): string;
429
+ /**
430
+ * Audio field value for linking audio assets to content fields.
431
+ *
432
+ * Used by audio players to link specific tracks to content slots.
433
+ * The assetId is used to look up the audio file from the API.
434
+ *
435
+ * @example
436
+ * // In content.ts:
437
+ * "player.track1": audio({ assetId: "abc123", filename: "song.mp3", url: "/assets/song.mp3" }),
438
+ */
439
+ declare function audio(config: AudioFieldValue): string;
417
440
 
418
441
  interface UseSafeTriangleOptions {
419
442
  /** Delay before showing popover (ms) */
@@ -484,4 +507,4 @@ interface UseSafeTriangleReturn<T extends HTMLElement, U extends HTMLElement> {
484
507
  */
485
508
  declare function useSafeTriangle<T extends HTMLElement = HTMLElement, U extends HTMLElement = HTMLDivElement>(options?: UseSafeTriangleOptions): UseSafeTriangleReturn<T, U>;
486
509
 
487
- export { YaContainer as A, parseBackgroundConfig as B, ContentStoreProvider as C, serializeBackgroundConfig as D, type EditMode as E, type YaContainerProps as F, type BackgroundConfig as G, type BackgroundImageConfig as H, type ImageFieldValue as I, MpText as M, type OverlayConfig as O, type PageInfo as P, type StaticTextProps as S, type VideoFieldValue as V, YaImage as Y, useContentStore as a, background as b, type ContentStore as c, MpImage as d, embed as e, type StaticImageProps as f, MarkdownText as g, type MarkdownTextProps as h, image as i, type YaImageProps as j, YaVideo as k, link as l, serializeVideoValue as m, type YaVideoProps as n, YaEmbed as o, parseEmbedUrl as p, serializeEmbedValue as q, type YaEmbedProps as r, serializeImageValue as s, text as t, useSafeTriangle as u, video as v, type EmbedFieldValue as w, type EmbedType as x, YaLink as y, type YaLinkProps as z };
510
+ export { type AudioFieldValue as A, type YaLinkProps as B, ContentStoreProvider as C, YaContainer as D, type EditMode as E, parseBackgroundConfig as F, serializeBackgroundConfig as G, type YaContainerProps as H, type ImageFieldValue as I, type BackgroundConfig as J, type BackgroundImageConfig as K, MpText as M, type OverlayConfig as O, type PageInfo as P, type StaticTextProps as S, type VideoFieldValue as V, YaImage as Y, audio as a, background as b, useContentStore as c, type ContentStore as d, embed as e, MpImage as f, type StaticImageProps as g, MarkdownText as h, image as i, type MarkdownTextProps as j, type YaImageProps as k, link as l, YaVideo as m, serializeVideoValue as n, type YaVideoProps as o, parseEmbedUrl as p, YaEmbed as q, serializeEmbedValue as r, serializeImageValue as s, text as t, useSafeTriangle as u, video as v, type YaEmbedProps as w, type EmbedFieldValue as x, type EmbedType as y, YaLink as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoamigo.com/core",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Core components, router, and utilities for YoAmigo templates",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",