@yoamigo.com/core 0.3.0 → 0.3.3
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/{MarkdownText-BUTYfqXS.d.ts → MarkdownText-Nvkeyr1z.d.ts} +46 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +619 -180
- package/dist/lib.js +30 -5
- package/dist/plugin.js +6 -0
- package/dist/prod.d.ts +136 -3
- package/dist/prod.js +591 -4
- package/package.json +1 -1
|
@@ -18,6 +18,51 @@ interface ContentStoreProviderProps {
|
|
|
18
18
|
}
|
|
19
19
|
declare function ContentStoreProvider({ children }: ContentStoreProviderProps): react_jsx_runtime.JSX.Element;
|
|
20
20
|
|
|
21
|
+
type EmbedType = 'spotify' | 'soundcloud' | 'twitter' | 'instagram' | 'custom';
|
|
22
|
+
interface EmbedFieldValue {
|
|
23
|
+
/** Embed platform type */
|
|
24
|
+
type: EmbedType;
|
|
25
|
+
/** Embed URL or ID (platform-specific) */
|
|
26
|
+
src: string;
|
|
27
|
+
/** Original URL pasted by user (for editing) */
|
|
28
|
+
originalUrl?: string;
|
|
29
|
+
/** CSS aspect-ratio (e.g., "16/9", "1/1") */
|
|
30
|
+
aspectRatio?: string;
|
|
31
|
+
/** Fixed height in pixels (for audio players) */
|
|
32
|
+
height?: number;
|
|
33
|
+
/** Spotify-specific: content type */
|
|
34
|
+
spotifyType?: 'track' | 'album' | 'playlist' | 'episode' | 'show';
|
|
35
|
+
}
|
|
36
|
+
interface YaEmbedProps {
|
|
37
|
+
fieldId: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
/** Default aspect ratio from props */
|
|
40
|
+
aspectRatio?: string;
|
|
41
|
+
/** Max width constraint */
|
|
42
|
+
maxWidth?: number;
|
|
43
|
+
/** Loading strategy */
|
|
44
|
+
loading?: 'lazy' | 'eager';
|
|
45
|
+
/** Default embed value (used when nothing in content store) */
|
|
46
|
+
defaultValue?: EmbedFieldValue;
|
|
47
|
+
}
|
|
48
|
+
interface ParsedEmbed {
|
|
49
|
+
type: EmbedType;
|
|
50
|
+
src: string;
|
|
51
|
+
originalUrl: string;
|
|
52
|
+
aspectRatio?: string;
|
|
53
|
+
height?: number;
|
|
54
|
+
spotifyType?: EmbedFieldValue['spotifyType'];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Parse a URL and detect the embed platform
|
|
58
|
+
*/
|
|
59
|
+
declare function parseEmbedUrl(url: string): ParsedEmbed | null;
|
|
60
|
+
/**
|
|
61
|
+
* Serialize embed field value for storage
|
|
62
|
+
*/
|
|
63
|
+
declare function serializeEmbedValue(value: EmbedFieldValue): string;
|
|
64
|
+
declare function YaEmbed({ fieldId, className, aspectRatio: propAspectRatio, maxWidth, loading, defaultValue, }: YaEmbedProps): react_jsx_runtime.JSX.Element;
|
|
65
|
+
|
|
21
66
|
interface PageInfo {
|
|
22
67
|
path: string;
|
|
23
68
|
label: string;
|
|
@@ -109,4 +154,4 @@ interface MarkdownTextProps {
|
|
|
109
154
|
*/
|
|
110
155
|
declare function MarkdownText({ content, className }: MarkdownTextProps): react_jsx_runtime.JSX.Element;
|
|
111
156
|
|
|
112
|
-
export { ContentStoreProvider as C, type EditMode as E, MpText as M, type PageInfo as P, type StaticTextProps as S,
|
|
157
|
+
export { ContentStoreProvider as C, type EditMode as E, MpText as M, type PageInfo as P, type StaticTextProps as S, YaEmbed as Y, type ContentStore as a, MpImage as b, type StaticImageProps as c, MarkdownText as d, type MarkdownTextProps as e, type YaEmbedProps as f, type EmbedFieldValue as g, type EmbedType as h, YaLink as i, type YaLinkProps as j, parseEmbedUrl as p, serializeEmbedValue as s, useContentStore as u };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React$1, { ReactNode, CSSProperties } from 'react';
|
|
3
|
-
export { C as ContentStoreProviderProd, d as MarkdownText, e as MarkdownTextProps, P as PageInfo, b as StaticImage, c as StaticImageProps, M as StaticText, S as StaticTextProps, Y as
|
|
3
|
+
export { C as ContentStoreProviderProd, g as EmbedFieldValue, h as EmbedType, d as MarkdownText, e as MarkdownTextProps, P as PageInfo, b as StaticImage, c as StaticImageProps, M as StaticText, S as StaticTextProps, Y as YaEmbed, f as YaEmbedProps, i as YaLink, j as YaLinkProps, p as parseEmbedUrl, s as serializeEmbedValue, u as useContentStoreProd } from './MarkdownText-Nvkeyr1z.js';
|
|
4
4
|
export { Link, LinkProps, NavigateFunction, Router, RouterProps, useNavigate } from './router.js';
|
|
5
5
|
export { Route, Switch, useParams } from 'wouter';
|
|
6
6
|
export { A as AssetResolverFn, C as ContentRegistry, c as contentRegistry, a as getAllContent, g as getContent, h as hasContent, r as registerContent, b as resolveAssetUrl, s as setAssetResolver } from './asset-resolver-BnIvDkVv.js';
|