@bettercms-ai/ui 0.20.1 → 0.23.1

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @bettercms-ai/ui
2
2
 
3
- > **Status: Scaffolded** — Not yet published to npm.
3
+ > Published on npm as `@bettercms-ai/ui`.
4
4
 
5
5
  Shared page-builder block components for BetterCMS. Contains presentation-only React components for the 7 core block types: **Heading**, **Text**, **Image**, **Button**, **Spacer**, **Columns**, and **Video**.
6
6
 
@@ -93,4 +93,4 @@ cd packages/ui && npx shadcn@latest add -p ../../ button
93
93
 
94
94
  ## Note on npm publishing
95
95
 
96
- This package is **not yet published** to npm. Admin and web repos use their own local shadcn/ui copies for non-page-builder UI (Dialog, Sheet, Table, etc.). The `@bettercms-ai/ui` blocks are consumed via workspace references during local development, and will be published after MVP when the block variants and animation system are finalized.
96
+ Published to npm. Admin and web repos use their own local shadcn/ui copies for non-page-builder UI (Dialog, Sheet, Table, etc.); this package carries the page-builder blocks and renderer.
package/dist/blocks.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { a as Button, C as Columns, H as Heading, I as Image, S as Spacer, T as Text, V as Video } from './Video-vB2IlrdH.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { SectionProps, ContentBlock, NavbarProps, FooterProps, SliderProps, TabsProps, ComponentProps, FormProps } from '@bettercms-ai/types';
3
+ import { SectionProps, ContentBlock, NavbarProps, FooterProps, SliderProps, TabsProps, ComponentProps, FormProps, RichTextResolved } from '@bettercms-ai/types';
4
4
  import React from 'react';
5
+ import { EmbedRender } from '@bettercms-ai/richtext';
5
6
 
6
7
  interface SectionBlockProps extends SectionProps {
7
8
  className?: string;
@@ -54,7 +55,18 @@ interface PortableTextProps {
54
55
  * Anything but `undefined` replaces the marker; `null` renders nothing.
55
56
  */
56
57
  renderBlock?: (value: Record<string, unknown>) => React.ReactNode;
58
+ /**
59
+ * RT3: the X cards fetched for this render (by canonical url), as `portableTextToHtml`'s
60
+ * `embeds`. Absent: every X post is a link card.
61
+ */
62
+ embeds?: EmbedRender;
63
+ /**
64
+ * RT8: the entries this value's author bios and related posts point at, resolved by the caller
65
+ * when the page is produced (never stored), as `portableTextToHtml`'s `resolved`. Absent: each
66
+ * block is the placeholder aside the stored html holds.
67
+ */
68
+ resolved?: RichTextResolved;
57
69
  }
58
- declare function PortableText({ value, bindingBase, renderBlock }: PortableTextProps): react_jsx_runtime.JSX.Element | null;
70
+ declare function PortableText({ value, bindingBase, renderBlock, embeds, resolved }: PortableTextProps): react_jsx_runtime.JSX.Element | null;
59
71
 
60
72
  export { ComponentInstance, Footer, FormPlaceholder, Navbar, PortableText, type PortableTextProps, Section, Slider, Tabs };