@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.
- package/API.md +47 -0
- package/CONTRIBUTING.md +58 -0
- package/LICENSE +21 -0
- package/README.md +190 -0
- package/dist/article/index.d.ts +32 -0
- package/dist/article/index.js +38 -0
- package/dist/article/index.js.map +1 -0
- package/dist/blocks/credits-block-entry.d.ts +14 -0
- package/dist/blocks/credits-block-entry.js +4 -0
- package/dist/blocks/credits-block-entry.js.map +1 -0
- package/dist/blocks/index.d.ts +175 -0
- package/dist/blocks/index.js +9 -0
- package/dist/blocks/index.js.map +1 -0
- package/dist/blocks/media-caption-entry.d.ts +11 -0
- package/dist/blocks/media-caption-entry.js +4 -0
- package/dist/blocks/media-caption-entry.js.map +1 -0
- package/dist/chunk-2RCEDZBB.js +11 -0
- package/dist/chunk-2RCEDZBB.js.map +1 -0
- package/dist/chunk-34B2U2Y2.js +59 -0
- package/dist/chunk-34B2U2Y2.js.map +1 -0
- package/dist/chunk-A3NG5VKX.js +169 -0
- package/dist/chunk-A3NG5VKX.js.map +1 -0
- package/dist/chunk-CSXZ2XEN.js +479 -0
- package/dist/chunk-CSXZ2XEN.js.map +1 -0
- package/dist/chunk-DJSENA7Q.js +63 -0
- package/dist/chunk-DJSENA7Q.js.map +1 -0
- package/dist/chunk-EIY6ZR6T.js +2471 -0
- package/dist/chunk-EIY6ZR6T.js.map +1 -0
- package/dist/chunk-EPSRYU5X.js +61 -0
- package/dist/chunk-EPSRYU5X.js.map +1 -0
- package/dist/chunk-FVCE4FER.js +132 -0
- package/dist/chunk-FVCE4FER.js.map +1 -0
- package/dist/chunk-IART7J2U.js +101 -0
- package/dist/chunk-IART7J2U.js.map +1 -0
- package/dist/chunk-OUEW54AC.js +144 -0
- package/dist/chunk-OUEW54AC.js.map +1 -0
- package/dist/chunk-WZ6US342.js +231 -0
- package/dist/chunk-WZ6US342.js.map +1 -0
- package/dist/constants-CuaBcwMe.d.ts +4 -0
- package/dist/editor/index.d.ts +47 -0
- package/dist/editor/index.js +118 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/framed-block-DM5LLxO7.d.ts +87 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/lightbox/index.d.ts +44 -0
- package/dist/lightbox/index.js +5 -0
- package/dist/lightbox/index.js.map +1 -0
- package/dist/mdx-provider-6gOypsy5.d.ts +185 -0
- package/dist/photo-swipe-CwzAHpP-.d.ts +66 -0
- package/dist/primitives/index.d.ts +130 -0
- package/dist/primitives/index.js +132 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/runtime/index.d.ts +39 -0
- package/dist/runtime/index.js +4 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/slots-BvPdUMdY.d.ts +23 -0
- package/dist/video-block-C0a5Yx9x.d.ts +468 -0
- package/package.json +139 -0
- package/src/blocks/callout/callout.css +37 -0
- package/src/blocks/code-block/code-block.css +40 -0
- package/src/blocks/color-swatch-item/color-swatch-item.css +36 -0
- package/src/blocks/compare/compare.css +14 -0
- package/src/blocks/comparison-pair/comparison-pair.css +27 -0
- package/src/blocks/credits-block/credits-block.css +16 -0
- package/src/blocks/demo-stage/demo-stage.css +50 -0
- package/src/blocks/doc-example/doc-example.css +44 -0
- package/src/blocks/image-compare/image-compare.css +45 -0
- package/src/blocks/layer-stack/layer-stack.css +28 -0
- package/src/blocks/media-placeholder/media-placeholder.css +11 -0
- package/src/blocks/mermaid-diagram/mermaid-diagram.css +52 -0
- package/src/blocks/page-meta/page-meta.css +7 -0
- package/src/blocks/page-table-of-contents/page-table-of-contents.css +73 -0
- package/src/blocks/resource-list/resource-list.css +138 -0
- package/src/blocks/scroll-stage/scroll-stage.css +12 -0
- package/src/blocks/stat-card/stat-card.css +18 -0
- package/src/blocks/steps/steps.css +20 -0
- package/src/blocks/timeline/timeline.css +12 -0
- package/src/blocks/video-block/video-block.css +11 -0
- package/src/primitives/motion-tokens.css +16 -0
- package/src/styles/a63.css +13 -0
- package/src/styles/base.css +362 -0
- package/src/styles/block-recipes.css +21 -0
- package/src/styles/consumer.css +7 -0
- package/src/styles/index.css +12 -0
- package/src/styles/mdx-blocks.css +9 -0
- package/src/styles/shadcn.css +12 -0
package/API.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# @atom63/mdx Public API
|
|
2
|
+
|
|
3
|
+
This file is the source-level snapshot of the package contract. If an export is
|
|
4
|
+
added, removed, or reclassified, update this file in the same change.
|
|
5
|
+
|
|
6
|
+
## Stable Runtime Imports
|
|
7
|
+
|
|
8
|
+
| Import | Purpose |
|
|
9
|
+
|--------|---------|
|
|
10
|
+
| `@atom63/mdx` | Core prose provider, docs provider, and component maps |
|
|
11
|
+
| `@atom63/mdx/blocks` | Portable MDX block registry |
|
|
12
|
+
| `@atom63/mdx/blocks/credits-block` | Lightweight credits block import |
|
|
13
|
+
| `@atom63/mdx/blocks/media-caption` | Lightweight media caption import |
|
|
14
|
+
| `@atom63/mdx/article` | Article provider, component-map extension helper, article spacing helpers |
|
|
15
|
+
| `@atom63/mdx/editor` | Source editor, source view, and live preview components |
|
|
16
|
+
| `@atom63/mdx/lightbox` | Figure lightbox host, triggers and helpers, built on `MediaLightbox` from `@atom63/ui-react` |
|
|
17
|
+
| `@atom63/mdx/runtime` | Runtime MDX compiler hook and Shiki highlight helpers |
|
|
18
|
+
|
|
19
|
+
## Experimental Runtime Imports
|
|
20
|
+
|
|
21
|
+
| Import | Purpose |
|
|
22
|
+
|--------|---------|
|
|
23
|
+
| `@atom63/mdx/primitives` | Low-level layout, frame, motion, and slot authoring primitives |
|
|
24
|
+
|
|
25
|
+
## Stylesheet Imports
|
|
26
|
+
|
|
27
|
+
| Import | Purpose |
|
|
28
|
+
|--------|---------|
|
|
29
|
+
| `@atom63/mdx/styles/index.css` | Full raw stylesheet entry; expects canonical `--a63-*` variables and includes the Tailwind source scan |
|
|
30
|
+
| `@atom63/mdx/styles/a63.css` | Recommended Atom63 app stylesheet adapter; expects `@atom63/styles` and includes the MDX motion bridge |
|
|
31
|
+
| `@atom63/mdx/styles/shadcn.css` | External shadcn-token app adapter; derives canonical `--a63-*` variables from shadcn variables |
|
|
32
|
+
| `@atom63/mdx/styles/consumer.css` | Backward-compatible alias for `@atom63/mdx/styles/index.css` |
|
|
33
|
+
| `@atom63/mdx/styles/mdx-blocks.css` | Block CSS without the consumer Tailwind scan |
|
|
34
|
+
|
|
35
|
+
## Private Implementation
|
|
36
|
+
|
|
37
|
+
The following are not public API:
|
|
38
|
+
|
|
39
|
+
- `src/foundations/**`
|
|
40
|
+
- `src/test/**`
|
|
41
|
+
- `src/**/*.test.ts`
|
|
42
|
+
- `src/**/*.test.tsx`
|
|
43
|
+
- `src/**/*.stories.tsx`
|
|
44
|
+
- Any generated chunk filename under `dist/chunk-*.js`
|
|
45
|
+
|
|
46
|
+
Consumers should import only through the package export map. Published package
|
|
47
|
+
code is dist-only; source files are repository implementation detail.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Contributing to @atom63/mdx
|
|
2
|
+
|
|
3
|
+
This package owns reusable MDX prose, article providers, portable content blocks,
|
|
4
|
+
runtime preview helpers, and their CSS entrypoints.
|
|
5
|
+
|
|
6
|
+
## Public API rules
|
|
7
|
+
|
|
8
|
+
- Treat every package export in `package.json` as public.
|
|
9
|
+
- Add new public React blocks through a documented subpath or the `@atom63/mdx/blocks`
|
|
10
|
+
barrel only when consumers should rely on it.
|
|
11
|
+
- Keep shared implementation foundations in `src/foundations/**`; do not import them
|
|
12
|
+
from apps.
|
|
13
|
+
- Runtime/editor-only helpers belong in `@atom63/mdx/runtime` or `@atom63/mdx/editor`,
|
|
14
|
+
not the root entry.
|
|
15
|
+
- Update `README.md` and the root `USAGE.md` when adding or removing public exports.
|
|
16
|
+
|
|
17
|
+
## Source layout
|
|
18
|
+
|
|
19
|
+
- `src/blocks/**` contains public MDX block components.
|
|
20
|
+
- `src/article/**` contains article provider helpers.
|
|
21
|
+
- `src/editor/**` contains editor/live-preview entrypoints.
|
|
22
|
+
- `src/runtime/**` contains runtime compile/highlight entrypoints.
|
|
23
|
+
- `src/primitives/**` contains public low-level authoring primitives exported from
|
|
24
|
+
`@atom63/mdx/primitives`.
|
|
25
|
+
- `src/foundations/**` contains private intent foundations shared by blocks.
|
|
26
|
+
- `src/styles/**`, `src/blocks/**/*.css`, and `src/primitives/**/*.css` are copied
|
|
27
|
+
into `dist` by `scripts/copy-css.mjs` during build.
|
|
28
|
+
|
|
29
|
+
Stories and package tests stay in source for local development, but the published
|
|
30
|
+
tarball is dist-only.
|
|
31
|
+
|
|
32
|
+
## Component standards
|
|
33
|
+
|
|
34
|
+
- Choose components by author intent first: notice, takeaway, comparison, media,
|
|
35
|
+
example, or sequence.
|
|
36
|
+
- Prefer existing internal foundations before adding a new block-specific layout.
|
|
37
|
+
- Keep public props typed without `any`; prefer semantic HTML and keyboard behavior.
|
|
38
|
+
- Videos must have captions unless they are explicitly decorative.
|
|
39
|
+
- Motion must honor `prefers-reduced-motion`.
|
|
40
|
+
|
|
41
|
+
## Validation
|
|
42
|
+
|
|
43
|
+
Run the smallest checks that cover your change:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pnpm --filter @atom63/mdx build
|
|
47
|
+
pnpm --filter @atom63/mdx test
|
|
48
|
+
pnpm --filter @atom63/mdx typecheck
|
|
49
|
+
pnpm --filter @atom63/mdx lint
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For release preparation, also run:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm pack --dry-run --json --workspace packages/mdx
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
If lint warning count decreases, lower the package `--max-warnings` budget.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 You Zhang (ATOM63)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# @atom63/mdx
|
|
2
|
+
|
|
3
|
+
Single source of truth for MDX documentation and article content across atom63 apps.
|
|
4
|
+
|
|
5
|
+
## Public contract
|
|
6
|
+
|
|
7
|
+
Published package contents are dist-only. Runtime code, declaration files, and CSS
|
|
8
|
+
assets are emitted under `dist/`; `src/foundations/**`, tests, stories, and authoring
|
|
9
|
+
fixtures are repository-only implementation detail.
|
|
10
|
+
|
|
11
|
+
See `API.md` for the maintained public export snapshot.
|
|
12
|
+
|
|
13
|
+
Public import paths:
|
|
14
|
+
|
|
15
|
+
| Subpath | Stability | Use |
|
|
16
|
+
|---------|-----------|-----|
|
|
17
|
+
| `@atom63/mdx` | Stable | Core prose provider and default component maps |
|
|
18
|
+
| `@atom63/mdx/blocks` | Stable | Portable block component registry |
|
|
19
|
+
| `@atom63/mdx/blocks/credits-block` | Stable | Lightweight credits-only import |
|
|
20
|
+
| `@atom63/mdx/blocks/media-caption` | Stable | Lightweight caption-only import |
|
|
21
|
+
| `@atom63/mdx/article` | Stable | Article provider and app extension helpers |
|
|
22
|
+
| `@atom63/mdx/editor` | Stable | Source editor and live preview surfaces |
|
|
23
|
+
| `@atom63/mdx/runtime` | Stable | Runtime MDX compilation and Shiki helpers |
|
|
24
|
+
| `@atom63/mdx/lightbox` | Stable | Figure lightbox integration |
|
|
25
|
+
| `@atom63/mdx/primitives` | Experimental | Low-level layout, frame, motion, and slot authoring primitives |
|
|
26
|
+
| `@atom63/mdx/styles/index.css` | Stable | Full raw stylesheet entry for hosts that already provide `--a63-*` |
|
|
27
|
+
| `@atom63/mdx/styles/a63.css` | Stable | Atom63 app stylesheet adapter |
|
|
28
|
+
| `@atom63/mdx/styles/shadcn.css` | Stable | shadcn-token stylesheet adapter |
|
|
29
|
+
| `@atom63/mdx/styles/consumer.css` | Stable | Backward-compatible alias for `styles/index.css` |
|
|
30
|
+
| `@atom63/mdx/styles/mdx-blocks.css` | Stable | Block CSS without the consumer Tailwind scan |
|
|
31
|
+
|
|
32
|
+
Anything under `src/foundations/**` is private and can change without a release note.
|
|
33
|
+
|
|
34
|
+
## Package layout
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
@atom63/mdx Core prose, MDXContentProvider, DocsMDXContentProvider
|
|
38
|
+
@atom63/mdx/blocks Callout, ColorSwatchItem, CreditsBlock, FigureBlock, VideoBlock, MediaCaption, ExampleContainer
|
|
39
|
+
@atom63/mdx/article ArticleMDXContentProvider, createMdxComponents(), mediaSpacingStyles
|
|
40
|
+
@atom63/mdx/editor MdxLivePreview, MdxSourceEditor, MdxSourceView
|
|
41
|
+
@atom63/mdx/runtime Runtime MDX compile hooks and Shiki helpers
|
|
42
|
+
@atom63/mdx/primitives Experimental layout, frame, motion, and slot authoring primitives
|
|
43
|
+
@atom63/mdx/styles/index.css Full raw stylesheet entry + Tailwind scan
|
|
44
|
+
@atom63/mdx/styles/a63.css Atom63 app adapter (prefer this in Atom63 apps)
|
|
45
|
+
@atom63/mdx/styles/shadcn.css External shadcn-token adapter
|
|
46
|
+
@atom63/mdx/styles/consumer.css Back-compat alias for styles/index.css
|
|
47
|
+
@atom63/mdx/styles/mdx-blocks.css Block recipes without the consumer scan
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Stylesheet internals are split by responsibility:
|
|
51
|
+
|
|
52
|
+
- `a63.css` and `shadcn.css` are adapters.
|
|
53
|
+
- `index.css` is the raw runtime bundle with the package Tailwind `@source`.
|
|
54
|
+
- `consumer.css` is a backward-compatible alias for `index.css`.
|
|
55
|
+
- `mdx-blocks.css` is the no-scan public bundle.
|
|
56
|
+
- `base.css` and `block-recipes.css` are private implementation imports copied to
|
|
57
|
+
`dist` so the public CSS files resolve after publish.
|
|
58
|
+
|
|
59
|
+
## Provider variants
|
|
60
|
+
|
|
61
|
+
| Variant | Layout | Default preset |
|
|
62
|
+
|---------|--------|----------------|
|
|
63
|
+
| `article` | Full-width prose root | `MDXContentProvider` |
|
|
64
|
+
| `narrow` | Text `max-w-xl`, media full width | `ArticleMDXContentProvider` |
|
|
65
|
+
| `docs` | Doc rhythm + wider code | `DocsMDXContentProvider` |
|
|
66
|
+
|
|
67
|
+
Presets live in the package — apps re-export rather than hard-code defaults:
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
// apps/atom63.io/src/components/common/mdx/mdx-provider.tsx
|
|
71
|
+
export { ArticleMDXContentProvider as MDXContentProvider } from '@atom63/mdx/article'
|
|
72
|
+
|
|
73
|
+
// apps/docs/src/mdx/mdx-provider.tsx (atom63-design-system)
|
|
74
|
+
export { DocsMDXContentProvider as MDXContentProvider } from '@atom63/mdx'
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## App setup (Tailwind v4)
|
|
78
|
+
|
|
79
|
+
Atom63 apps should import the Atom63 adapter after `@atom63/styles`, Tailwind, and any shadcn bridge. It includes block CSS and `@source` for this package so `narrow` / `docs` variant classes compile:
|
|
80
|
+
|
|
81
|
+
```css
|
|
82
|
+
@import "tailwindcss";
|
|
83
|
+
@import "@atom63/styles";
|
|
84
|
+
@import "@atom63/styles/tailwind";
|
|
85
|
+
@import "@atom63/styles/compat/shadcn";
|
|
86
|
+
@import "@atom63/mdx/styles/a63.css";
|
|
87
|
+
@source "../../node_modules/@atom63/ui-react/dist/**/*.js"; /* your UI scan */
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Do **not** duplicate `@source` paths to `packages/mdx` in app CSS — the consumer owns that.
|
|
91
|
+
|
|
92
|
+
The figure lightbox is `MediaLightbox` from `@atom63/ui-react`, so the app also needs its recipe: `@atom63/ui-react/recipes.css` (or `@atom63/ui-react/recipes/media-lightbox.css` on its own).
|
|
93
|
+
|
|
94
|
+
The stylesheets ship from `src/` and scan both the TS/TSX source (workspace) and the emitted `dist/` JS (installed package).
|
|
95
|
+
That keeps linked local apps and installed consumers on the same CSS entrypoint.
|
|
96
|
+
|
|
97
|
+
External shadcn apps that do not load `@atom63/styles` can use
|
|
98
|
+
`@atom63/mdx/styles/shadcn.css` after their shadcn variables are defined. Hosts
|
|
99
|
+
that already provide canonical `--a63-*` tokens can import
|
|
100
|
+
`@atom63/mdx/styles/index.css`; `consumer.css` is kept as a compatibility alias.
|
|
101
|
+
|
|
102
|
+
## Article / portfolio MDX
|
|
103
|
+
|
|
104
|
+
```tsx
|
|
105
|
+
import { ArticleMDXContentProvider } from '@atom63/mdx/article'
|
|
106
|
+
import { createMdxComponents } from '@atom63/mdx/article'
|
|
107
|
+
|
|
108
|
+
const components = createMdxComponents({ MediaBlock, ImageBlock /* site media */ })
|
|
109
|
+
|
|
110
|
+
<ArticleMDXContentProvider components={components}>
|
|
111
|
+
<Article />
|
|
112
|
+
</ArticleMDXContentProvider>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Design-system MDX
|
|
116
|
+
|
|
117
|
+
```tsx
|
|
118
|
+
import { DocsMDXContentProvider, mdxComponents } from '@atom63/mdx'
|
|
119
|
+
|
|
120
|
+
<DocsMDXContentProvider components={{ ...mdxComponents, DocExample }}>
|
|
121
|
+
<Page />
|
|
122
|
+
</DocsMDXContentProvider>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Site-specific media (`MediaBlock`, carousels, Compare) stays in atom63.io — see `apps/atom63.io/src/content/work/project-mdx-components.tsx`.
|
|
126
|
+
|
|
127
|
+
## Block inventory
|
|
128
|
+
|
|
129
|
+
Registered on `mdxComponents` / `blockMdxComponents`:
|
|
130
|
+
|
|
131
|
+
| Component | Purpose |
|
|
132
|
+
|-----------|---------|
|
|
133
|
+
| `Callout` | Info, warning, error, success callouts |
|
|
134
|
+
| `ColorSwatchItem` | Token swatch with checkerboard preview |
|
|
135
|
+
| `CreditsBlock` | Collapsible project credits |
|
|
136
|
+
| `DemoStage` | Framed surface for live demos or centerpiece visuals |
|
|
137
|
+
| `ExampleContainer` | Live demo frame with dot grid |
|
|
138
|
+
| `FigureBlock` | Captioned image figure with a connected `MediaLightbox` gallery (default on) |
|
|
139
|
+
| `MediaCaption` | Centered figure caption |
|
|
140
|
+
| `VideoBlock` | Captioned or explicitly decorative video figure |
|
|
141
|
+
|
|
142
|
+
Article-only components (atom63.io): `MediaBlock`, `ImageBlock`, `ImageCarousel`, `ImageGrid`, `BeforeAfter`, `LinkCard`.
|
|
143
|
+
|
|
144
|
+
## Intent taxonomy
|
|
145
|
+
|
|
146
|
+
Choose blocks by author intent before visual shape:
|
|
147
|
+
|
|
148
|
+
| Intent | Component |
|
|
149
|
+
|--------|-----------|
|
|
150
|
+
| Reader notice, caveat, success state | `Callout` |
|
|
151
|
+
| One prominent takeaway | `KeyIdea` |
|
|
152
|
+
| Conceptual before/after or option comparison | `Compare` |
|
|
153
|
+
| Live/demo before-after comparison | `ComparisonPair` |
|
|
154
|
+
| Draggable media before-after comparison | `ImageCompare` |
|
|
155
|
+
| Captioned media figure | `FigureBlock`, `VideoBlock` |
|
|
156
|
+
| Centerpiece live demo or visual stage | `DemoStage` |
|
|
157
|
+
| Live demo surface | `ExampleContainer` |
|
|
158
|
+
| Reference demo with preview/code tabs | `DocExample` |
|
|
159
|
+
| Ordered sequence or dated history | `Steps`, `Timeline` |
|
|
160
|
+
|
|
161
|
+
## Dependency intent
|
|
162
|
+
|
|
163
|
+
The base provider and block registry are normal React UI, but several features lazy-load
|
|
164
|
+
heavier libraries behind narrower user actions:
|
|
165
|
+
|
|
166
|
+
| Dependency | Why it exists |
|
|
167
|
+
|------------|---------------|
|
|
168
|
+
| `@mdx-js/mdx` | Runtime compilation in `@atom63/mdx/runtime` and live preview |
|
|
169
|
+
| `react-simple-code-editor` | `@atom63/mdx/editor` source editing |
|
|
170
|
+
| `shiki` | Code block/source highlighting, loaded on demand |
|
|
171
|
+
| `react-compare-slider` | `ImageCompare` block |
|
|
172
|
+
| `beautiful-mermaid` | Mermaid diagram block |
|
|
173
|
+
|
|
174
|
+
Keep new runtime dependencies explicit in `dependencies`; keep only `react` and
|
|
175
|
+
`react-dom` as peers so consumers get one shared React copy.
|
|
176
|
+
|
|
177
|
+
## Release checks
|
|
178
|
+
|
|
179
|
+
Before publishing or preparing an open-source release:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
pnpm --filter @atom63/mdx build
|
|
183
|
+
pnpm --filter @atom63/mdx test
|
|
184
|
+
pnpm --filter @atom63/mdx typecheck
|
|
185
|
+
pnpm --filter @atom63/mdx lint
|
|
186
|
+
npm pack --dry-run --json --workspace packages/mdx
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
The package tests assert the public export map and packed file list so accidental
|
|
190
|
+
source/test/story publication fails locally.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { M as MdxComponentsMap, m as mdxComponents, a as MDXContentProviderProps } from '../mdx-provider-6gOypsy5.js';
|
|
2
|
+
export { b as MdxProviderVariant, c as blockMdxComponents, u as useIsInsideExample, d as useMdxStyle } from '../mdx-provider-6gOypsy5.js';
|
|
3
|
+
export { C as CalloutType, m as mdxStyles } from '../video-block-C0a5Yx9x.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import '../blocks/credits-block-entry.js';
|
|
6
|
+
import '../blocks/media-caption-entry.js';
|
|
7
|
+
import '@mdx-js/react';
|
|
8
|
+
import '../slots-BvPdUMdY.js';
|
|
9
|
+
import '@atom63/ui-react';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Merge core prose + block components with app-specific extensions.
|
|
13
|
+
* Later keys win (extensions override core).
|
|
14
|
+
*
|
|
15
|
+
* The result is deliberately NOT intersected with `Record<string, unknown>`.
|
|
16
|
+
* That widened every key's value type to `unknown`, and `unknown` is not a
|
|
17
|
+
* component, so the returned map was not assignable to MDXProvider's own
|
|
18
|
+
* `components` prop — every call site passing it to MDXContentProvider failed
|
|
19
|
+
* to typecheck. Constraining the extensions to the provider's map type instead
|
|
20
|
+
* keeps the merge open-ended while staying assignable.
|
|
21
|
+
*/
|
|
22
|
+
declare function createMdxComponents<T extends MdxComponentsMap>(extensions?: T): typeof mdxComponents & T;
|
|
23
|
+
|
|
24
|
+
/** Portfolio / blog: narrow text column, full-width media (see `articleNarrowProse`). */
|
|
25
|
+
declare function ArticleMDXContentProvider({ variant, ...props }: MDXContentProviderProps): React.JSX.Element;
|
|
26
|
+
|
|
27
|
+
/** Vertical spacing presets for article media blocks (figures, grids, compare sliders). */
|
|
28
|
+
type MediaSpacingVariant = 'none' | 'sm' | 'default' | 'lg';
|
|
29
|
+
/** Aligned with @atom63/mdx `mdxStyles.spacing` tokens. */
|
|
30
|
+
declare const mediaSpacingStyles: Record<MediaSpacingVariant, string>;
|
|
31
|
+
|
|
32
|
+
export { ArticleMDXContentProvider, MDXContentProviderProps, type MediaSpacingVariant, createMdxComponents, mediaSpacingStyles };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { mdxComponents, MDXContentProvider } from '../chunk-CSXZ2XEN.js';
|
|
2
|
+
export { blockMdxComponents, useMdxStyle } from '../chunk-CSXZ2XEN.js';
|
|
3
|
+
export { useIsInsideExample } from '../chunk-EIY6ZR6T.js';
|
|
4
|
+
import '../chunk-WZ6US342.js';
|
|
5
|
+
import '../chunk-DJSENA7Q.js';
|
|
6
|
+
import '../chunk-2RCEDZBB.js';
|
|
7
|
+
import { mdxStyles } from '../chunk-FVCE4FER.js';
|
|
8
|
+
export { mdxStyles } from '../chunk-FVCE4FER.js';
|
|
9
|
+
import '../chunk-OUEW54AC.js';
|
|
10
|
+
import '../chunk-IART7J2U.js';
|
|
11
|
+
import '../chunk-A3NG5VKX.js';
|
|
12
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
// src/article/create-mdx-components.ts
|
|
15
|
+
function createMdxComponents(extensions = {}) {
|
|
16
|
+
return {
|
|
17
|
+
...mdxComponents,
|
|
18
|
+
...extensions
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function ArticleMDXContentProvider({
|
|
22
|
+
variant = "narrow",
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsx(MDXContentProvider, { variant, ...props });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// src/article/media-spacing.ts
|
|
29
|
+
var mediaSpacingStyles = {
|
|
30
|
+
none: "",
|
|
31
|
+
sm: mdxStyles.spacing.mediaSm,
|
|
32
|
+
default: mdxStyles.spacing.media,
|
|
33
|
+
lg: mdxStyles.spacing.mediaLg
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { ArticleMDXContentProvider, createMdxComponents, mediaSpacingStyles };
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/article/create-mdx-components.ts","../../src/article/mdx-provider.tsx","../../src/article/media-spacing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAgBO,SAAS,mBAAA,CACd,UAAA,GAAgB,EAAC,EACa;AAC9B,EAAA,OAAO;AAAA,IACL,GAAG,aAAA;AAAA,IACH,GAAG;AAAA,GACL;AACF;ACfO,SAAS,yBAAA,CAA0B;AAAA,EACxC,OAAA,GAAU,QAAA;AAAA,EACV,GAAG;AACL,CAAA,EAA4B;AAC1B,EAAA,uBAAO,GAAA,CAAC,kBAAA,EAAA,EAAuB,OAAA,EAAmB,GAAG,KAAA,EAAO,CAAA;AAC9D;;;ACPO,IAAM,kBAAA,GAA0D;AAAA,EACrE,IAAA,EAAM,EAAA;AAAA,EACN,EAAA,EAAI,UAAU,OAAA,CAAQ,OAAA;AAAA,EACtB,OAAA,EAAS,UAAU,OAAA,CAAQ,KAAA;AAAA,EAC3B,EAAA,EAAI,UAAU,OAAA,CAAQ;AACxB","file":"index.js","sourcesContent":["import { blockMdxComponents, mdxComponents as coreMdxComponents } from '../mdx-components'\nimport type { MdxComponentsMap } from '../mdx-provider'\n\nexport { blockMdxComponents }\n\n/**\n * Merge core prose + block components with app-specific extensions.\n * Later keys win (extensions override core).\n *\n * The result is deliberately NOT intersected with `Record<string, unknown>`.\n * That widened every key's value type to `unknown`, and `unknown` is not a\n * component, so the returned map was not assignable to MDXProvider's own\n * `components` prop — every call site passing it to MDXContentProvider failed\n * to typecheck. Constraining the extensions to the provider's map type instead\n * keeps the merge open-ended while staying assignable.\n */\nexport function createMdxComponents<T extends MdxComponentsMap>(\n extensions: T = {} as T\n): typeof coreMdxComponents & T {\n return {\n ...coreMdxComponents,\n ...extensions,\n }\n}\n","import {\n MDXContentProvider as BaseMDXContentProvider,\n type MDXContentProviderProps,\n} from '../mdx-provider'\n\nexport type { MDXContentProviderProps, MdxProviderVariant } from '../mdx-provider'\n\n/** Portfolio / blog: narrow text column, full-width media (see `articleNarrowProse`). */\nexport function ArticleMDXContentProvider({\n variant = 'narrow',\n ...props\n}: MDXContentProviderProps) {\n return <BaseMDXContentProvider variant={variant} {...props} />\n}\n","import { mdxStyles } from '../mdx-styles'\n\n/** Vertical spacing presets for article media blocks (figures, grids, compare sliders). */\nexport type MediaSpacingVariant = 'none' | 'sm' | 'default' | 'lg'\n\n/** Aligned with @atom63/mdx `mdxStyles.spacing` tokens. */\nexport const mediaSpacingStyles: Record<MediaSpacingVariant, string> = {\n none: '',\n sm: mdxStyles.spacing.mediaSm,\n default: mdxStyles.spacing.media,\n lg: mdxStyles.spacing.mediaLg,\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type CreditEntry = {
|
|
4
|
+
credits: string;
|
|
5
|
+
role: string;
|
|
6
|
+
};
|
|
7
|
+
type CreditsBlockProps = {
|
|
8
|
+
className?: string;
|
|
9
|
+
credits: CreditEntry[];
|
|
10
|
+
label?: string;
|
|
11
|
+
};
|
|
12
|
+
declare function CreditsBlock({ credits, className, label }: CreditsBlockProps): React.JSX.Element | null;
|
|
13
|
+
|
|
14
|
+
export { type CreditEntry, CreditsBlock, type CreditsBlockProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"credits-block-entry.js"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
export { M as MDX_FIGURE_LIGHTBOX_GALLERY_ID } from '../constants-CuaBcwMe.js';
|
|
2
|
+
export { A as Accordion, k as AccordionProps, a as Callout, l as CalloutProps, b as CodeBlock, n as CodeBlockProps, c as ColorSwatchItem, o as ColorSwatchItemProps, d as ComparisonPair, p as ComparisonPairProps, q as ComparisonSlotProps, r as DemoStage, D as DemoStageProps, E as ExampleContainer, s as ExampleContainerProps, F as FigureBlock, t as FigureBlockProps, M as MediaPlaceholder, u as MediaPlaceholderKind, v as MediaPlaceholderProps, e as MermaidDiagram, w as MermaidDiagramLabels, x as MermaidDiagramProps, P as PageMeta, y as PageMetaProps, f as PageTableOfContents, z as PageTableOfContentsProps, B as ResourceItem, R as ResourceList, G as ResourceListProps, S as ScrollStage, H as ScrollStageProps, I as ScrollStageStepProps, g as StatCard, J as StatCardProps, h as StatGrid, K as StatGridProps, L as StatTrend, i as Steps, N as StepsProps, O as StepsStepProps, T as Tabs, Q as TabsProps, j as Timeline, U as TimelineItemProps, W as TimelineProps, V as VideoBlock, X as VideoBlockProps, Y as defaultMermaidDiagramLabels } from '../video-block-C0a5Yx9x.js';
|
|
3
|
+
import { S as SlotComponent } from '../slots-BvPdUMdY.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ReactNode, RefObject, HTMLAttributes } from 'react';
|
|
6
|
+
import { M as MdxFrameItemTone } from '../framed-block-DM5LLxO7.js';
|
|
7
|
+
export { CreditEntry, CreditsBlock, CreditsBlockProps } from './credits-block-entry.js';
|
|
8
|
+
export { MediaCaption, MediaCaptionProps } from './media-caption-entry.js';
|
|
9
|
+
import '@atom63/ui-react';
|
|
10
|
+
|
|
11
|
+
type DemoConfigPanelProps = {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
label?: ReactNode;
|
|
15
|
+
mobileQuery?: string;
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
open?: boolean;
|
|
18
|
+
panelClassName?: string;
|
|
19
|
+
panelInset?: number;
|
|
20
|
+
panelWidth?: number;
|
|
21
|
+
sheetClassName?: string;
|
|
22
|
+
sheetPanelClassName?: string;
|
|
23
|
+
stageRef: RefObject<HTMLElement | null>;
|
|
24
|
+
title?: string;
|
|
25
|
+
};
|
|
26
|
+
declare function DemoConfigPanel({ children, defaultOpen, label, mobileQuery, onOpenChange, open, panelClassName, panelInset, panelWidth, sheetClassName, sheetPanelClassName, stageRef, title, }: DemoConfigPanelProps): React.JSX.Element;
|
|
27
|
+
|
|
28
|
+
type CompareProps = {
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
className?: string;
|
|
31
|
+
description?: ReactNode;
|
|
32
|
+
title?: ReactNode;
|
|
33
|
+
};
|
|
34
|
+
type CompareItemProps = {
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
className?: string;
|
|
37
|
+
eyebrow?: ReactNode;
|
|
38
|
+
title: ReactNode;
|
|
39
|
+
tone?: MdxFrameItemTone;
|
|
40
|
+
};
|
|
41
|
+
declare function CompareItem({ children, className, eyebrow, title, tone }: CompareItemProps): React.JSX.Element;
|
|
42
|
+
declare function Compare({ children, className, description, title }: CompareProps): React.JSX.Element;
|
|
43
|
+
declare namespace Compare {
|
|
44
|
+
var Item: typeof CompareItem;
|
|
45
|
+
var Title: SlotComponent;
|
|
46
|
+
var Description: SlotComponent;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type DocExampleProps = {
|
|
50
|
+
align?: 'left' | 'center';
|
|
51
|
+
children: ReactNode;
|
|
52
|
+
className?: string;
|
|
53
|
+
code: string;
|
|
54
|
+
/** Label for the code tab (default: "Code"). */
|
|
55
|
+
codeLabel?: string;
|
|
56
|
+
/** aria-label for the copy control when idle (default: "Copy example code"). */
|
|
57
|
+
copyCodeLabel?: string;
|
|
58
|
+
/** aria-label for the copy control right after copying (default: "Copied to clipboard"). */
|
|
59
|
+
copiedLabel?: string;
|
|
60
|
+
/** Visually-hidden live-region text announced after copying (default: "Example code copied"). */
|
|
61
|
+
copiedAnnouncement?: string;
|
|
62
|
+
lang?: string;
|
|
63
|
+
/** Label for the preview tab (default: "Preview"). */
|
|
64
|
+
previewLabel?: string;
|
|
65
|
+
title?: string;
|
|
66
|
+
wide?: boolean;
|
|
67
|
+
};
|
|
68
|
+
declare function DocExample({ title, code, codeLabel, copyCodeLabel, copiedLabel, copiedAnnouncement, lang, previewLabel, children, className, align, wide, }: DocExampleProps): React.JSX.Element;
|
|
69
|
+
declare namespace DocExample {
|
|
70
|
+
var Title: SlotComponent;
|
|
71
|
+
var Preview: SlotComponent;
|
|
72
|
+
var Code: SlotComponent;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type DocExampleCodeProps = {
|
|
76
|
+
code: string;
|
|
77
|
+
lang?: string;
|
|
78
|
+
};
|
|
79
|
+
declare function DocExampleCode({ code, lang }: DocExampleCodeProps): React.JSX.Element;
|
|
80
|
+
|
|
81
|
+
type ImageCompareImage = {
|
|
82
|
+
alt: string;
|
|
83
|
+
label?: string;
|
|
84
|
+
src: string;
|
|
85
|
+
};
|
|
86
|
+
type ImageCompareProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onPositionChange' | 'title'> & {
|
|
87
|
+
after: ImageCompareImage;
|
|
88
|
+
aspectRatio?: string;
|
|
89
|
+
before: ImageCompareImage;
|
|
90
|
+
bordered?: boolean;
|
|
91
|
+
caption?: string;
|
|
92
|
+
changePositionOnHover?: boolean;
|
|
93
|
+
description?: string;
|
|
94
|
+
handle?: ReactNode;
|
|
95
|
+
/** Idle ms before restoring to center when `resetAfterIdle` is on. @default 2500 */
|
|
96
|
+
idleResetMs?: number;
|
|
97
|
+
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
98
|
+
onPositionChange?: (position: number) => void;
|
|
99
|
+
/** Initial slider position (0-100). @default 50 */
|
|
100
|
+
position?: number;
|
|
101
|
+
/** Restore to center after the user stops interacting. @default false */
|
|
102
|
+
resetAfterIdle?: boolean;
|
|
103
|
+
resetDelay?: number;
|
|
104
|
+
resetOnLeave?: boolean;
|
|
105
|
+
title?: ReactNode;
|
|
106
|
+
transition?: string;
|
|
107
|
+
vertical?: boolean;
|
|
108
|
+
};
|
|
109
|
+
declare const ImageCompare: React.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children" | "title" | "onPositionChange"> & {
|
|
110
|
+
after: ImageCompareImage;
|
|
111
|
+
aspectRatio?: string;
|
|
112
|
+
before: ImageCompareImage;
|
|
113
|
+
bordered?: boolean;
|
|
114
|
+
caption?: string;
|
|
115
|
+
changePositionOnHover?: boolean;
|
|
116
|
+
description?: string;
|
|
117
|
+
handle?: ReactNode;
|
|
118
|
+
/** Idle ms before restoring to center when `resetAfterIdle` is on. @default 2500 */
|
|
119
|
+
idleResetMs?: number;
|
|
120
|
+
objectFit?: "contain" | "cover" | "fill" | "none" | "scale-down";
|
|
121
|
+
onPositionChange?: (position: number) => void;
|
|
122
|
+
/** Initial slider position (0-100). @default 50 */
|
|
123
|
+
position?: number;
|
|
124
|
+
/** Restore to center after the user stops interacting. @default false */
|
|
125
|
+
resetAfterIdle?: boolean;
|
|
126
|
+
resetDelay?: number;
|
|
127
|
+
resetOnLeave?: boolean;
|
|
128
|
+
title?: ReactNode;
|
|
129
|
+
transition?: string;
|
|
130
|
+
vertical?: boolean;
|
|
131
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
132
|
+
|
|
133
|
+
type KeyIdeaProps = {
|
|
134
|
+
children: ReactNode;
|
|
135
|
+
className?: string;
|
|
136
|
+
label?: ReactNode;
|
|
137
|
+
title?: ReactNode;
|
|
138
|
+
};
|
|
139
|
+
declare function KeyIdea({ children, className, label, title }: KeyIdeaProps): React.JSX.Element;
|
|
140
|
+
|
|
141
|
+
type LayerStackItem = {
|
|
142
|
+
constraint?: ReactNode;
|
|
143
|
+
description?: ReactNode;
|
|
144
|
+
label: ReactNode;
|
|
145
|
+
metaphor?: ReactNode;
|
|
146
|
+
title: ReactNode;
|
|
147
|
+
};
|
|
148
|
+
type LayerStackLabels = {
|
|
149
|
+
metaphor: ReactNode;
|
|
150
|
+
description: ReactNode;
|
|
151
|
+
constraint: ReactNode;
|
|
152
|
+
};
|
|
153
|
+
type LayerStackProps = {
|
|
154
|
+
className?: string;
|
|
155
|
+
description?: ReactNode;
|
|
156
|
+
labels?: Partial<LayerStackLabels>;
|
|
157
|
+
layers: LayerStackItem[];
|
|
158
|
+
title?: ReactNode;
|
|
159
|
+
};
|
|
160
|
+
declare function LayerStack({ className, description, labels, layers, title }: LayerStackProps): React.JSX.Element;
|
|
161
|
+
|
|
162
|
+
type MdxPageSkeletonVariant = 'docs' | 'lesson';
|
|
163
|
+
interface MdxPageSkeletonProps {
|
|
164
|
+
className?: string;
|
|
165
|
+
showInlineToc?: boolean;
|
|
166
|
+
showRail?: boolean;
|
|
167
|
+
variant?: MdxPageSkeletonVariant;
|
|
168
|
+
}
|
|
169
|
+
declare function MdxPageSkeleton({ className, showInlineToc, showRail, variant, }: MdxPageSkeletonProps): React.JSX.Element;
|
|
170
|
+
|
|
171
|
+
/** All portable MDX block component names (site media blocks are registered separately). */
|
|
172
|
+
declare const portableBlockNames: readonly ["Accordion", "Callout", "CodeBlock", "ColorSwatchItem", "Compare", "ComparisonPair", "CreditsBlock", "DemoStage", "ExampleContainer", "FigureBlock", "ImageCompare", "KeyIdea", "LayerStack", "MediaCaption", "MediaPlaceholder", "MdxPageSkeleton", "MermaidDiagram", "PageMeta", "PageTableOfContents", "ResourceList", "ScrollStage", "StatCard", "StatGrid", "Steps", "Tabs", "Timeline", "VideoBlock"];
|
|
173
|
+
type PortableBlockName = (typeof portableBlockNames)[number];
|
|
174
|
+
|
|
175
|
+
export { Compare, type CompareItemProps, type CompareProps, DemoConfigPanel, type DemoConfigPanelProps, DocExample, DocExampleCode, type DocExampleCodeProps, type DocExampleProps, ImageCompare, type ImageCompareImage, type ImageCompareProps, KeyIdea, type KeyIdeaProps, LayerStack, type LayerStackItem, type LayerStackLabels, type LayerStackProps, MdxPageSkeleton, type MdxPageSkeletonProps, type PortableBlockName, portableBlockNames };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { Accordion, Callout, CodeBlock, ColorSwatchItem, Compare, ComparisonPair, DemoConfigPanel, DemoStage, DocExample, DocExampleCode, ExampleContainer, FigureBlock, ImageCompare, KeyIdea, LayerStack, MdxPageSkeleton, MediaPlaceholder, MermaidDiagram, PageMeta, PageTableOfContents, ResourceList, ScrollStage, StatCard, StatGrid, Steps, Tabs, Timeline, VideoBlock, defaultMermaidDiagramLabels, portableBlockNames } from '../chunk-EIY6ZR6T.js';
|
|
2
|
+
import '../chunk-WZ6US342.js';
|
|
3
|
+
export { CreditsBlock } from '../chunk-DJSENA7Q.js';
|
|
4
|
+
export { MediaCaption } from '../chunk-2RCEDZBB.js';
|
|
5
|
+
import '../chunk-FVCE4FER.js';
|
|
6
|
+
export { MDX_FIGURE_LIGHTBOX_GALLERY_ID } from '../chunk-IART7J2U.js';
|
|
7
|
+
import '../chunk-A3NG5VKX.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type MediaCaptionProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
/** Consistent caption styling for all media blocks. */
|
|
9
|
+
declare function MediaCaption({ children, className }: MediaCaptionProps): React.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { MediaCaption, type MediaCaptionProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"media-caption-entry.js"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { mdxStyles } from './chunk-FVCE4FER.js';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function MediaCaption({ children, className }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("figcaption", { className: clsx(mdxStyles.content.figcaption, className), children });
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { MediaCaption };
|
|
10
|
+
//# sourceMappingURL=chunk-2RCEDZBB.js.map
|
|
11
|
+
//# sourceMappingURL=chunk-2RCEDZBB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/blocks/media-caption/media-caption.tsx"],"names":[],"mappings":";;;;AAUO,SAAS,YAAA,CAAa,EAAE,QAAA,EAAU,SAAA,EAAU,EAAsB;AACvE,EAAA,uBACE,GAAA,CAAC,gBAAW,SAAA,EAAW,IAAA,CAAK,UAAU,OAAA,CAAQ,UAAA,EAAY,SAAS,CAAA,EAAI,QAAA,EAAS,CAAA;AAEpF","file":"chunk-2RCEDZBB.js","sourcesContent":["import { clsx } from 'clsx'\nimport type { ReactNode } from 'react'\nimport { mdxStyles } from '../../mdx-styles'\n\nexport type MediaCaptionProps = {\n children: ReactNode\n className?: string\n}\n\n/** Consistent caption styling for all media blocks. */\nexport function MediaCaption({ children, className }: MediaCaptionProps) {\n return (\n <figcaption className={clsx(mdxStyles.content.figcaption, className)}>{children}</figcaption>\n )\n}\n"]}
|