@plitzi/plitzi-builder 0.39.2 → 0.39.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @plitzi/plitzi-builder
2
2
 
3
+ ## 0.39.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 35415a1: Released with every `@plitzi` package at this version. What changed in each, and what to do when you upgrade, is in
8
+ `@plitzi/cli`'s `CHANGELOG.md`: one copy of the notes, not one per package.
9
+ - Updated dependencies [35415a1]
10
+ - @plitzi/plitzi-sdk@0.39.4
11
+ - @plitzi/sdk-auth@0.39.4
12
+ - @plitzi/sdk-authoring@0.39.4
13
+ - @plitzi/sdk-dev-tools@0.39.4
14
+ - @plitzi/sdk-elements@0.39.4
15
+ - @plitzi/sdk-event-bridge@0.39.4
16
+ - @plitzi/sdk-interactions@0.39.4
17
+ - @plitzi/sdk-navigation@0.39.4
18
+ - @plitzi/sdk-plugins@0.39.4
19
+ - @plitzi/sdk-schema@0.39.4
20
+ - @plitzi/sdk-shared@0.39.4
21
+ - @plitzi/sdk-style@0.39.4
22
+ - @plitzi/sdk-variables@0.39.4
23
+
24
+ ## 0.39.3
25
+
26
+ ### Patch Changes
27
+
28
+ - @plitzi/plitzi-sdk@0.39.3
29
+ - @plitzi/sdk-auth@0.39.3
30
+ - @plitzi/sdk-authoring@0.39.3
31
+ - @plitzi/sdk-dev-tools@0.39.3
32
+ - @plitzi/sdk-elements@0.39.3
33
+ - @plitzi/sdk-event-bridge@0.39.3
34
+ - @plitzi/sdk-interactions@0.39.3
35
+ - @plitzi/sdk-navigation@0.39.3
36
+ - @plitzi/sdk-plugins@0.39.3
37
+ - @plitzi/sdk-schema@0.39.3
38
+ - @plitzi/sdk-shared@0.39.3
39
+ - @plitzi/sdk-style@0.39.3
40
+ - @plitzi/sdk-variables@0.39.3
41
+
3
42
  ## 0.39.2
4
43
 
5
44
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -26,7 +26,7 @@ export type PlitziBuilderProps = {
26
26
  };
27
27
  declare const PlitziBuilder: {
28
28
  (props: PlitziBuilderProps): import('react').JSX.Element;
29
- Plugin: (_props: import('./modules/Builder/BuilderPlugin').BuilderPluginProps) => undefined;
29
+ Plugin: import('react').FC<import('./modules/Builder/BuilderPlugin').BuilderPluginProps>;
30
30
  };
31
31
  export declare const version: string;
32
32
  export { useBuilderStore, ComponentProvider, ComponentContext, usePlitzi, PlitziProvider, RootElement, withElement, JsxManager, PluginManager, PluginRemote, ReplicaProvider, useElement, useRscData };
@@ -5,6 +5,6 @@ export type BuilderProps = {
5
5
  };
6
6
  declare const Builder: {
7
7
  ({ pages, customCss, externalStyle }: BuilderProps): import('react').JSX.Element;
8
- Plugin: (_props: import('./BuilderPlugin').BuilderPluginProps) => undefined;
8
+ Plugin: import('react').FC<import('./BuilderPlugin').BuilderPluginProps>;
9
9
  };
10
10
  export default Builder;
@@ -7,5 +7,5 @@ export type BuilderPluginProps = {
7
7
  definition?: ComponentDefinition;
8
8
  assets?: Asset[];
9
9
  };
10
- declare const BuilderPlugin: (_props: BuilderPluginProps) => undefined;
10
+ declare const BuilderPlugin: FC<BuilderPluginProps>;
11
11
  export default BuilderPlugin;
@@ -0,0 +1,8 @@
1
+ import { Element } from '@plitzi/sdk-shared';
2
+ export type BreadcrumbStep = {
3
+ id: string;
4
+ label: string;
5
+ type: string;
6
+ };
7
+ /** The way from the root to an element, each step its label and type; an id the document lacks is one unknown step. */
8
+ export declare const pathOf: (flat: Record<string, Element>, id?: string) => BreadcrumbStep[];
@@ -14,5 +14,8 @@ export declare const summarize: {
14
14
  };
