@atom63/mdx 0.4.0-beta.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.
Files changed (88) hide show
  1. package/API.md +47 -0
  2. package/CONTRIBUTING.md +58 -0
  3. package/LICENSE +21 -0
  4. package/README.md +190 -0
  5. package/dist/article/index.d.ts +32 -0
  6. package/dist/article/index.js +38 -0
  7. package/dist/article/index.js.map +1 -0
  8. package/dist/blocks/credits-block-entry.d.ts +14 -0
  9. package/dist/blocks/credits-block-entry.js +4 -0
  10. package/dist/blocks/credits-block-entry.js.map +1 -0
  11. package/dist/blocks/index.d.ts +175 -0
  12. package/dist/blocks/index.js +9 -0
  13. package/dist/blocks/index.js.map +1 -0
  14. package/dist/blocks/media-caption-entry.d.ts +11 -0
  15. package/dist/blocks/media-caption-entry.js +4 -0
  16. package/dist/blocks/media-caption-entry.js.map +1 -0
  17. package/dist/chunk-2RCEDZBB.js +11 -0
  18. package/dist/chunk-2RCEDZBB.js.map +1 -0
  19. package/dist/chunk-34B2U2Y2.js +59 -0
  20. package/dist/chunk-34B2U2Y2.js.map +1 -0
  21. package/dist/chunk-A3NG5VKX.js +169 -0
  22. package/dist/chunk-A3NG5VKX.js.map +1 -0
  23. package/dist/chunk-CSXZ2XEN.js +479 -0
  24. package/dist/chunk-CSXZ2XEN.js.map +1 -0
  25. package/dist/chunk-DJSENA7Q.js +63 -0
  26. package/dist/chunk-DJSENA7Q.js.map +1 -0
  27. package/dist/chunk-EIY6ZR6T.js +2471 -0
  28. package/dist/chunk-EIY6ZR6T.js.map +1 -0
  29. package/dist/chunk-EPSRYU5X.js +61 -0
  30. package/dist/chunk-EPSRYU5X.js.map +1 -0
  31. package/dist/chunk-FVCE4FER.js +132 -0
  32. package/dist/chunk-FVCE4FER.js.map +1 -0
  33. package/dist/chunk-IART7J2U.js +101 -0
  34. package/dist/chunk-IART7J2U.js.map +1 -0
  35. package/dist/chunk-OUEW54AC.js +144 -0
  36. package/dist/chunk-OUEW54AC.js.map +1 -0
  37. package/dist/chunk-WZ6US342.js +231 -0
  38. package/dist/chunk-WZ6US342.js.map +1 -0
  39. package/dist/constants-CuaBcwMe.d.ts +4 -0
  40. package/dist/editor/index.d.ts +47 -0
  41. package/dist/editor/index.js +118 -0
  42. package/dist/editor/index.js.map +1 -0
  43. package/dist/framed-block-DM5LLxO7.d.ts +87 -0
  44. package/dist/index.d.ts +45 -0
  45. package/dist/index.js +20 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/lightbox/index.d.ts +44 -0
  48. package/dist/lightbox/index.js +5 -0
  49. package/dist/lightbox/index.js.map +1 -0
  50. package/dist/mdx-provider-6gOypsy5.d.ts +185 -0
  51. package/dist/photo-swipe-CwzAHpP-.d.ts +66 -0
  52. package/dist/primitives/index.d.ts +130 -0
  53. package/dist/primitives/index.js +132 -0
  54. package/dist/primitives/index.js.map +1 -0
  55. package/dist/runtime/index.d.ts +39 -0
  56. package/dist/runtime/index.js +4 -0
  57. package/dist/runtime/index.js.map +1 -0
  58. package/dist/slots-BvPdUMdY.d.ts +23 -0
  59. package/dist/video-block-C0a5Yx9x.d.ts +468 -0
  60. package/package.json +139 -0
  61. package/src/blocks/callout/callout.css +37 -0
  62. package/src/blocks/code-block/code-block.css +40 -0
  63. package/src/blocks/color-swatch-item/color-swatch-item.css +36 -0
  64. package/src/blocks/compare/compare.css +14 -0
  65. package/src/blocks/comparison-pair/comparison-pair.css +27 -0
  66. package/src/blocks/credits-block/credits-block.css +16 -0
  67. package/src/blocks/demo-stage/demo-stage.css +50 -0
  68. package/src/blocks/doc-example/doc-example.css +44 -0
  69. package/src/blocks/image-compare/image-compare.css +45 -0
  70. package/src/blocks/layer-stack/layer-stack.css +28 -0
  71. package/src/blocks/media-placeholder/media-placeholder.css +11 -0
  72. package/src/blocks/mermaid-diagram/mermaid-diagram.css +52 -0
  73. package/src/blocks/page-meta/page-meta.css +7 -0
  74. package/src/blocks/page-table-of-contents/page-table-of-contents.css +73 -0
  75. package/src/blocks/resource-list/resource-list.css +138 -0
  76. package/src/blocks/scroll-stage/scroll-stage.css +12 -0
  77. package/src/blocks/stat-card/stat-card.css +18 -0
  78. package/src/blocks/steps/steps.css +20 -0
  79. package/src/blocks/timeline/timeline.css +12 -0
  80. package/src/blocks/video-block/video-block.css +11 -0
  81. package/src/primitives/motion-tokens.css +16 -0
  82. package/src/styles/a63.css +13 -0
  83. package/src/styles/base.css +362 -0
  84. package/src/styles/block-recipes.css +21 -0
  85. package/src/styles/consumer.css +7 -0
  86. package/src/styles/index.css +12 -0
  87. package/src/styles/mdx-blocks.css +9 -0
  88. package/src/styles/shadcn.css +12 -0
