Fix scope

This commit is contained in:
Matt Kane
2026-04-01 10:58:32 +01:00
parent 482a442f60
commit 2e863566b3
264 changed files with 578 additions and 578 deletions

View File

@@ -51,7 +51,7 @@ React components. Use `usePluginAPI()` to call plugin routes.
```typescript
// src/components/SettingsPage.tsx
import { useState, useEffect } from "react";
import { usePluginAPI } from "@emdashcms/admin";
import { usePluginAPI } from "@emdash-cms/admin";
export function SettingsPage() {
const api = usePluginAPI();
@@ -94,7 +94,7 @@ Dashboard cards with at-a-glance info.
```typescript
// src/components/StatusWidget.tsx
import { useState, useEffect } from "react";
import { usePluginAPI } from "@emdashcms/admin";
import { usePluginAPI } from "@emdash-cms/admin";
export function StatusWidget() {
const api = usePluginAPI();
@@ -134,10 +134,10 @@ const result = await api.get("history?limit=50"); // Query params
## Admin Components
Pre-built components from `@emdashcms/admin`:
Pre-built components from `@emdash-cms/admin`:
```typescript
import { Card, Button, Input, Select, Toggle, Table, Loading, Alert } from "@emdashcms/admin";
import { Card, Button, Input, Select, Toggle, Table, Loading, Alert } from "@emdash-cms/admin";
```
## Auto-Generated Settings
@@ -166,11 +166,11 @@ export default {
},
format: "esm",
dts: true,
external: ["react", "react-dom", "emdash", "@emdashcms/admin"],
external: ["react", "react-dom", "emdash", "@emdash-cms/admin"],
};
```
Keep React and `@emdashcms/admin` as externals to avoid bundling duplicates.
Keep React and `@emdash-cms/admin` as externals to avoid bundling duplicates.
## Plugin Descriptor

View File

@@ -245,7 +245,7 @@ definePlugin({
## Calling from Admin UI
```typescript
import { usePluginAPI } from "@emdashcms/admin";
import { usePluginAPI } from "@emdash-cms/admin";
const api = usePluginAPI();
const data = await api.get("status");

View File

@@ -329,10 +329,10 @@ Show/hide fields based on other field values. Evaluated client-side, no round-tr
## Builder Helpers
`@emdashcms/blocks` provides TypeScript helpers:
`@emdash-cms/blocks` provides TypeScript helpers:
```typescript
import { blocks, elements } from "@emdashcms/blocks";
import { blocks, elements } from "@emdash-cms/blocks";
const { header, form, section, stats, timeseriesChart, customChart, banner: bannerBlock } = blocks;
const { textInput, toggle, select, button } = elements;

View File

@@ -31,7 +31,7 @@ The bundle command uses `package.json` exports to find entrypoints:
| Export | Purpose | Built as |
| ------------- | ----------------------------- | ------------------------------------ |
| `"."` | Main entry — extract manifest | Externals: `emdash`, `@emdashcms/*` |
| `"."` | Main entry — extract manifest | Externals: `emdash`, `@emdash-cms/*` |
| `"./sandbox"` | Backend code for the sandbox | Fully self-contained (no externals) |
| `"./admin"` | Admin UI components | Fully self-contained |