15
15
  /** `GET /api/posts` — the request itself, which is what identifies an endpoint at a glance. */
16
16
  export declare const summarizeEndpoint: (endpoint: ConnectorReadEndpoint | ConnectorWriteEndpoint) => string;
17
- /** True when a read endpoint maps the response by hand, so a collapsed header can say it was customized. */
17
+ /**
18
+ * True when a read endpoint maps the response by hand, so a collapsed header can say it was customized. A path the form
19
+ * cleared is an empty string: any of the others still says so.
20
+ */
18
21
  export declare const hasResponseMapping: (endpoint: ConnectorReadEndpoint) => boolean;
@@ -0,0 +1,7 @@
1
+ import { BuilderRefusal as Refusal } from './refusalOf';
2
+ export type BuilderRefusalProps = {
3
+ refusal: Refusal;
4
+ onRetry: () => void;
5
+ };
6
+ declare const _default: import('react').MemoExoticComponent<({ refusal, onRetry }: BuilderRefusalProps) => import('react').JSX.Element>;
7
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default } from './BuilderRefusal';
2
+ export { refusalOf } from './refusalOf';
3
+ export type { BuilderRefusal, BuilderRefusalKind } from './refusalOf';
@@ -0,0 +1,12 @@
1
+ /** Why the builder could not open its space, as the person reads it: what happened, what to do, and the way out. */
2
+ export type BuilderRefusalKind = 'signedOut' | 'notFound' | 'unreachable' | 'outdated' | 'other';
3
+ export type BuilderRefusal = {
4
+ kind: BuilderRefusalKind;
5
+ title: string;
6
+ description: string;
7
+ };
8
+ /**
9
+ * The refusal a failed load reads as. A credential the server no longer takes and a session that ended are the same thing
10
+ * to the person — sign in again — and a space they cannot reach is said as not found, as the API says it.
11
+ */
12
+ export declare const refusalOf: (error: unknown) => BuilderRefusal;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * What the platform says of this builder's version (`@plitzi/sdk-shared/clients`): a builder older than the platform —
3
+ * a tab left open across a release — is answered and told what is current, once; one older than the platform takes is
4
+ * refused (426) and has to be reloaded. Heard on whichever request comes back with it, said by the network provider.
5
+ */
6
+ export type PlatformHeard = {
7
+ kind: 'behind';
8
+ current: string;
9
+ } | {
10
+ kind: 'outdated';
11
+ message: string;
12
+ };
13
+ type Listener = (heard: PlatformHeard) => void;
14
+ export declare const onPlatformVersion: (listener: Listener) => (() => void);
15
+ /** A version heard: said to every listener, a `behind` once for each version of the platform. */
16
+ export declare const hearPlatform: (heard: PlatformHeard) => void;
17
+ /** A fetch that hears the platform's version on every answer it brings back. */
18
+ export declare const versionedFetch: <Init>(fetchImpl: (input: URL | RequestInfo, init?: Init) => Promise<Response>) => (input: URL | RequestInfo, init?: Init) => Promise<Response>;
19
+ /**
20
+ * A request of the builder's to the platform's API: it says which builder it is, as its GraphQL link does, and hears
21
+ * the platform's version on the answer — every call the builder makes past GraphQL goes through it.
22
+ */
23
+ export declare const platformFetch: (input: URL | RequestInfo, init?: RequestInit | undefined) => Promise<Response>;
24
+ export {};
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "@plitzi/plitzi-builder",
3
- "version": "0.39.2",
3
+ "version": "0.39.4",
4
4
  "homepage": "./",
5
5
  "license": "AGPL-3.0",
6
6
  "files": [
@@ -34,7 +34,7 @@ declare const _default: {
34
34
  "@fortawesome/fontawesome-free": "^7.3.1",
35
35
  "@plitzi/nexus": "^1.4.0",
36
36
  "@plitzi/plitzi-sdk": "workspace:*",
37
- "@plitzi/plitzi-ui": "^1.6.38",
37
+ "@plitzi/plitzi-ui": "^1.6.39",
38
38
  "@plitzi/sdk-auth": "workspace:*",
39
39
  "@plitzi/sdk-authoring": "workspace:*",
40
40
  "@plitzi/sdk-dev-tools": "workspace:*",