@@ -0,0 +1,44 @@
1
+ export { M as MDX_FIGURE_LIGHTBOX_GALLERY_ID } from '../constants-CuaBcwMe.js';
2
+ import { P as PhotoSwipeImageData } from '../photo-swipe-CwzAHpP-.js';
3
+ export { a as PhotoSwipeGallery, b as PhotoSwipeGalleryProps, c as PhotoSwipeImage, d as PhotoSwipeImageProps, g as getImageDimensions, e as getRealImageDimensions, l as loadImageDimensions, u as usePhotoSwipe } from '../photo-swipe-CwzAHpP-.js';
4
+ import * as React$1 from 'react';
5
+
6
+ type FigureLightboxHostProps = {
7
+ children: React.ReactNode;
8
+ /**
9
+ * Optional gallery filter. When omitted (default), every `button[data-pswp-src]`
10
+ * in the subtree is handled — including ImageBlock / ImageGrid custom gallery ids.
11
+ */
12
+ galleryId?: string;
13
+ };
14
+ /** Resolve a lightbox trigger from a click target (any gallery). */
15
+ declare function resolveLightboxTrigger(target: Element): HTMLElement | null;
16
+ /**
17
+ * Single delegated click handler for all figure lightbox triggers in MDX content.
18
+ * Mount once per MDX root (via MDXContentProvider). The gallery opens in the
19
+ * design system's `MediaLightbox`.
20
+ */
21
+ declare function FigureLightboxHost({ children, galleryId }: FigureLightboxHostProps): React$1.JSX.Element;
22
+
23
+ type FigureLightboxTriggerProps = {
24
+ alt: string;
25
+ caption?: string;
26
+ children: React.ReactNode;
27
+ className?: string;
28
+ galleryId?: string;
29
+ height: number;
30
+ src: string;
31
+ width: number;
32
+ };
33
+ declare function FigureLightboxTrigger({ src, alt, caption, width, height, galleryId, className, children, }: FigureLightboxTriggerProps): React$1.JSX.Element;
34
+
35
+ /** Collect all lightbox triggers for a gallery id in DOM order. */
36
+ declare function collectFigureLightboxImages(galleryId: string, clickedTrigger: HTMLElement): {
37
+ images: PhotoSwipeImageData[];
38
+ index: number;
39
+ triggers: HTMLElement[];
40
+ };
41
+ /** True while a figure lightbox is open (or just closed on this Escape tick). */
42
+ declare function isFigureLightboxOpen(): boolean;
43
+
44
+ export { FigureLightboxHost, type FigureLightboxHostProps, FigureLightboxTrigger, type FigureLightboxTriggerProps, PhotoSwipeImageData, collectFigureLightboxImages, isFigureLightboxOpen, resolveLightboxTrigger };
@@ -0,0 +1,5 @@
1
+ export { PhotoSwipeGallery, PhotoSwipeImage, usePhotoSwipe } from '../chunk-34B2U2Y2.js';
2
+ export { FigureLightboxHost, collectFigureLightboxImages, isFigureLightboxOpen, resolveLightboxTrigger } from '../chunk-OUEW54AC.js';
3
+ export { FigureLightboxTrigger, MDX_FIGURE_LIGHTBOX_GALLERY_ID, getImageDimensions, getRealImageDimensions, loadImageDimensions } from '../chunk-IART7J2U.js';
4
+ //# sourceMappingURL=index.js.map
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,185 @@
1
+ import * as React from 'react';
2
+ import React__default, { ReactNode } from 'react';
3
+ import { A as Accordion, a as Callout, b as CodeBlock, c as ColorSwatchItem, d as ComparisonPair, D as DemoStageProps, E as ExampleContainer, F as FigureBlock, M as MediaPlaceholder, e as MermaidDiagram, P as PageMeta, f as PageTableOfContents, R as ResourceList, S as ScrollStage, g as StatCard, h as StatGrid, i as Steps, T as Tabs, j as Timeline, V as VideoBlock } from './video-block-C0a5Yx9x.js';
4
+ import { CreditsBlock } from './blocks/credits-block-entry.js';
5
+ import { MediaCaption } from './blocks/media-caption-entry.js';
6
+ import { MDXProvider } from '@mdx-js/react';
7
+
8
+ /** True when rendering inside an ExampleContainer — MDX typography styles should not apply. */
9
+ declare const ExampleContext: React.Context<boolean>;
10
+ declare const useIsInsideExample: () => boolean;
11
+
12
+ declare function hasSkipClass(className?: string): boolean;
13
+ declare function useMdxStyle(style: string, className?: string): string;
14
+
15
+ /** Portable block components registered on the default MDX map. */
16
+ declare const blockMdxComponents: {
17
+ readonly Accordion: typeof Accordion;
18
+ readonly Callout: typeof Callout;
19
+ readonly CodeBlock: typeof CodeBlock;
20
+ readonly ColorSwatchItem: typeof ColorSwatchItem;
21
+ readonly ComparisonPair: typeof ComparisonPair;
22
+ readonly CreditsBlock: typeof CreditsBlock;
23
+ readonly DemoStage: React__default.ForwardRefExoticComponent<DemoStageProps & React__default.RefAttributes<HTMLElement>>;
24
+ readonly ExampleContainer: typeof ExampleContainer;
25
+ readonly FigureBlock: typeof FigureBlock;
26
+ readonly MediaCaption: typeof MediaCaption;
27
+ readonly MediaPlaceholder: typeof MediaPlaceholder;
28
+ readonly MermaidDiagram: typeof MermaidDiagram;
29
+ readonly PageMeta: typeof PageMeta;
30
+ readonly PageTableOfContents: typeof PageTableOfContents;
31
+ readonly ResourceList: typeof ResourceList;
32
+ readonly ScrollStage: typeof ScrollStage;
33
+ readonly StatCard: typeof StatCard;
34
+ readonly StatGrid: typeof StatGrid;
35
+ readonly Steps: typeof Steps;
36
+ readonly Tabs: typeof Tabs;
37
+ readonly Timeline: typeof Timeline;
38
+ readonly VideoBlock: typeof VideoBlock;
39
+ };
40
+
41
+ declare function MdxAnchor({ className, href, rel, target, ...props }: React__default.ComponentProps<'a'>): React__default.JSX.Element;
42
+ declare function MdxImage({ className, alt, src, height, width, loading, ...props }: React__default.ImgHTMLAttributes<HTMLImageElement>): React__default.JSX.Element;
43
+ declare function MdxParagraph({ className, ...props }: React__default.HTMLAttributes<HTMLParagraphElement>): React__default.JSX.Element;
44
+ declare function MdxCode({ className, ...props }: React__default.HTMLAttributes<HTMLElement>): React__default.JSX.Element;
45
+ declare const mdxComponents: {
46
+ Accordion: typeof Accordion;
47
+ Callout: typeof Callout;
48
+ CodeBlock: typeof CodeBlock;
49
+ ColorSwatchItem: typeof ColorSwatchItem;
50
+ ComparisonPair: typeof ComparisonPair;
51
+ CreditsBlock: typeof CreditsBlock;
52
+ DemoStage: React__default.ForwardRefExoticComponent<DemoStageProps & React__default.RefAttributes<HTMLElement>>;
53
+ ExampleContainer: typeof ExampleContainer;
54
+ FigureBlock: typeof FigureBlock;
55
+ MediaCaption: typeof MediaCaption;
56
+ MediaPlaceholder: typeof MediaPlaceholder;
57
+ MermaidDiagram: typeof MermaidDiagram;
58
+ PageMeta: typeof PageMeta;
59
+ PageTableOfContents: typeof PageTableOfContents;
60
+ ResourceList: typeof ResourceList;
61
+ ScrollStage: typeof ScrollStage;
62
+ StatCard: typeof StatCard;
63
+ StatGrid: typeof StatGrid;
64
+ Steps: typeof Steps;
65
+ Tabs: typeof Tabs;
66
+ Timeline: typeof Timeline;
67
+ VideoBlock: typeof VideoBlock;
68
+ h1: ({ className, ...props }: React__default.HTMLAttributes<HTMLHeadingElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLHeadingElement>, "className"> & {
69
+ className: string;
70
+ }, string | React__default.JSXElementConstructor<any>>;
71
+ h2: ({ className, ...props }: React__default.HTMLAttributes<HTMLHeadingElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLHeadingElement>, "className"> & {
72
+ className: string;
73
+ }, string | React__default.JSXElementConstructor<any>>;
74
+ h3: ({ className, ...props }: React__default.HTMLAttributes<HTMLHeadingElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLHeadingElement>, "className"> & {
75
+ className: string;
76
+ }, string | React__default.JSXElementConstructor<any>>;
77
+ h4: ({ className, ...props }: React__default.HTMLAttributes<HTMLHeadingElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLHeadingElement>, "className"> & {
78
+ className: string;
79
+ }, string | React__default.JSXElementConstructor<any>>;
80
+ h5: ({ className, ...props }: React__default.HTMLAttributes<HTMLHeadingElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLHeadingElement>, "className"> & {
81
+ className: string;
82
+ }, string | React__default.JSXElementConstructor<any>>;
83
+ h6: ({ className, ...props }: React__default.HTMLAttributes<HTMLHeadingElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLHeadingElement>, "className"> & {
84
+ className: string;
85
+ }, string | React__default.JSXElementConstructor<any>>;
86
+ p: typeof MdxParagraph;
87
+ blockquote: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
88
+ className: string;
89
+ }, string | React__default.JSXElementConstructor<any>>;
90
+ code: typeof MdxCode;
91
+ pre: ({ className, ...props }: React__default.HTMLAttributes<HTMLPreElement>) => React__default.JSX.Element;
92
+ ul: ({ className, ...props }: React__default.HTMLAttributes<HTMLUListElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLUListElement>, "className"> & {
93
+ className: string;
94
+ }, string | React__default.JSXElementConstructor<any>>;
95
+ ol: ({ className, ...props }: React__default.HTMLAttributes<HTMLOListElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLOListElement>, "className"> & {
96
+ className: string;
97
+ }, string | React__default.JSXElementConstructor<any>>;
98
+ li: ({ className, ...props }: React__default.HTMLAttributes<HTMLLIElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLLIElement>, "className"> & {
99
+ className: string;
100
+ }, string | React__default.JSXElementConstructor<any>>;
101
+ a: typeof MdxAnchor;
102
+ strong: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
103
+ className: string;
104
+ }, string | React__default.JSXElementConstructor<any>>;
105
+ em: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
106
+ className: string;
107
+ }, string | React__default.JSXElementConstructor<any>>;
108
+ kbd: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
109
+ className: string;
110
+ }, string | React__default.JSXElementConstructor<any>>;
111
+ hr: ({ className, ...props }: React__default.HTMLAttributes<HTMLHRElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLHRElement>, "className"> & {
112
+ className: string;
113
+ }, string | React__default.JSXElementConstructor<any>>;
114
+ table: ({ className, ...props }: React__default.HTMLAttributes<HTMLTableElement>) => React__default.JSX.Element;
115
+ thead: ({ className, ...props }: React__default.HTMLAttributes<HTMLTableSectionElement>) => React__default.JSX.Element;
116
+ tbody: ({ className, ...props }: React__default.HTMLAttributes<HTMLTableSectionElement>) => React__default.JSX.Element;
117
+ tr: ({ className, ...props }: React__default.HTMLAttributes<HTMLTableRowElement>) => React__default.JSX.Element;
118
+ th: ({ className, ...props }: React__default.HTMLAttributes<HTMLTableCellElement>) => React__default.JSX.Element;
119
+ td: ({ className, ...props }: React__default.HTMLAttributes<HTMLTableCellElement>) => React__default.JSX.Element;
120
+ caption: ({ className, ...props }: React__default.HTMLAttributes<HTMLTableCaptionElement>) => React__default.JSX.Element;
121
+ img: typeof MdxImage;
122
+ details: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
123
+ className: string;
124
+ }, string | React__default.JSXElementConstructor<any>>;
125
+ summary: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
126
+ className: string;
127
+ }, string | React__default.JSXElementConstructor<any>>;
128
+ mark: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
129
+ className: string;
130
+ }, string | React__default.JSXElementConstructor<any>>;
131
+ del: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
132
+ className: string;
133
+ }, string | React__default.JSXElementConstructor<any>>;
134
+ ins: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
135
+ className: string;
136
+ }, string | React__default.JSXElementConstructor<any>>;
137
+ sub: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
138
+ className: string;
139
+ }, string | React__default.JSXElementConstructor<any>>;
140
+ sup: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
141
+ className: string;
142
+ }, string | React__default.JSXElementConstructor<any>>;
143
+ abbr: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
144
+ className: string;
145
+ }, string | React__default.JSXElementConstructor<any>>;
146
+ cite: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
147
+ className: string;
148
+ }, string | React__default.JSXElementConstructor<any>>;
149
+ dfn: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
150
+ className: string;
151
+ }, string | React__default.JSXElementConstructor<any>>;
152
+ time: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
153
+ className: string;
154
+ }, string | React__default.JSXElementConstructor<any>>;
155
+ var: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
156
+ className: string;
157
+ }, string | React__default.JSXElementConstructor<any>>;
158
+ samp: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
159
+ className: string;
160
+ }, string | React__default.JSXElementConstructor<any>>;
161
+ output: ({ className, ...props }: React__default.HTMLAttributes<HTMLElement>) => React__default.ReactElement<Omit<React__default.HTMLAttributes<HTMLElement>, "className"> & {
162
+ className: string;
163
+ }, string | React__default.JSXElementConstructor<any>>;
164
+ iframe: ({ className, ...props }: React__default.IframeHTMLAttributes<HTMLIFrameElement>) => React__default.ReactElement<Omit<React__default.IframeHTMLAttributes<HTMLIFrameElement>, "className"> & {
165
+ className: string;
166
+ }, string | React__default.JSXElementConstructor<any>>;
167
+ video: ({ className, ...props }: React__default.VideoHTMLAttributes<HTMLVideoElement>) => React__default.ReactElement<Omit<React__default.VideoHTMLAttributes<HTMLVideoElement>, "className"> & {
168
+ className: string;
169
+ }, string | React__default.JSXElementConstructor<any>>;
170
+ audio: ({ className, ...props }: React__default.AudioHTMLAttributes<HTMLAudioElement>) => React__default.ReactElement<Omit<React__default.AudioHTMLAttributes<HTMLAudioElement>, "className"> & {
171
+ className: string;
172
+ }, string | React__default.JSXElementConstructor<any>>;
173
+ };
174
+
175
+ type MdxProviderVariant = 'article' | 'docs' | 'narrow';
176
+ type MdxComponentsMap = NonNullable<Parameters<typeof MDXProvider>[0]['components']>;
177
+ type MDXContentProviderProps = {
178
+ children: ReactNode;
179
+ className?: string;
180
+ components?: MdxComponentsMap;
181
+ variant?: MdxProviderVariant;
182
+ };
183
+ declare function MDXContentProvider({ children, className, components, variant, }: MDXContentProviderProps): React.JSX.Element;
184
+
185
+ export { ExampleContext as E, type MdxComponentsMap as M, type MDXContentProviderProps as a, type MdxProviderVariant as b, blockMdxComponents as c, useMdxStyle as d, MDXContentProvider as e, hasSkipClass as h, mdxComponents as m, useIsInsideExample as u };
@@ -0,0 +1,66 @@
1
+ import * as React$1 from 'react';
2
+
3
+ declare function getImageDimensions(aspectRatio?: string, defaultWidth?: number): {
4
+ width: number;
5
+ height: number;
6
+ };
7
+ declare function loadImageDimensions(src: string): Promise<{
8
+ width: number;
9
+ height: number;
10
+ }>;
11
+ declare function getRealImageDimensions(src: string, aspectRatio?: string): Promise<{
12
+ width: number;
13
+ height: number;
14
+ }>;
15
+
16
+ type PhotoSwipeImageData = {
17
+ alt?: string;
18
+ caption?: string;
19
+ height: number;
20
+ src: string;
21
+ width: number;
22
+ };
23
+
24
+ /**
25
+ * @deprecated Prefer `FigureLightboxHost` + `FigureLightboxTrigger`. Kept for external consumers.
26
+ *
27
+ * Migration: (1) mount `FigureLightboxHost` once at the app root; (2) replace each
28
+ * `PhotoSwipeImage` with a `FigureLightboxTrigger` (button semantics + connected gallery);
29
+ * (3) let `FigureLightboxHost` collect the triggers and open the gallery
30
+ * (no per-component state). Preserve existing aspect-ratio logic when porting
31
+ * image grids. Tracked in issue #236.
32
+ */
33
+ type PhotoSwipeGalleryProps = {
34
+ children: React.ReactNode;
35
+ className?: string;
36
+ galleryId?: string;
37
+ /** Unused — images are read from trigger data attributes at click time. */
38
+ images?: PhotoSwipeImageData[];
39
+ };
40
+ /**
41
+ * Layout wrapper for legacy media blocks. Click handling is delegated to FigureLightboxHost.
42
+ */
43
+ declare function PhotoSwipeGallery({ children, className, galleryId, images: _images, }: PhotoSwipeGalleryProps): React$1.JSX.Element;
44
+ /** @deprecated Prefer FigureLightboxTrigger. */
45
+ type PhotoSwipeImageProps = {
46
+ alt: string;
47
+ caption?: string;
48
+ children?: React.ReactNode;
49
+ className?: string;
50
+ galleryId?: string;
51
+ height?: number;
52
+ index: number;
53
+ noCursor?: boolean;
54
+ src: string;
55
+ width?: number;
56
+ };
57
+ /** @deprecated Prefer FigureLightboxTrigger. */
58
+ declare function PhotoSwipeImage({ src, alt, index: _index, width, height, caption, className, children, noCursor, galleryId, }: PhotoSwipeImageProps): React$1.JSX.Element;
59
+ /** @deprecated Mount FigureLightboxHost; it opens the gallery. */
60
+ declare function usePhotoSwipe(_images: PhotoSwipeImageData[]): {
61
+ openPhotoSwipe: () => void;
62
+ closePhotoSwipe: () => void;
63
+ photoSwipe: null;
64
+ };
65
+
66
+ export { type PhotoSwipeImageData as P, PhotoSwipeGallery as a, type PhotoSwipeGalleryProps as b, PhotoSwipeImage as c, type PhotoSwipeImageProps as d, getRealImageDimensions as e, getImageDimensions as g, loadImageDimensions as l, usePhotoSwipe as u };
@@ -0,0 +1,130 @@
1
+ import * as React from 'react';
2
+ import { ReactNode } from 'react';
3
+ export { F as FramedBlock, a as FramedBlockHeader, b as FramedBlockHeaderProps, c as FramedBlockProps, d as FramedBlockSpacing, e as MdxFrame, f as MdxFrameChrome, g as MdxFrameChromeProps, h as MdxFrameDescription, i as MdxFrameDescriptionProps, j as MdxFrameFooter, k as MdxFrameFooterProps, l as MdxFrameHeader, m as MdxFrameHeaderProps, n as MdxFrameHeadingProps, o as MdxFrameItemPanel, p as MdxFrameItemPanelProps, M as MdxFrameItemTone, q as MdxFramePanel, r as MdxFramePanelProps, s as MdxFrameProps, t as MdxFrameRootElement, u as MdxFrameSpacing, v as MdxFrameSurface, w as MdxFrameSurfaceProps, x as MdxFrameTitle, y as MdxFrameTitleProps, z as MdxFrameWidth, T as TechnicalFrame, A as TechnicalFrameProps } from '../framed-block-DM5LLxO7.js';
4
+ export { S as SlotComponent, c as createSlot, h as hasSlot, p as pickRest, a as pickSlot } from '../slots-BvPdUMdY.js';
5
+ import '@atom63/ui-react';
6
+
7
+ type AsideSide = 'left' | 'right';
8
+ type AsideProps = {
9
+ children: ReactNode;
10
+ className?: string;
11
+ side?: AsideSide;
12
+ };
13
+ declare function Aside({ children, className, side }: AsideProps): React.JSX.Element;
14
+
15
+ type BleedProps = {
16
+ children: ReactNode;
17
+ className?: string;
18
+ };
19
+ declare function Bleed({ children, className }: BleedProps): React.JSX.Element;
20
+
21
+ type LayoutGap = 'sm' | 'md' | 'lg';
22
+
23
+ type GridProps = {
24
+ children: ReactNode;
25
+ className?: string;
26
+ /** CSS grid-template-columns value, applied at the `md` breakpoint. */
27
+ cols?: string;
28
+ gap?: LayoutGap;
29
+ };
30
+ declare function Grid({ children, className, cols, gap }: GridProps): React.JSX.Element;
31
+
32
+ /**
33
+ * Motion tokens for the `motion` library (seconds). Mirrors the CSS custom
34
+ * properties in `@atom63/styles/tokens/motion` — keep the two in sync.
35
+ */
36
+ declare const motionDurations: {
37
+ readonly fast: 0.15;
38
+ readonly base: 0.3;
39
+ readonly slow: 0.6;
40
+ };
41
+ declare const motionEasings: {
42
+ readonly standard: readonly [0.2, 0, 0, 1];
43
+ readonly emphasized: readonly [0.3, 0, 0, 1];
44
+ };
45
+ type MotionSpeed = keyof typeof motionDurations;
46
+
47
+ type RevealProps = {
48
+ children: ReactNode;
49
+ className?: string;
50
+ /** Seconds to delay the entrance. */
51
+ delay?: number;
52
+ };
53
+ declare function getRevealMotionProps(reduced: boolean, delay?: number): {
54
+ initial: false;
55
+ whileInView?: undefined;
56
+ viewport?: undefined;
57
+ transition?: undefined;
58
+ } | {
59
+ initial: {
60
+ opacity: number;
61
+ y: number;
62
+ };
63
+ whileInView: {
64
+ opacity: number;
65
+ y: number;
66
+ };
67
+ viewport: {
68
+ once: boolean;
69
+ margin: string;
70
+ };
71
+ transition: {
72
+ duration: 0.3;
73
+ ease: readonly [0.2, 0, 0, 1];
74
+ delay: number;
75
+ };
76
+ };
77
+ declare function Reveal({ children, className, delay }: RevealProps): React.JSX.Element;
78
+
79
+ type SectionWidth = 'column' | 'wide' | 'bleed';
80
+ type SectionProps = {
81
+ children: ReactNode;
82
+ className?: string;
83
+ width?: SectionWidth;
84
+ };
85
+ declare function Section({ children, className, width }: SectionProps): React.JSX.Element;
86
+
87
+ type StackProps = {
88
+ children: ReactNode;
89
+ className?: string;
90
+ gap?: LayoutGap;
91
+ };
92
+ declare function Stack({ children, className, gap }: StackProps): React.JSX.Element;
93
+
94
+ type StaggerProps = {
95
+ children: ReactNode;
96
+ className?: string;
97
+ };
98
+ declare function getStaggerVariants(reduced: boolean): {
99
+ container: {
100
+ hidden: {};
101
+ visible: {
102
+ transition: {
103
+ staggerChildren: number;
104
+ };
105
+ };
106
+ };
107
+ item: {
108
+ hidden: {
109
+ opacity: number;
110
+ y: number;
111
+ };
112
+ visible: {
113
+ opacity: number;
114
+ y: number;
115
+ transition: {
116
+ duration: 0.3;
117
+ ease: readonly [0.2, 0, 0, 1];
118
+ };
119
+ };
120
+ };
121
+ };
122
+ declare function Stagger({ children, className }: StaggerProps): React.JSX.Element;
123
+
124
+ /**
125
+ * The single reduced-motion gate for all engine motion. Wraps motion's hook
126
+ * so every primitive reads the preference from one place.
127
+ */
128
+ declare function useMdxReducedMotion(): boolean;
129
+
130
+ export { Aside, type AsideProps, type AsideSide, Bleed, type BleedProps, Grid, type GridProps, type LayoutGap, type MotionSpeed, Reveal, type RevealProps, Section, type SectionProps, type SectionWidth, Stack, type StackProps, Stagger, type StaggerProps, getRevealMotionProps, getStaggerVariants, motionDurations, motionEasings, useMdxReducedMotion };
@@ -0,0 +1,132 @@
1
+ import { motionEasings, motionDurations, useMdxReducedMotion } from '../chunk-WZ6US342.js';
2
+ export { FramedBlock, FramedBlockHeader, MdxFrame, MdxFrameChrome, MdxFrameDescription, MdxFrameFooter, MdxFrameHeader, MdxFrameItemPanel, MdxFramePanel, MdxFrameSurface, MdxFrameTitle, TechnicalFrame, createSlot, hasSlot, motionDurations, motionEasings, pickRest, pickSlot, useMdxReducedMotion } from '../chunk-WZ6US342.js';
3
+ import '../chunk-FVCE4FER.js';
4
+ import { clsx } from 'clsx';
5
+ import { jsx } from 'react/jsx-runtime';
6
+ import { motion } from 'motion/react';
7
+ import { Children, isValidElement } from 'react';
8
+
9
+ var sideStyles = {
10
+ right: "xl:float-right xl:clear-right xl:-me-64 xl:ms-8 xl:w-56",
11
+ left: "xl:float-left xl:clear-left xl:-ms-64 xl:me-8 xl:w-56"
12
+ };
13
+ function Aside({ children, className, side = "right" }) {
14
+ return /* @__PURE__ */ jsx(
15
+ "aside",
16
+ {
17
+ "data-aside-side": side,
18
+ className: clsx(
19
+ "text-muted-foreground my-4 text-sm leading-relaxed",
20
+ sideStyles[side],
21
+ className
22
+ ),
23
+ children
24
+ }
25
+ );
26
+ }
27
+ function Bleed({ children, className }) {
28
+ return /* @__PURE__ */ jsx(
29
+ "div",
30
+ {
31
+ "data-bleed": "",
32
+ className: clsx("relative left-1/2 w-screen max-w-[100vw] -translate-x-1/2", className),
33
+ children
34
+ }
35
+ );
36
+ }
37
+
38
+ // src/primitives/layout-tokens.ts
39
+ var gapClass = {
40
+ sm: "gap-3",
41
+ md: "gap-6",
42
+ lg: "gap-10"
43
+ };
44
+ function Grid({ children, className, cols = "1fr 1fr", gap = "md" }) {
45
+ return /* @__PURE__ */ jsx(
46
+ "div",
47
+ {
48
+ "data-grid": "",
49
+ style: { "--mdx-grid-cols": cols },
50
+ className: clsx(
51
+ "grid grid-cols-1",
52
+ gapClass[gap],
53
+ "md:[grid-template-columns:var(--mdx-grid-cols)]",
54
+ className
55
+ ),
56
+ children
57
+ }
58
+ );
59
+ }
60
+ function getRevealMotionProps(reduced, delay = 0) {
61
+ if (reduced) {
62
+ return { initial: false };
63
+ }
64
+ return {
65
+ initial: { opacity: 0, y: 12 },
66
+ whileInView: { opacity: 1, y: 0 },
67
+ viewport: { once: true, margin: "0px 0px -10% 0px" },
68
+ transition: { duration: motionDurations.base, ease: motionEasings.standard, delay }
69
+ };
70
+ }
71
+ function Reveal({ children, className, delay }) {
72
+ const reduced = useMdxReducedMotion();
73
+ return /* @__PURE__ */ jsx(motion.div, { className, ...getRevealMotionProps(reduced, delay), children });
74
+ }
75
+ var widthStyles = {
76
+ column: "mx-auto w-full max-w-[var(--mdx-measure,42rem)]",
77
+ wide: "mx-auto w-full max-w-[var(--mdx-measure-wide,72rem)]",
78
+ bleed: "w-full max-w-none"
79
+ };
80
+ function Section({ children, className, width = "column" }) {
81
+ return /* @__PURE__ */ jsx(
82
+ "section",
83
+ {
84
+ className: clsx(widthStyles[width], className),
85
+ "data-mdx-width": width,
86
+ "data-section-width": width,
87
+ children
88
+ }
89
+ );
90
+ }
91
+ function Stack({ children, className, gap = "md" }) {
92
+ return /* @__PURE__ */ jsx("div", { "data-stack-gap": gap, className: clsx("flex flex-col", gapClass[gap], className), children });
93
+ }
94
+ function getStaggerVariants(reduced) {
95
+ const hidden = reduced ? { opacity: 1, y: 0 } : { opacity: 0, y: 10 };
96
+ return {
97
+ container: {
98
+ hidden: {},
99
+ visible: { transition: { staggerChildren: reduced ? 0 : 0.08 } }
100
+ },
101
+ item: {
102
+ hidden,
103
+ visible: {
104
+ opacity: 1,
105
+ y: 0,
106
+ transition: { duration: motionDurations.base, ease: motionEasings.standard }
107
+ }
108
+ }
109
+ };
110
+ }
111
+ function Stagger({ children, className }) {
112
+ const reduced = useMdxReducedMotion();
113
+ const variants = getStaggerVariants(reduced);
114
+ return /* @__PURE__ */ jsx(
115
+ motion.div,
116
+ {
117
+ className,
118
+ variants: variants.container,
119
+ initial: "hidden",
120
+ whileInView: "visible",
121
+ viewport: { once: true, margin: "0px 0px -10% 0px" },
122
+ children: Children.map(
123
+ children,
124
+ (child) => isValidElement(child) ? /* @__PURE__ */ jsx(motion.div, { variants: variants.item, children: child }) : child
125
+ )
126
+ }
127
+ );
128
+ }
129
+
130
+ export { Aside, Bleed, Grid, Reveal, Section, Stack, Stagger, getRevealMotionProps, getStaggerVariants };
131
+ //# sourceMappingURL=index.js.map
132
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/primitives/aside/aside.tsx","../../src/primitives/bleed/bleed.tsx","../../src/primitives/layout-tokens.ts","../../src/primitives/grid/grid.tsx","../../src/primitives/reveal/reveal.tsx","../../src/primitives/section/section.tsx","../../src/primitives/stack/stack.tsx","../../src/primitives/stagger/stagger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AAA,KAAA,KACtB,cAAA,CAAe,KAAK,CAAA,mBAAIF,GAAAA,CAACE,MAAAA,CAAO,GAAA,EAAP,EAAW,QAAA,EAAU,QAAA,CAAS,IAAA,EAAO,iBAAM,CAAA,GAAgB;AAAA;AACtF;AAAA,GACF;AAEJ","file":"index.js","sourcesContent":["import { clsx } from 'clsx'\nimport type { ReactNode } from 'react'\n\nexport type AsideSide = 'left' | 'right'\n\nexport type AsideProps = {\n children: ReactNode\n className?: string\n side?: AsideSide\n}\n\nconst sideStyles: Record<AsideSide, string> = {\n right: 'xl:float-right xl:clear-right xl:-me-64 xl:ms-8 xl:w-56',\n left: 'xl:float-left xl:clear-left xl:-ms-64 xl:me-8 xl:w-56',\n}\n\nexport function Aside({ children, className, side = 'right' }: AsideProps) {\n return (\n <aside\n data-aside-side={side}\n className={clsx(\n 'text-muted-foreground my-4 text-sm leading-relaxed',\n sideStyles[side],\n className\n )}\n >\n {children}\n </aside>\n )\n}\n","import { clsx } from 'clsx'\nimport type { ReactNode } from 'react'\n\nexport type BleedProps = {\n children: ReactNode\n className?: string\n}\n\nexport function Bleed({ children, className }: BleedProps) {\n return (\n <div\n data-bleed=\"\"\n className={clsx('relative left-1/2 w-screen max-w-[100vw] -translate-x-1/2', className)}\n >\n {children}\n </div>\n )\n}\n","export type LayoutGap = 'sm' | 'md' | 'lg'\n\nexport const gapClass: Record<LayoutGap, string> = {\n sm: 'gap-3',\n md: 'gap-6',\n lg: 'gap-10',\n}\n","import { clsx } from 'clsx'\nimport type { CSSProperties, ReactNode } from 'react'\nimport { gapClass, type LayoutGap } from '../layout-tokens'\n\nexport type GridProps = {\n children: ReactNode\n className?: string\n /** CSS grid-template-columns value, applied at the `md` breakpoint. */\n cols?: string\n gap?: LayoutGap\n}\n\nexport function Grid({ children, className, cols = '1fr 1fr', gap = 'md' }: GridProps) {\n return (\n <div\n data-grid=\"\"\n style={{ '--mdx-grid-cols': cols } as CSSProperties}\n className={clsx(\n 'grid grid-cols-1',\n gapClass[gap],\n 'md:[grid-template-columns:var(--mdx-grid-cols)]',\n className\n )}\n >\n {children}\n </div>\n )\n}\n","import { motion } from 'motion/react'\nimport type { ReactNode } from 'react'\nimport { motionDurations, motionEasings } from '../motion-tokens'\nimport { useMdxReducedMotion } from '../use-reduced-motion'\n\nexport type RevealProps = {\n children: ReactNode\n className?: string\n /** Seconds to delay the entrance. */\n delay?: number\n}\n\nexport function getRevealMotionProps(reduced: boolean, delay = 0) {\n if (reduced) {\n return { initial: false as const }\n }\n return {\n initial: { opacity: 0, y: 12 },\n whileInView: { opacity: 1, y: 0 },\n viewport: { once: true, margin: '0px 0px -10% 0px' },\n transition: { duration: motionDurations.base, ease: motionEasings.standard, delay },\n }\n}\n\nexport function Reveal({ children, className, delay }: RevealProps) {\n const reduced = useMdxReducedMotion()\n return (\n <motion.div className={className} {...getRevealMotionProps(reduced, delay)}>\n {children}\n </motion.div>\n )\n}\n","import { clsx } from 'clsx'\nimport type { ReactNode } from 'react'\n\nexport type SectionWidth = 'column' | 'wide' | 'bleed'\n\nexport type SectionProps = {\n children: ReactNode\n className?: string\n width?: SectionWidth\n}\n\nconst widthStyles: Record<SectionWidth, string> = {\n column: 'mx-auto w-full max-w-[var(--mdx-measure,42rem)]',\n wide: 'mx-auto w-full max-w-[var(--mdx-measure-wide,72rem)]',\n bleed: 'w-full max-w-none',\n}\n\nexport function Section({ children, className, width = 'column' }: SectionProps) {\n return (\n <section\n className={clsx(widthStyles[width], className)}\n data-mdx-width={width}\n data-section-width={width}\n >\n {children}\n </section>\n )\n}\n","import { clsx } from 'clsx'\nimport type { ReactNode } from 'react'\nimport { gapClass, type LayoutGap } from '../layout-tokens'\n\nexport type StackProps = {\n children: ReactNode\n className?: string\n gap?: LayoutGap\n}\n\nexport function Stack({ children, className, gap = 'md' }: StackProps) {\n return (\n <div data-stack-gap={gap} className={clsx('flex flex-col', gapClass[gap], className)}>\n {children}\n </div>\n )\n}\n","import { motion } from 'motion/react'\nimport { Children, isValidElement, type ReactNode } from 'react'\nimport { motionDurations, motionEasings } from '../motion-tokens'\nimport { useMdxReducedMotion } from '../use-reduced-motion'\n\nexport type StaggerProps = {\n children: ReactNode\n className?: string\n}\n\nexport function getStaggerVariants(reduced: boolean) {\n const hidden = reduced ? { opacity: 1, y: 0 } : { opacity: 0, y: 10 }\n return {\n container: {\n hidden: {},\n visible: { transition: { staggerChildren: reduced ? 0 : 0.08 } },\n },\n item: {\n hidden,\n visible: {\n opacity: 1,\n y: 0,\n transition: { duration: motionDurations.base, ease: motionEasings.standard },\n },\n },\n }\n}\n\nexport function Stagger({ children, className }: StaggerProps) {\n const reduced = useMdxReducedMotion()\n const variants = getStaggerVariants(reduced)\n return (\n <motion.div\n className={className}\n variants={variants.container}\n initial=\"hidden\"\n whileInView=\"visible\"\n viewport={{ once: true, margin: '0px 0px -10% 0px' }}\n >\n {Children.map(children, child =>\n isValidElement(child) ? <motion.div variants={variants.item}>{child}</motion.div> : child\n )}\n </motion.div>\n )\n}\n"]}
@@ -0,0 +1,39 @@
1
+ import { ComponentType } from 'react';
2
+ import { HighlighterCore } from 'shiki/core';
3
+
4
+ type MdxComponent = ComponentType<{
5
+ components?: Record<string, unknown>;
6
+ }>;
7
+ /**
8
+ * Compile an MDX string to a React component at runtime. Lazy-loads the MDX
9
+ * compiler so it never enters the base bundle. The returned component renders
10
+ * inside an `<MDXProvider>` (or accepts a `components` prop) for scope.
11
+ */
12
+ declare function compileMdx(source: string): Promise<MdxComponent>;
13
+ interface MdxRuntimeResult {
14
+ Component: MdxComponent | null;
15
+ error: Error | null;
16
+ status: 'idle' | 'compiling' | 'ready' | 'error';
17
+ }
18
+ /**
19
+ * Debounced runtime compile of an MDX string. Keeps the last successfully
20
+ * compiled component while compiling and on error, so a transient typo never
21
+ * blanks the preview.
22
+ */
23
+ declare function useMdxRuntime(source: string, debounceMs?: number): MdxRuntimeResult;
24
+
25
+ declare function normalizeCodeLanguage(lang?: string): string | undefined;
26
+ type ShikiHighlightResult = {
27
+ error: Error | null;
28
+ html: string | null;
29
+ isLoading: boolean;
30
+ language: string | undefined;
31
+ };
32
+ declare function useShikiHighlightResult(code: string, lang?: string): ShikiHighlightResult;
33
+ declare function useShikiHighlight(code: string, lang?: string): string | null;
34
+ /** Trigger (or await) the shared shiki highlighter load. */
35
+ declare function loadHighlighter(): Promise<HighlighterCore>;
36
+ /** The loaded highlighter instance, or null if it hasn't finished loading. */
37
+ declare function getLoadedHighlighter(): HighlighterCore | null;
38
+
39
+ export { type MdxComponent, type MdxRuntimeResult, type ShikiHighlightResult, compileMdx, getLoadedHighlighter, loadHighlighter, normalizeCodeLanguage, useMdxRuntime, useShikiHighlight, useShikiHighlightResult };
@@ -0,0 +1,4 @@
1
+ export { compileMdx, useMdxRuntime } from '../chunk-EPSRYU5X.js';
2
+ export { getLoadedHighlighter, loadHighlighter, normalizeCodeLanguage, useShikiHighlight, useShikiHighlightResult } from '../chunk-A3NG5VKX.js';
3
+ //# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}