Skip to content

Commit 4c0caea

Browse files
committed
Improve package readme and faq.
1 parent 16df780 commit 4c0caea

10 files changed

Lines changed: 63 additions & 12 deletions

File tree

‎frontend/purestack.studio/index.mdx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,11 @@ card.<span class="syntax-blue">toCSS</span>()</code></pre>
563563
RegorApp or PageScript. PureStack bundles that entry point and its
564564
dependencies for the browser.
565565
</StudioFaq>
566-
<StudioFaq title="Is this React MDX?">
567-
PureStack uses Regor MDX: Markdown with Regor components and directives.
568-
You can use the familiar .mdx extension or the explicit .rmdx extension.
569-
React components are not interchangeable with Regor components.
566+
<StudioFaq title="Can I use the same components in pages and apps?">
567+
Yes. Regor renders components and directives in MDX to static HTML during
568+
the build, and powers interactive apps in the browser. Your own components
569+
can work in both places; browser apps register the built-in and custom
570+
components they use. <a href="/guides/regor/">See the Regor guide</a>.
570571
</StudioFaq>
571572
<StudioFaq title="Do I need a particular backend or host?">
572573
No. PureStack produces static HTML, CSS, and browser assets that you can

‎packages/ts-common/README.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
# @purestack/ts-common
2+
3+
Shared TypeScript contracts for PureStack's site generator, components, and page
4+
scripts. This package defines site configuration, page frontmatter, navigation,
5+
logos, templates, and the rendering context so those packages agree on the same
6+
shapes.
7+
8+
Import types such as `SiteConfig`, `PageFrontmatter`, and `TsSsgContext` when
9+
building a custom integration. The runtime exports `resolveTsSsgContext` and
10+
`tryResolveTsSsgContext` find the site context in a Regor component.

‎packages/ts-components/README.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
# @purestack/ts-components
22

3-
TypeScript-first component primitives for PureStack.
3+
PureStack's built-in Regor components for pages and app interfaces. The library
4+
includes layout, navigation, forms, charts, dialogs, and content components used
5+
by the static site generator and available to custom renderers.
6+
7+
`defineComponents(getSvgIcon)` assembles the component set, and
8+
`registerStyles()` adds its styles to PureStack's theme builder. Individual
9+
component definitions and style registration functions are also exported when
10+
you need a smaller selection.

‎packages/ts-components/src/standard/topBar/topBar.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('TopBar rendering', () => {
2020
const cleanupDom = createDom(
2121
'<html><body><div id="app"></div></body></html>',
2222
)
23-
const logoComponent = ref<string | undefined>(undefined)
23+
const logoComponent = ref<string | null>(null)
2424
const app = createApp(
2525
{
2626
components: {

‎packages/ts-minidom/README.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# @purestack/ts-minidom
22

3-
Minimal DOM implementation extracted from PureStack for server-side rendering and tests.
3+
A small DOM implementation used to render Regor components in Node.js. It
4+
provides HTML parsing and the document and element APIs needed by PureStack's
5+
server-side renderer and component tests.
6+
7+
Use `parseHtml` or `parseFragment` to work with a document directly. `createDom`
8+
temporarily installs DOM globals and returns a cleanup function; call that
9+
function after rendering to restore the previous globals.

‎packages/ts-page-scripts/README.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# @purestack/ts-page-scripts
22

3-
Shared inline page-script builders and embedded browser runtimes for PureStack.
3+
Browser behavior for PureStack's generated pages. The exported builders return
4+
inline JavaScript for theme switching, consent, navigation, menus, tabs,
5+
dialogs, search, and other page features.
6+
7+
The site generator uses these builders when it adds interactive components to
8+
static HTML. The package also exports TypeScript types for the browser APIs
9+
exposed by those scripts, such as `TsSsgTabsApi` and `TsSsgModalApi`.

‎packages/ts-render/README.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
# @purestack/ts-render
2+
3+
Server-side rendering for PureStack's Regor components. `renderApp` takes HTML,
4+
a component set, and a `TsSsgContext`, then returns rendered HTML with any
5+
required component scripts attached.
6+
7+
`componentRegistry` lets custom build pipelines register components by name.
8+
The site generator uses this package to turn page markup into static output.

‎packages/ts-style/README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
# @purestack/ts-style
2+
3+
Theme and style infrastructure for PureStack sites and components. It provides
4+
light and dark palettes, CSS variables, theme skins, breakpoints, layout tokens,
5+
and utilities for building scoped styles with `@purestack/ts-css`.
6+
7+
Use `themes` and `registerSkin` to configure a site's palette, or
8+
`styleBuilder` to collect and render CSS for a theme. PureStack's component
9+
library and site generator use these same exports.

‎packages/ts-util-node/README.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# @purestack/ts-util-node
22

3-
Node-only utility helpers for PureStack.
3+
File path helpers for PureStack's Node.js build tools. `ensureDir(filePath)`
4+
creates the parent directory for a file, and `replaceExt(filePath, newExt)`
5+
returns the path with a different extension.
6+
7+
Use this package in build scripts and other Node.js code. Browser-safe helpers
8+
live in `@purestack/ts-util`.

‎packages/ts-util/README.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# @purestack/ts-util
22

3-
Shared utility helpers extracted from PureStack.
3+
Small, browser-safe helpers shared across PureStack packages. Exports include
4+
HTML escaping, object merging, value and type checks, caching, and URL and asset
5+
path handling.
46

5-
This package should stay browser-safe. Do not add Node-only dependencies such as
6-
`node:path`, `node:fs`, or other `node:` imports here.
7+
Use `escapeHtml`, `merge`, `normalizeBasePath`, or the other named exports when
8+
building on PureStack without pulling in Node.js APIs.

0 commit comments

Comments
 (0)