@sevenfold/setto-client 0.12.1 → 0.13.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.
@@ -1,11 +1,16 @@
1
1
  /**
2
- * Drop-in admin SPA. Mount under a route like `<Route path="/setto/*" .../>`.
2
+ * The page at `/setto`. Mount it under a route like `<Route path="/setto/*" …>`.
3
3
  *
4
- * Behaviour after login:
5
- * - Redirects to the site home `/`. Edit mode activates automatically there
6
- * via `SettoProvider` when the user has access to `config.siteId`.
7
- * - Shows the dashboard only when the user lacks access to this site, or
8
- * when a panel was asked for: `/setto?deployment=…` for publish progress
9
- * and history, `/setto?view=<module>` for a module's panel (forms today).
4
+ * What draws it lives in setto-server now, not here. The chrome bundle offers a
5
+ * dashboard at runtime — publish history, the forms inbox, the domain panel —
6
+ * and that is what fills this route, so changing any of it is one deploy of
7
+ * Setto rather than a rebuild of every site it has ever made.
8
+ *
9
+ * What stays behind is the door: sign in, and get back to the site to edit.
10
+ * That much has to work from the site's own bundle, because it is the only way
11
+ * in and because the bug that takes the chrome down could be mine. Everything
12
+ * past the door is Setto's, needs Setto to be reachable to do anything at all,
13
+ * and is better absent than drawn from a copy that has been quietly rotting in
14
+ * a pinned version since the day the site was built.
10
15
  */
11
16
  export declare function SettoAdminApp(): import("react/jsx-runtime").JSX.Element;
@@ -6,6 +6,8 @@ import type { SettoModule } from '../module';
6
6
  * setting somebody returns to — when they finally buy the name, when they move
7
7
  * registrar, when a record gets deleted by accident — and the conversation
8
8
  * that built the site is not somewhere anybody goes back to.
9
+ *
10
+ * Only the tab is here. The panel behind it is served from setto-server, which
11
+ * is also where the DNS instructions are worked out.
9
12
  */
10
13
  export declare const domainModule: SettoModule;
11
- export { DomainView } from './DomainView';
@@ -1,8 +1,8 @@
1
1
  import type { SettoModule } from '../module';
2
2
  /**
3
- * The forms module: a form primitive the site renders, an inbox in the
4
- * dashboard, and the api segment between them. Server side lives in
5
- * setto-server `src/modules/forms`.
3
+ * The forms module: a form primitive the site renders, and the api segment
4
+ * behind it. Server side lives in setto-server `src/modules/forms`, and so
5
+ * does the inbox the customer reads submissions in.
6
6
  */
7
7
  export declare const formsModule: SettoModule;
8
8
  export { SettoForm } from './SettoForm';
@@ -1,5 +1,5 @@
1
1
  import type { SettoModule } from './module';
2
2
  export type { SettoModule } from './module';
3
- /** Every module the dashboard shows, in tab order. */
3
+ /** Every module the dashboard shows, in tab order. Setto draws the tabs. */
4
4
  export declare const SETTO_MODULES: readonly SettoModule[];
5
5
  export declare function findModule(id: string | null): SettoModule | undefined;
@@ -1,30 +1,26 @@
1
- import type { ComponentType } from 'react';
2
1
  /**
3
2
  * What a Setto module is, from the client's side.
4
3
  *
5
4
  * A module is a capability a site gets by using the library — forms today;
6
5
  * bookings, newsletters, reviews later. Each one is a directory under
7
- * `src/modules/<id>` that owns its three faces:
6
+ * `src/modules/<id>` that owns the two faces the customer's own bundle has to
7
+ * carry:
8
8
  *
9
9
  * - a primitive the site renders (`SettoForm`), with edit chrome for the
10
10
  * owner and content that lives in the locale so it publishes with the
11
11
  * rest of the site;
12
- * - a panel in the dashboard at `/setto?view=<id>` (`AdminView`), reached
13
- * from the editor toolbar's settings item;
14
12
  * - an api segment (`createFormsApi`) that `createApi` mounts under its id,
15
13
  * against routes setto-server keeps under `src/modules/<id>`.
16
14
  *
17
- * Registering the module in `src/modules/index.ts` is what puts its tab in
18
- * the dashboard. The primitive and the types are exported from the package
19
- * root like everything else.
15
+ * The third face — the panel at `/setto?view=<id>` — is not here. It lives in
16
+ * setto-server under `chrome/src/admin/modules`, and arrives at runtime, so a
17
+ * new module's panel ships in a deploy instead of a rebuild of every site.
18
+ * What this list is still for is the editor toolbar, which links to those
19
+ * panels from the customer's page and needs their ids and labels to do it.
20
20
  */
21
21
  export interface SettoModule {
22
22
  /** Stable id — also the dashboard view name and the api segment name. */
23
23
  id: string;
24
24
  /** Tab label in the dashboard, in Norwegian. */
25
25
  label: string;
26
- /** The dashboard panel for the current site. */
27
- AdminView: ComponentType<{
28
- siteId: string;
29
- }>;
30
26
  }