@plitzi/plitzi-builder 0.37.2 → 0.37.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 +1192 -0
- package/dist/App.d.ts +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.html +3 -2
- package/dist/modules/AI/components/ChatInput/components/ModelSelector/components/ModelOption/ModelOption.d.ts +2 -1
- package/dist/modules/App/AppContainer/containers/ContainerFunctions.d.ts +2 -0
- package/dist/modules/App/AppContainer/containers/ContainerRuntime.d.ts +2 -0
- package/dist/modules/App/AppContainer/containers/ContainerVisitors.d.ts +2 -0
- package/dist/modules/App/AppContext.d.ts +2 -0
- package/dist/modules/App/AppMain.d.ts +2 -1
- package/dist/modules/App/components/AppHeader/IssuesButton/IssuesButton.d.ts +2 -0
- package/dist/modules/App/components/AppHeader/IssuesButton/helpers.d.ts +4 -0
- package/dist/modules/App/components/AppHeader/IssuesButton/index.d.ts +3 -0
- package/dist/modules/App/components/AppHeader/RuntimeIdleNotice/RuntimeIdleNotice.d.ts +2 -0
- package/dist/modules/App/components/AppHeader/RuntimeIdleNotice/index.d.ts +1 -0
- package/dist/modules/App/components/AppHeader/RuntimeIdleNotice/timeLeftOf.d.ts +3 -0
- package/dist/modules/Builder/components/BuilderOverlay/BuilderOverlayDrag.d.ts +0 -2
- package/dist/modules/Builder/helpers/elementChain.d.ts +1 -2
- package/dist/modules/Elements/ElementHelper.d.ts +2 -0
- package/dist/modules/Functions/Functions.d.ts +7 -0
- package/dist/modules/Functions/components/FunctionsDeclared/FunctionsDeclared.d.ts +10 -0
- package/dist/modules/Functions/components/FunctionsDeclared/index.d.ts +3 -0
- package/dist/modules/Functions/components/FunctionsFiles/FunctionsFiles.d.ts +11 -0
- package/dist/modules/Functions/components/FunctionsFiles/index.d.ts +3 -0
- package/dist/modules/Functions/components/FunctionsProblems/FunctionsProblems.d.ts +8 -0
- package/dist/modules/Functions/components/FunctionsProblems/index.d.ts +3 -0
- package/dist/modules/Functions/components/FunctionsTry/FunctionsTry.d.ts +13 -0
- package/dist/modules/Functions/components/FunctionsTry/index.d.ts +3 -0
- package/dist/modules/Functions/editor/functionsEnvironment.d.ts +6 -0
- package/dist/modules/Functions/editor/useFunctionsTypeScript.d.ts +13 -0
- package/dist/modules/Functions/helpers.d.ts +11 -0
- package/dist/modules/Functions/index.d.ts +2 -0
- package/dist/modules/Functions/useFunctions.d.ts +14 -0
- package/dist/modules/History/History.d.ts +7 -0
- package/dist/modules/History/components/ChangeEntry/ChangeEntry.d.ts +7 -0
- package/dist/modules/History/components/ChangeEntry/index.d.ts +3 -0
- package/dist/modules/History/components/ChangeGroup/ChangeGroup.d.ts +10 -0
- package/dist/modules/History/components/ChangeGroup/index.d.ts +3 -0
- package/dist/modules/History/components/ChangeLine/ChangeLine.d.ts +10 -0
- package/dist/modules/History/components/ChangeLine/index.d.ts +3 -0
- package/dist/modules/History/components/LineLabel/LineLabel.d.ts +7 -0
- package/dist/modules/History/components/LineLabel/index.d.ts +3 -0
- package/dist/modules/History/components/SaveDetail/SaveDetail.d.ts +7 -0
- package/dist/modules/History/components/SaveDetail/index.d.ts +3 -0
- package/dist/modules/History/components/SnapshotMarker/SnapshotMarker.d.ts +7 -0
- package/dist/modules/History/components/SnapshotMarker/index.d.ts +3 -0
- package/dist/modules/History/helpers.d.ts +63 -0
- package/dist/modules/History/hooks/useSpaceChanges.d.ts +22 -0
- package/dist/modules/History/index.d.ts +3 -0
- package/dist/modules/Interactions/components/Workflow/WorkflowNode/NodeWhileRunning.d.ts +15 -0
- package/dist/modules/Interactions/components/Workflow/WorkflowNode/WorkflowNode.d.ts +3 -2
- package/dist/modules/Interactions/components/Workflow/helpers/whileRunning.d.ts +8 -0
- package/dist/modules/Queue/QueueContext.d.ts +0 -6
- package/dist/modules/Queue/helpers.d.ts +14 -0
- package/dist/modules/Queue/hooks/useQueueManager.d.ts +2 -6
- package/dist/modules/Queue/hooks/useQueueManager.test.d.ts +1 -0
- package/dist/modules/Resources/components/Resource/components/PluginInUse/PluginInUse.d.ts +7 -0
- package/dist/modules/Resources/components/Resource/components/PluginInUse/index.d.ts +3 -0
- package/dist/modules/Resources/components/Resource/subTypes/ResourceMedia/ResourceMedia.d.ts +15 -0
- package/dist/modules/Resources/components/Resource/subTypes/ResourceMedia/index.d.ts +3 -0
- package/dist/modules/Resources/components/ResourceContent/components/ContentPlugin/helpers.d.ts +2 -0
- package/dist/modules/Resources/components/ResourceContent/components/ContentPlugin/index.d.ts +3 -0
- package/dist/modules/Resources/helpers.d.ts +6 -0
- package/dist/modules/Resources/helpers.test.d.ts +1 -0
- package/dist/modules/Runtime/Runtime.d.ts +8 -0
- package/dist/modules/Runtime/components/RuntimeCodeNote/RuntimeCodeNote.d.ts +12 -0
- package/dist/modules/Runtime/components/RuntimeCodeNote/index.d.ts +2 -0
- package/dist/modules/Runtime/components/RuntimeEnvironments/RuntimeEnvironments.d.ts +13 -0
- package/dist/modules/Runtime/components/RuntimeEnvironments/index.d.ts +2 -0
- package/dist/modules/Runtime/components/RuntimePower/RuntimePower.d.ts +15 -0
- package/dist/modules/Runtime/components/RuntimePower/index.d.ts +2 -0
- package/dist/modules/Runtime/components/RuntimeSize/RuntimeSize.d.ts +17 -0
- package/dist/modules/Runtime/components/RuntimeSize/index.d.ts +2 -0
- package/dist/modules/Runtime/components/RuntimeVariables/RuntimeVariables.d.ts +11 -0
- package/dist/modules/Runtime/components/RuntimeVariables/index.d.ts +2 -0
- package/dist/modules/Runtime/helpers/idleDurationOf.d.ts +6 -0
- package/dist/modules/Runtime/helpers/idleDurationOf.test.d.ts +1 -0
- package/dist/modules/Runtime/helpers/stopMomentOf.d.ts +6 -0
- package/dist/modules/Runtime/index.d.ts +1 -0
- package/dist/modules/Schema/helpers/templateProblem.d.ts +8 -0
- package/dist/modules/Schema/helpers/templateProblem.test.d.ts +1 -0
- package/dist/modules/Space/components/SpaceIssues/SpaceIssues.d.ts +16 -0
- package/dist/modules/Space/components/SpaceIssues/components/IssueGroup/IssueGroup.d.ts +10 -0
- package/dist/modules/Space/components/SpaceIssues/components/IssueGroup/index.d.ts +3 -0
- package/dist/modules/Space/components/SpaceIssues/components/IssueItem/IssueItem.d.ts +15 -0
- package/dist/modules/Space/components/SpaceIssues/components/IssueItem/index.d.ts +3 -0
- package/dist/modules/Space/components/SpaceIssues/helpers.d.ts +4 -0
- package/dist/modules/Space/components/SpaceIssues/index.d.ts +3 -0
- package/dist/modules/Space/helpers/spaceIssues.d.ts +15 -0
- package/dist/modules/Space/helpers/spaceIssues.test.d.ts +1 -0
- package/dist/modules/Space/hooks/useFixSpaceIssues.d.ts +9 -0
- package/dist/modules/Space/hooks/useShowSpaceIssues.d.ts +8 -0
- package/dist/modules/Space/hooks/useSpaceIssues.d.ts +14 -0
- package/dist/modules/Undoable/UndoableContext.d.ts +0 -1
- package/dist/modules/Visitors/Visitors.d.ts +8 -0
- package/dist/modules/Visitors/components/VisitorGrants/VisitorGrants.d.ts +12 -0
- package/dist/modules/Visitors/components/VisitorGrants/index.d.ts +2 -0
- package/dist/modules/Visitors/components/VisitorRoles/VisitorRoles.d.ts +13 -0
- package/dist/modules/Visitors/components/VisitorRoles/index.d.ts +2 -0
- package/dist/modules/Visitors/index.d.ts +1 -0
- package/dist/package.json.d.ts +13 -6
- package/dist/plitzi-builder.css +1 -1
- package/dist/plitzi-builder.css.gz +0 -0
- package/dist/plitzi-builder.js +2716 -2485
- package/dist/plitzi-builder.js.gz +0 -0
- package/dist/plitzi-functions-worker.js +6 -0
- package/package.json +26 -19
- package/dist/modules/AI/components/ChatInput/components/ButtonVoice/ButtonVoice.d.ts +0 -9
- package/dist/modules/AI/components/ChatInput/components/ButtonVoice/index.d.ts +0 -3
- package/dist/modules/AI/components/ToggleMode/components/ToggleItem/ToggleItem.d.ts +0 -10
- package/dist/modules/AI/components/ToggleMode/components/ToggleItem/index.d.ts +0 -3
- package/dist/modules/App/AppContainer/containers/ContainerIntegrations.d.ts +0 -2
- package/dist/modules/App/AppContainer/containers/ContainerMarketplace.d.ts +0 -2
- package/dist/modules/Marketplace/Marketplace.d.ts +0 -2
- package/dist/modules/Marketplace/components/MarketNews/MarketNews.d.ts +0 -2
- package/dist/modules/Marketplace/components/MarketNews/index.d.ts +0 -3
- package/dist/modules/Marketplace/components/MarketPlugins/MarketPlugins.d.ts +0 -2
- package/dist/modules/Marketplace/components/MarketPlugins/PluginDetails/DetailsContent.d.ts +0 -2
- package/dist/modules/Marketplace/components/MarketPlugins/PluginDetails/DetailsSidebar.d.ts +0 -19
- package/dist/modules/Marketplace/components/MarketPlugins/PluginDetails/PluginDetails.d.ts +0 -23
- package/dist/modules/Marketplace/components/MarketPlugins/PluginDetails/index.d.ts +0 -3
- package/dist/modules/Marketplace/components/MarketPlugins/PluginItem.d.ts +0 -14
- package/dist/modules/Marketplace/components/MarketPlugins/PluginList.d.ts +0 -7
- package/dist/modules/Marketplace/components/MarketPlugins/PluginsFilter/FilterCategory.d.ts +0 -9
- package/dist/modules/Marketplace/components/MarketPlugins/PluginsFilter/PluginsFilter.d.ts +0 -13
- package/dist/modules/Marketplace/components/MarketPlugins/PluginsFilter/index.d.ts +0 -3
- package/dist/modules/Marketplace/components/MarketPlugins/index.d.ts +0 -3
- package/dist/modules/Marketplace/components/MarketSidebar.d.ts +0 -6
- package/dist/modules/Marketplace/components/MarketSidebarItem.d.ts +0 -9
- package/dist/modules/Marketplace/components/MarketTemplates/MarketTemplates.d.ts +0 -2
- package/dist/modules/Marketplace/components/MarketTemplates/index.d.ts +0 -3
- package/dist/modules/Marketplace/helpers/PluginHelper.d.ts +0 -2
- package/dist/modules/Marketplace/index.d.ts +0 -3
- package/dist/modules/Marketplace/types/index.d.ts +0 -44
- package/dist/modules/Network/hooks/useInfiniteGraphQL.d.ts +0 -18
- package/dist/modules/Resources/Models/PluginSettingsForm.d.ts +0 -8
- package/dist/modules/Resources/components/Resource/subTypes/ResourceImage/ResourceImage.d.ts +0 -14
- package/dist/modules/Resources/components/Resource/subTypes/ResourceImage/index.d.ts +0 -3
- package/dist/modules/Resources/components/Resource/subTypes/ResourcePlugin/PluginContent.d.ts +0 -13
- package/dist/modules/Resources/components/Resource/subTypes/ResourceVideo/ResourceVideo.d.ts +0 -14
- package/dist/modules/Resources/components/Resource/subTypes/ResourceVideo/index.d.ts +0 -3
- package/dist/modules/Resources/components/ResourceManager/helpers/formatBytes.d.ts +0 -2
- package/dist/modules/Space/SpaceContext.d.ts +0 -3
- package/dist/modules/Space/SpaceContextProvider.d.ts +0 -6
- package/dist/modules/Space/helpers/elementsByRoot.d.ts +0 -19
- /package/dist/modules/{AI/components/ChatMessage/helpers/formatTime.d.ts → App/components/AppHeader/RuntimeIdleNotice/timeLeftOf.test.d.ts} +0 -0
- /package/dist/modules/{Integrations/Integrations.d.ts → Functions/editor/functionsEnvironment.test.d.ts} +0 -0
- /package/dist/modules/{Plugins/index.d.ts → Functions/editor/typescriptWorker.d.ts} +0 -0
- /package/dist/modules/{Space/helpers/elementsByRoot.test.d.ts → History/helpers.test.d.ts} +0 -0
- /package/dist/modules/{index.d.ts → Interactions/components/Workflow/helpers/whileRunning.test.d.ts} +0 -0
- /package/dist/modules/Resources/components/{ResourceManager/ResourceContent → ResourceContent}/ResourceContent.d.ts +0 -0
- /package/dist/modules/Resources/components/{ResourceManager/ResourceContent/contents → ResourceContent/components/ContentPlugin}/ContentPlugin.d.ts +0 -0
- /package/dist/modules/Resources/components/{ResourceManager/ResourceContent → ResourceContent}/index.d.ts +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RootElements } from '@plitzi/sdk-schema/helpers/elementTree';
|
|
2
|
+
import { ComponentDefinition, Schema } from '@plitzi/sdk-shared';
|
|
3
|
+
/** The plugin a plugin resource installed: the main one of the bundle its manifest roots. */
|
|
4
|
+
export declare const mainPluginOf: (plugins: Record<string, ComponentDefinition>, root: string) => ComponentDefinition | undefined;
|
|
5
|
+
/** Where the space places a plugin's elements — its own and the ones it ships inside it — page by page. */
|
|
6
|
+
export declare const pluginUsage: (flat: Schema["flat"], plugin: ComponentDefinition) => RootElements[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The space's runtime: its own server code, run as a process of its own beside the platform — for what functions
|
|
3
|
+
* cannot be (Node and its packages, connections that stay open, an agent's endpoint). Its code is pushed from the
|
|
4
|
+
* project that holds it (`plitzi runtime push`), which the panel says in so many words; here is how each environment's
|
|
5
|
+
* is doing, and what it starts with.
|
|
6
|
+
*/
|
|
7
|
+
declare const Runtime: () => import('react').JSX.Element;
|
|
8
|
+
export default Runtime;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type RuntimeCodeNoteProps = {
|
|
2
|
+
/** Whether the space has a runtime yet: without one, what a runtime is comes first. */
|
|
3
|
+
pushed: boolean;
|
|
4
|
+
/** How long a runtime may go unused before it is stopped; 0 when the platform never stops one. */
|
|
5
|
+
idleMinutes: number;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Where a runtime's code comes from, said where the question comes up: nothing in the builder changes it. It is a
|
|
9
|
+
* project of the space owner's own — Node, its packages — packed and pushed from there, and published with the space.
|
|
10
|
+
*/
|
|
11
|
+
declare const RuntimeCodeNote: ({ pushed, idleMinutes }: RuntimeCodeNoteProps) => import('react').JSX.Element;
|
|
12
|
+
export default RuntimeCodeNote;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SpaceRuntimeEnvironment, SpaceRuntimeSizeOption } from '@plitzi/sdk-shared';
|
|
2
|
+
export type RuntimeEnvironmentsProps = {
|
|
3
|
+
environments: SpaceRuntimeEnvironment[];
|
|
4
|
+
/** Every size there is, and which the space's plan includes. */
|
|
5
|
+
sizes: SpaceRuntimeSizeOption[];
|
|
6
|
+
/** How long a runtime may go unused before it is stopped; 0 when the platform never stops one. */
|
|
7
|
+
idleMinutes: number;
|
|
8
|
+
/** Asked once something changed, to read the runtime again. */
|
|
9
|
+
onChange: () => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
/** Every environment's runtime: which code, how it is, and what it serves — and taking the runtime away. */
|
|
12
|
+
declare const RuntimeEnvironments: ({ environments, sizes, idleMinutes, onChange }: RuntimeEnvironmentsProps) => import('react').JSX.Element;
|
|
13
|
+
export default RuntimeEnvironments;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SpaceRuntimeEnvironment } from '@plitzi/sdk-shared';
|
|
2
|
+
export type RuntimePowerProps = {
|
|
3
|
+
runtime: SpaceRuntimeEnvironment;
|
|
4
|
+
/** How long a runtime may go unused before it is stopped; 0 when the platform never stops one. */
|
|
5
|
+
idleMinutes: number;
|
|
6
|
+
/** Asked once it was started or stopped, to read the runtime again. */
|
|
7
|
+
onChange: () => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Starting and stopping an environment's runtime — the buttons held while a request is on its way and while the runtime
|
|
11
|
+
* is starting or stopping, which its status says — and saying when it stops by itself: a runtime nobody uses for a while
|
|
12
|
+
* is stopped so it spends nothing, and stays stopped until somebody starts it again, here or with a push or a publish.
|
|
13
|
+
*/
|
|
14
|
+
declare const RuntimePower: ({ runtime, idleMinutes, onChange }: RuntimePowerProps) => import('react').JSX.Element;
|
|
15
|
+
export default RuntimePower;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SpaceRuntimeEnvironment, SpaceRuntimeSizeOption } from '@plitzi/sdk-shared';
|
|
2
|
+
export type RuntimeSizeProps = {
|
|
3
|
+
environment: string;
|
|
4
|
+
/** The size it runs at, by name. */
|
|
5
|
+
size: string;
|
|
6
|
+
status: SpaceRuntimeEnvironment['status'];
|
|
7
|
+
sizes: SpaceRuntimeSizeOption[];
|
|
8
|
+
/** Asked once the size changed, to read the runtime again. */
|
|
9
|
+
onChange: () => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The size an environment's runtime runs at, and choosing another among those the space's plan includes. Nothing
|
|
13
|
+
* changes until it is applied — a restart is not something a slip of the select should cause — and while the runtime
|
|
14
|
+
* restarts at the new size, it says so.
|
|
15
|
+
*/
|
|
16
|
+
declare const RuntimeSize: ({ environment, size, status, sizes, onChange }: RuntimeSizeProps) => import('react').JSX.Element;
|
|
17
|
+
export default RuntimeSize;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type RuntimeVariablesProps = {
|
|
2
|
+
/** The variables it has, by name. */
|
|
3
|
+
names: string[];
|
|
4
|
+
onChange: () => Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* What the runtime starts with — a connection string, a key. Written here and never read back: a value is kept
|
|
8
|
+
* encrypted and handed to the runtime alone. Changing one starts the runtime again with it.
|
|
9
|
+
*/
|
|
10
|
+
declare const RuntimeVariables: ({ names, onChange }: RuntimeVariablesProps) => import('react').JSX.Element;
|
|
11
|
+
export default RuntimeVariables;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Runtime';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What is wrong with a template as it is being typed, in the words the linter uses on the saved space — or nothing.
|
|
3
|
+
*
|
|
4
|
+
* The runtime skips what it cannot read and renders a value nobody wrote, so the editor says so while the text is
|
|
5
|
+
* still in front of whoever wrote it, rather than after a save puts it in the problems list. Only the syntax: which
|
|
6
|
+
* names are in scope depends on where the template lands, and that is the saved-space check's to answer.
|
|
7
|
+
*/
|
|
8
|
+
export declare const templateProblem: (value: unknown) => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TSpaceIssues } from '@plitzi/sdk-shared';
|
|
2
|
+
export type SpaceIssuesProps = {
|
|
3
|
+
issues: TSpaceIssues;
|
|
4
|
+
/** Said above the list — why it is being shown, when that is not simply because someone asked. */
|
|
5
|
+
intro?: string;
|
|
6
|
+
/** Called once the list has served its purpose — someone went to an element, or had the fixable ones fixed. */
|
|
7
|
+
onDismiss: () => void;
|
|
8
|
+
/** Fixes what has one reading; offered only when something in the list has. */
|
|
9
|
+
onFix?: () => Promise<unknown>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Everything the linter found in the saved space: errors first, since they are what stops a publish, then what renders
|
|
13
|
+
* but most likely not as meant. Each one names its element and takes you to it.
|
|
14
|
+
*/
|
|
15
|
+
declare const SpaceIssues: ({ issues, intro, onDismiss, onFix }: SpaceIssuesProps) => import('react').JSX.Element;
|
|
16
|
+
export default SpaceIssues;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IssueSeverity } from '../../helpers';
|
|
2
|
+
import { TSpaceIssue } from '@plitzi/sdk-shared';
|
|
3
|
+
export type IssueGroupProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
issues: TSpaceIssue[];
|
|
6
|
+
severity: IssueSeverity;
|
|
7
|
+
onDismiss: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare const IssueGroup: ({ title, issues, severity, onDismiss }: IssueGroupProps) => import('react').JSX.Element | null;
|
|
10
|
+
export default IssueGroup;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IssueSeverity } from '../../helpers';
|
|
2
|
+
import { TSpaceIssue } from '@plitzi/sdk-shared';
|
|
3
|
+
export type IssueItemProps = {
|
|
4
|
+
issue: TSpaceIssue;
|
|
5
|
+
severity: IssueSeverity;
|
|
6
|
+
/** Called once the element is on screen, so whatever holds the list can get out of the way. */
|
|
7
|
+
onDismiss: () => void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* One issue, and the way to it: the element it names is a link that opens its page or layout, unfolds the tree down
|
|
11
|
+
* to it and selects it. An element deleted since the space was saved is named but not linked — there is nothing left
|
|
12
|
+
* to take anyone to, and the issue goes away with the next save.
|
|
13
|
+
*/
|
|
14
|
+
declare const IssueItem: ({ issue, severity, onDismiss }: IssueItemProps) => import('react').JSX.Element;
|
|
15
|
+
export default IssueItem;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TSpaceIssue, TSpaceIssues } from '@plitzi/sdk-shared';
|
|
2
|
+
/** What the server answers a publish of a space that would ship broken with, carrying the issues it found. */
|
|
3
|
+
export declare const SPACE_INVALID = "SPACE_INVALID";
|
|
4
|
+
/** Said above the list when it is shown instead of the publish someone asked for. */
|
|
5
|
+
export declare const PUBLISH_REFUSED = "This space cannot be published yet: what is listed under Errors would ship broken. Fix it, and publish again.";
|
|
6
|
+
export type IssuesLevel = 'clean' | 'warnings' | 'errors';
|
|
7
|
+
/**
|
|
8
|
+
* The issues a refused publish came back with, or undefined when it was refused for anything else — a plan ceiling, a
|
|
9
|
+
* network failure — which is told the way it always was.
|
|
10
|
+
*/
|
|
11
|
+
export declare const issuesFromError: (error: unknown) => TSpaceIssue[] | undefined;
|
|
12
|
+
/** How many of the issues `SpaceFixIssues` settles on its own — the ones with a single reading. */
|
|
13
|
+
export declare const fixableCount: (issues: TSpaceIssues) => number;
|
|
14
|
+
/** The worst thing in the list: errors stop a publish, warnings only ask to be looked at. */
|
|
15
|
+
export declare const levelOf: (issues: TSpaceIssues) => IssuesLevel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asks the server to fix every issue of the saved space that has one reading, and puts the result on screen.
|
|
3
|
+
*
|
|
4
|
+
* The fix is made where the document lives, so it is held to the same integrity as every save and reaches the other
|
|
5
|
+
* editors as a schema update. Here the returned schema is applied as a change that already happened on the server —
|
|
6
|
+
* from subscriptions — so the save queue does not send it straight back. Resolves with the changes made.
|
|
7
|
+
*/
|
|
8
|
+
declare const useFixSpaceIssues: () => () => Promise<import('@plitzi/sdk-shared/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation').TSpaceFix[]>;
|
|
9
|
+
export default useFixSpaceIssues;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TSpaceIssues } from '@plitzi/sdk-shared';
|
|
2
|
+
/**
|
|
3
|
+
* Opens the list of what is wrong with the space. The same list whether someone asked for it or a publish was refused
|
|
4
|
+
* over it — only the line above it changes — and following an element out of it closes it, so the element is what is
|
|
5
|
+
* left on screen.
|
|
6
|
+
*/
|
|
7
|
+
declare const useShowSpaceIssues: () => (issues: TSpaceIssues, intro?: string) => Promise<unknown>;
|
|
8
|
+
export default useShowSpaceIssues;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TSpaceIssues } from '@plitzi/sdk-shared';
|
|
2
|
+
/**
|
|
3
|
+
* What is wrong with the space as it is SAVED, read by the same linter the publish gate runs.
|
|
4
|
+
*
|
|
5
|
+
* Asked again each time the save queue drains, not on every edit: the server can only read what it holds, and the
|
|
6
|
+
* builder's own schema is ahead of it for as long as anything is still queued. `refresh` answers with the fresh list,
|
|
7
|
+
* for a caller that has to decide on it — publishing — rather than just show it.
|
|
8
|
+
*/
|
|
9
|
+
declare const useSpaceIssues: () => {
|
|
10
|
+
issues: TSpaceIssues | undefined;
|
|
11
|
+
error: Error | undefined;
|
|
12
|
+
refresh: () => Promise<TSpaceIssues | undefined>;
|
|
13
|
+
};
|
|
14
|
+
export default useSpaceIssues;
|
|
@@ -11,7 +11,6 @@ export type UndoableItem<TState = any, TDispatchAction = any> = {
|
|
|
11
11
|
nextState: TState;
|
|
12
12
|
prevState: TState;
|
|
13
13
|
};
|
|
14
|
-
export type UndoableDispatch = ActionDispatch<[action: UndoableReducerActions]>;
|
|
15
14
|
export type UndoableContextValue = {
|
|
16
15
|
canUndo: boolean;
|
|
17
16
|
canRedo: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who may do what here, as a visitor: the space's roles, and the people given them.
|
|
3
|
+
*
|
|
4
|
+
* The roles are the space's own — declared in its settings, published and exported with it. Who holds them is not:
|
|
5
|
+
* it is a list of people, kept by the platform, never in a document anybody can read.
|
|
6
|
+
*/
|
|
7
|
+
declare const Visitors: () => import('react').JSX.Element;
|
|
8
|
+
export default Visitors;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type VisitorGrantsProps = {
|
|
2
|
+
/** The roles the space declares, which are the only ones that can be given. */
|
|
3
|
+
roles: string[];
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Who holds which of the space's visitor roles, given by email.
|
|
7
|
+
*
|
|
8
|
+
* Nobody needs an account yet: a role given to an address waits until somebody signs in with it — verified — and is
|
|
9
|
+
* theirs from then on. Taking one back is immediate.
|
|
10
|
+
*/
|
|
11
|
+
declare const VisitorGrants: ({ roles }: VisitorGrantsProps) => import('react').JSX.Element;
|
|
12
|
+
export default VisitorGrants;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VisitorRoles as TVisitorRoles } from '@plitzi/sdk-shared/auth/visitorRoles';
|
|
2
|
+
export type VisitorRolesProps = {
|
|
3
|
+
/** The roles the space declares (`settings.visitorRoles`), as the builder's document holds them. */
|
|
4
|
+
roles: TVisitorRoles;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* The space's visitor roles and what each gives — the permissions an action's `access: 'role'` names.
|
|
8
|
+
*
|
|
9
|
+
* Saved as they are typed, and only when they are valid: a role the server would refuse is shown with what is wrong
|
|
10
|
+
* instead of being sent, so the document never holds a half-written role that grants something by accident.
|
|
11
|
+
*/
|
|
12
|
+
declare const VisitorRoles: ({ roles }: VisitorRolesProps) => import('react').JSX.Element;
|
|
13
|
+
export default VisitorRoles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Visitors';
|
package/dist/package.json.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"name": "@plitzi/plitzi-builder",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.4",
|
|
4
4
|
"homepage": "./",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"files": [
|
|
@@ -27,10 +27,13 @@ declare const _default: {
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@apollo/client": "^4.3.1",
|
|
30
|
+
"@codemirror/autocomplete": "^6",
|
|
31
|
+
"@codemirror/lint": "^6",
|
|
32
|
+
"@codemirror/state": "^6",
|
|
30
33
|
"@fortawesome/fontawesome-free": "^7.3.1",
|
|
31
|
-
"@plitzi/nexus": "^1.
|
|
34
|
+
"@plitzi/nexus": "^1.3.1",
|
|
32
35
|
"@plitzi/plitzi-sdk": "workspace:*",
|
|
33
|
-
"@plitzi/plitzi-ui": "^1.6.
|
|
36
|
+
"@plitzi/plitzi-ui": "^1.6.24",
|
|
34
37
|
"@plitzi/sdk-auth": "workspace:*",
|
|
35
38
|
"@plitzi/sdk-authoring": "workspace:*",
|
|
36
39
|
"@plitzi/sdk-dev-tools": "workspace:*",
|
|
@@ -44,9 +47,12 @@ declare const _default: {
|
|
|
44
47
|
"@plitzi/sdk-style": "workspace:*",
|
|
45
48
|
"@plitzi/sdk-variables": "workspace:*",
|
|
46
49
|
"@tanstack/react-virtual": "^3.14.13",
|
|
50
|
+
"@typescript/vfs": "^1.6.5",
|
|
51
|
+
"@valtown/codemirror-ts": "^2.3.1",
|
|
47
52
|
"@xyflow/react": "^12.11.6",
|
|
48
53
|
"apollo-upload-client": "^20.0.0",
|
|
49
54
|
"clsx": "^2.1.1",
|
|
55
|
+
"comlink": "^4.4.2",
|
|
50
56
|
"graphql": "^17.0.2",
|
|
51
57
|
"graphql-ws": "^6.2.2",
|
|
52
58
|
"immer": "^11.1.18",
|
|
@@ -72,6 +78,7 @@ declare const _default: {
|
|
|
72
78
|
"@babel/polyfill": "^7.12.1",
|
|
73
79
|
"@babel/preset-env": "^8.0.6",
|
|
74
80
|
"@babel/preset-react": "^8.0.1",
|
|
81
|
+
"@plitzi/sdk-server": "workspace:*",
|
|
75
82
|
"@tailwindcss/postcss": "^4.3.3",
|
|
76
83
|
"css-loader": "^7.1.5",
|
|
77
84
|
"eslint": "^9.39.5",
|
|
@@ -94,7 +101,7 @@ declare const _default: {
|
|
|
94
101
|
"stylelint-scss": "^7.3.0",
|
|
95
102
|
"terser": "^5.51.2",
|
|
96
103
|
"typescript": "^6.0.3",
|
|
97
|
-
"vite": "^8.3.
|
|
104
|
+
"vite": "^8.3.1",
|
|
98
105
|
"vite-plugin-dts": "^5.1.1",
|
|
99
106
|
"vite-plugin-ejs": "^2.0.0",
|
|
100
107
|
"vite-plugin-mkcert": "^2.1.0",
|
|
@@ -109,11 +116,11 @@ declare const _default: {
|
|
|
109
116
|
"lint-style": "stylelint \"**/*.scss\" --custom-syntax postcss-scss",
|
|
110
117
|
"lint-style:fix": "stylelint \"**/*.scss\" --custom-syntax postcss-scss --fix",
|
|
111
118
|
"typecheck": "tsc -p tsconfig.app.json --noEmit",
|
|
112
|
-
"build:dev": "tsc -p tsconfig.app.json --noEmit && vite build --mode development",
|
|
119
|
+
"build:dev": "tsc -p tsconfig.app.json --noEmit && vite build --mode development && vite build --config vite.functions-worker.config.ts --mode development",
|
|
113
120
|
"build:dev-watch": "tsc -p tsconfig.app.json --noEmit && vite build --mode development --watch",
|
|
114
121
|
"build:dev-gzip": "tsc -p tsconfig.app.json --noEmit && ONLY_GZIP=1 vite build --mode development",
|
|
115
122
|
"build:dev-analyze": "tsc -p tsconfig.app.json --noEmit && ONLY_ANALYZE=1 vite build --mode development",
|
|
116
|
-
"build:prod": "tsc -p tsconfig.app.json --noEmit && vite build",
|
|
123
|
+
"build:prod": "tsc -p tsconfig.app.json --noEmit && vite build && vite build --config vite.functions-worker.config.ts",
|
|
117
124
|
"build:prod-watch": "tsc -p tsconfig.app.json --noEmit && vite build --watch",
|
|
118
125
|
"build:prod-gzip": "tsc -p tsconfig.app.json --noEmit && ONLY_GZIP=1 vite build",
|
|
119
126
|
"build:prod-analyze": "tsc -p tsconfig.app.json --noEmit && ONLY_ANALYZE=1 vite build",
|