@plitzi/sdk-authoring 0.38.15 → 0.38.17
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 +102 -0
- package/dist/index-src.js +14053 -14094
- package/dist/index.js +1 -1
- package/dist/node.d.ts +2 -2
- package/dist/node.js +28 -8
- package/dist/plugin.js +1 -2
- package/package.json +13 -10
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as explainKindOf, $i as twig, $n as whenFailed, $r as dropdown, $t as expandShorthandPatch, A as onScreen, Aa as s, Ai as element, An as cancelServerAction, Ar as publishOn, At as createTw, B as catalogTemplateFiles, Bi as hasVisibilityBinding, Bn as runServerAction, Br as withPluginCatalogs, Bt as isStyleDeclaration, C as diffPictures, Ca as i$2, Ci as text, Cn as getUtility, Cr as onLoad, Ct as refusalOf, D as unrollPage, Da as a, Di as defaultAttributes, Dn as authLogin, Dr as onSubmit, Dt as withNotificationsCss, E as loadImages, Ea as t$3, Ei as component, En as appendState, Er as onScroll, Et as notificationsCss, F as dataIssues, Fa as t, Fi as activeWhen, Fn as hostAction, Fr as scrollTo, Ft as className, G as darkScheme, Gi as visibleWhen, Gn as toggleState, Gr as blockJsx, Gt as STYLE_STATES, H as toPortableSource, Hi as resolveSource, Hn as setState, Hr as i, Ht as splitClassList, I as answerAction, Ia as a$2, Ii as authorBinding, In as invalidateQueries, Ir as setFieldValue, It as classNames, J as importProbe, Ji as r, Jn as authorFlow, Jr as carouselTrack, Jt as sameBlocks, K as importSlug, Ki as withVisibility, Kn as twigTemplate, Kr as button, Kt as css, L as CATALOG_TEMPLATE_IDENTITY, La as i$3, Li as bindTemplate, Ln as moveState, Lr as toggleElement, Lt as classRefs, M as failedFlowText, Ma as n$1, Mi as COMPONENT_SOURCES, Mn as copyToClipboard, Mr as resetForm, Mt as column, N as readDevTools, Na as r$3, Ni as GLOBAL_SOURCES, Nn as cycleState, Nr as scrollBy, Nt as grid, O as inspectDocument, Oa as i$1, Oi as defaultLabel, On as authLogout, Or as openDialog, Ot as FIXABLE_CODES, P as readDevToolsInPage, Pa as s$1, Pi as activeOn, Pn as delay, Pr as scrollIntoView, Pt as row, Q as explain, Qi as source, Qn as when, Qr as dialogContainer, Qt as expandShorthand, R as blankSpace, Ra as o$1, Ri as boundAttribute, Rn as navigate, Rr as updateElement, Rt as isClassModifier, S as comparePictures, Sa as e, Si as tabContainerItem, Sn as applyUtility, Sr as onKey, St as SpaceRefusedError, T as profilePictures, Ta as r$1, Ti as video, Tn as addNotification, Tr as onPointerDown, Tt as pageFamily, U as space$1, Ui as toBindingSpecs, Un as stepState, Ur as apiContainer, Ut as styles, V as emptyTemplateFiles, Vi as hiddenWhen, Vn as runServerActionOrNotify, Vr as d, Vt as modifierClassName, W as space, Wi as variantFrom, Wn as toggleInState, Wr as blockHtml, Wt as BREAKPOINTS, X as EXPLAIN_KINDS, Xn as flowStepIds, Xr as container, Xt as toResponsive, Y as BUILDER_NAMES, Yi as t$2, Yn as authorFlows, Yr as channel, Yt as toBlocks, Z as GLOBAL_CALLBACK_BUILDERS, Zi as actionSource, Zn as named, Zr as custom, Zt as cssShorthands, _ as summariseRenders, _a as typeCallbackDefinitions, _i as richText, _n as flagSpecOf, _r as onClick, _t as assertSpaceValid, a as locateClasses, aa as isSuggestionCode, ai as heading, an as isCssProperty, ar as announceOn, at as SCHEMA_SETTINGS, b as pageTexts, ba as t$1, bi as tabContainerBody, bn as taskAction, br as onFlowProgress, bt as suggestClassOverrides, c as validateSnippet, ca as elementCallbacks, ci as list, cr as carouselNext, ct as actionSpecFromEntry, d as singlePageSpace, da as elementLeafTypes, di as modalContainer, dn as buildHandles, dr as carouselPrevious, dt as BUILTIN_TRANSFORMERS, ea as closest, ei as dropdownPopup, en as expandShorthandTraced, er as whenSucceeded, et as explainList, f as withElement, fa as elementPartTypes, fi as nodeHtml, fn as instanceSelectorFor, fr as closeDialog, ft as getTransformer, g as inspectRenders, ga as elementTypeNames, gi as reference, gn as flagGateOf, gr as on, gt as PAGE_SPEC_FIELDS, h as openPage, ha as elementTriggers, hi as plitziSdk, hn as selectorFor, hr as declaredTrigger, ht as assertSnippetValid, i as lintSpace, ia as authoringCodeEntry, ii as formControl, in as cssPropertyName, ir as getGlobalCallback, it as specToSource, j as onScreenIfChosen, ja as c, ji as inferredLinkMode, jn as clearState, jr as reloadApi, jt as tw, k as inspectPage, ka as o, ki as defineElement, kn as authRefreshDetails, kr as openModal, kt as tokens, l as validateSpace, la as elementCatalog, li as listItem, ln as digest, lr as carouselPause, lt as actionToSource, m as shortcutKey, ma as elementSourceTypes, mi as paragraph, mn as pathForSlug, mr as declaredCallback, mt as transformerCatalog, n as authorSpace, na as AUTHORING_CODES, ni as fontAwesome, nn as cssNumberValue, nr as BUILTIN_GLOBAL_CALLBACKS, nt as ELEMENT_FIELDS, o as locateElements, oa as elementAncestorTypes, oi as image, on as isCustomProperty, or as cancelApi, ot as specFromSpace, p as pressShortcut, pa as elementSlots, pi as pagination, pn as locate, pr as closeModal, pt as suggestTransformer, q as importedFiles, qi as n, qn as webHook, qr as carousel, qt as isRuleSetSpec, r as fixSpace, ra as AuthoringError, ri as form, rn as cssProperties, rr as applyBuiltinCallback, rt as SPACE_FIELDS, s as planFixes, sa as elementAttributeValues, si as link, sn as suggestCssProperty, sr as carouselGoTo, st as compareSpaces, t as authorSnippet, ta as scope, ti as embed, tn as shorthandLonghands, tr as whileRunning, tt as explanationText, u as compactSvg, ua as elementDefaultAttributes, ui as markdown, un as slugify, ur as carouselPlay, ut as withNamedIds, v as PAGE_TEXT_LIMIT, va as typeTriggerDefinitions, vi as svg, vn as authoringCodesTable, vr as onFlowEnd, vt as suggestSpace, w as pageRegions, wa as n$3, wi as themeToggle, wn as SET_STATE_TYPES, wr as onPageLoad, wt as familyOf, x as alignPictures, xa as elementAttributeNames, xi as tabContainerHeader, xn as BUILTIN_UTILITIES, xr as onInterval, xt as unusedDeclarations, y as compareTexts, ya as n$2, yi as tabContainer, yn as defineAction, yr as onFlowError, yt as withoutQuieted, z as blankTemplateFiles, zi as groupBindings, zn as removeState, zr as elementsFromManifest, zt as isClassRef } from "./index-src.js";
|
|
2
2
|
import { n as e$1, r as r$2, t as a$1 } from "./index-declare.js";
|
|
3
3
|
export { AUTHORING_CODES, AuthoringError, BREAKPOINTS, BUILDER_NAMES, a as BUILTIN_ELEMENT_CALLBACKS, BUILTIN_GLOBAL_CALLBACKS, t as BUILTIN_PARAM_TYPES, BUILTIN_TRANSFORMERS, BUILTIN_UTILITIES, CATALOG_TEMPLATE_IDENTITY, COMPONENT_SOURCES, t$1 as DOCUMENT_SCROLLS, ELEMENT_FIELDS, EXPLAIN_KINDS, FIXABLE_CODES, GLOBAL_CALLBACK_BUILDERS, GLOBAL_SOURCES, t$2 as MOTION_ENTERS, r as MOTION_LOOPS, n as MOTION_TRIGGERS, i as NOTIFICATIONS_FIELDS, t$3 as NOTIFICATION_APPEARANCES, r$1 as NOTIFICATION_DEFAULTS, e as NOTIFICATION_PLACEMENTS, PAGE_SPEC_FIELDS, PAGE_TEXT_LIMIT, SCHEMA_SETTINGS, i$1 as SCROLL_CALLBACKS, SET_STATE_TYPES, SPACE_FIELDS, STYLE_STATES, SpaceRefusedError, actionSource, actionSpecFromEntry, actionToSource, activeOn, activeWhen, addNotification, alignPictures, announceOn, answerAction, apiContainer, appendState, applyBuiltinCallback, s as applyElementCallback, applyUtility, assertSnippetValid, assertSpaceValid, authLogin, authLogout, authRefreshDetails, authorBinding, authorFlow, authorFlows, authorSnippet, authorSpace, authoringCodeEntry, authoringCodesTable, bindTemplate, blankSpace, space as blankSpaceSpec, blankTemplateFiles, blockHtml, blockJsx, boundAttribute, buildHandles, button, cancelApi, cancelServerAction, carousel, carouselGoTo, carouselNext, carouselPause, carouselPlay, carouselPrevious, carouselTrack, catalogTemplateFiles, channel, className, classNames, classRefs, clearState, closeDialog, closeModal, closest, column, compactSvg, comparePictures, compareSpaces, compareTexts, component, container, copyToClipboard, createTw, css, cssNumberValue, cssProperties, cssPropertyName, cssShorthands, custom, cycleState, darkScheme, dataIssues, declaredCallback, declaredTrigger, defaultAttributes, defaultLabel, defineAction, defineElement, a$1 as definePlugin, delay, dialogContainer, diffPictures, digest, dropdown, dropdownPopup, element, elementAncestorTypes, elementAttributeNames, elementAttributeValues, elementCallbacks, elementCatalog, r$2 as elementDeclaration, elementDefaultAttributes, elementLeafTypes, elementPartTypes, elementSlots, elementSourceTypes, elementTriggers, elementTypeNames, elementsFromManifest, embed, space$1 as emptySpaceSpec, emptyTemplateFiles, expandShorthand, expandShorthandPatch, expandShorthandTraced, explain, explainKindOf, explainList, explanationText, failedFlowText, familyOf, fixSpace, flagGateOf, flagSpecOf, flowStepIds, fontAwesome, form, formControl, o as getElementCallback, getGlobalCallback, getTransformer, getUtility, grid, groupBindings, hasVisibilityBinding, heading, n$1 as hiddenParams, hiddenWhen, hostAction, image, importProbe, importSlug, importedFiles, inferredLinkMode, inspectDocument, inspectPage, inspectRenders, instanceSelectorFor, s$1 as invalidParams, invalidateQueries, isClassModifier, isClassRef, isCssProperty, isCustomProperty, n$2 as isDocumentScroll, isRuleSetSpec, isStyleDeclaration, isSuggestionCode, link, lintSpace, list, listItem, loadImages, locate, locateClasses, locateElements, markdown, r$3 as missingRequiredParams, modalContainer, modifierClassName, moveState, named, navigate, nodeHtml, notificationsCss, on, onClick, onFlowEnd, onFlowError, onFlowProgress, onInterval, onKey, onLoad, onPageLoad, onPointerDown, onScreen, onScreenIfChosen, onScroll, onSubmit, openDialog, openModal, openPage, pageFamily, pageRegions, pageTexts, pagination, paragraph, pathForSlug, planFixes, plitziSdk, pressShortcut, profilePictures, publishOn, readDevTools, readDevToolsInPage, n$3 as readNotificationOptions, c as reconcileParams, reference, refusalOf, reloadApi, removeState, resetForm, resolveSource, richText, row, runServerAction, runServerActionOrNotify, sameBlocks, scope, scrollBy, scrollIntoView, scrollTo, selectorFor, setFieldValue, setState, shortcutKey, shorthandLonghands, singlePageSpace, slugify, source, i$2 as spaceCallbacks, specFromSpace, specToSource, splitClassList, d as splitNotificationsCss, stepState, styles, suggestClassOverrides, suggestCssProperty, suggestSpace, suggestTransformer, summariseRenders, svg, tabContainer, tabContainerBody, tabContainerHeader, tabContainerItem, taskAction, text, themeToggle, toBindingSpecs, toBlocks, i$3 as toBuilderParams, a$2 as toInteractionCallback, o$1 as toInteractionCallbacks, toPortableSource, toResponsive, toggleElement, toggleInState, toggleState, tokens, transformerCatalog, tw, twig, twigTemplate, typeCallbackDefinitions, typeTriggerDefinitions, unrollPage, unusedDeclarations, updateElement, validateSnippet, validateSpace, e$1 as valuesOf, variantFrom, video, visibleWhen, webHook, when, whenFailed, whenSucceeded, whileRunning, withElement, withNamedIds, withNotificationsCss, withPluginCatalogs, withVisibility, withoutQuieted };
|
package/dist/node.d.ts
CHANGED
|
@@ -2112,9 +2112,9 @@ export declare type ProjectAuthoring = {
|
|
|
2112
2112
|
*
|
|
2113
2113
|
* A folder the project does not have is nothing to check against. The project is the working directory — its scripts
|
|
2114
2114
|
* run there, `npm start` and `npm run author` alike — and a process started anywhere else is refused, saying what is
|
|
2115
|
-
* missing (`projectRoot` of `@plitzi/sdk-shared/project
|
|
2115
|
+
* missing (`projectRoot` of `@plitzi/sdk-shared/project`, the check its server makes too). So is a project laid out
|
|
2116
2116
|
* where nothing reads it — a plugin folder with no `index.ts`, code in `src/plugin/`, `.env` in `src/` — every error at
|
|
2117
|
-
* once (`assertProjectLayout` of `@plitzi/sdk-shared/project
|
|
2117
|
+
* once (`assertProjectLayout` of `@plitzi/sdk-shared/project`, what its server and `plitzi doctor` say too).
|
|
2118
2118
|
*
|
|
2119
2119
|
* ```ts
|
|
2120
2120
|
* authorSpace(space, await projectAuthoring());
|
package/dist/node.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Xi as e, cn as e$1, dn as buildHandles, l as validateSpace, n as authorSpace, u as compactSvg } from "./index-src.js";
|
|
2
2
|
import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
3
3
|
import m from "node:path";
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -357,7 +357,7 @@ var X = (e, t) => J(e, t).flatMap(({ at: t, reads: n, holds: r }) => Y(e, t).map
|
|
|
357
357
|
return a ? y("folder-misplaced", `${i}/`, `${i}/ holds ${a}, and nothing reads it there — ${s}`, c, l) : y("folder-near-miss", `${i}/`, `${i}/ is read by nothing — ${s}`, c, l);
|
|
358
358
|
}));
|
|
359
359
|
var re = (e, n) => {
|
|
360
|
-
if (!C(e,
|
|
360
|
+
if (!C(e, "src/space/index.ts", "file")) return n.some((e) => e.code === "folder-misplaced" && e.autofix?.action === "move" && e.autofix.to === "src/space/") ? [] : L(e, {
|
|
361
361
|
folder: i$1,
|
|
362
362
|
accepted: ["index.ts"],
|
|
363
363
|
code: "space-entry-missing",
|
|
@@ -402,9 +402,9 @@ var Z = (t) => {
|
|
|
402
402
|
return !1;
|
|
403
403
|
}
|
|
404
404
|
};
|
|
405
|
-
var le = (e,
|
|
406
|
-
mode:
|
|
407
|
-
space:
|
|
405
|
+
var le = (e, t) => ({
|
|
406
|
+
mode: t.mode ?? (Z(e) ? "server" : "client"),
|
|
407
|
+
space: t.space ?? (C(e, "src/space", "folder") || C(e, "plitzi/author.ts", "file") ? "local" : "cloud")
|
|
408
408
|
});
|
|
409
409
|
var Q = (e, t = {}) => {
|
|
410
410
|
let n = le(e, t), i = X(e, n), a = [
|
|
@@ -804,9 +804,9 @@ var pluginStylesheets = (folder) => existsSync(folder) ? readdirSync(folder, {
|
|
|
804
804
|
*
|
|
805
805
|
* A folder the project does not have is nothing to check against. The project is the working directory — its scripts
|
|
806
806
|
* run there, `npm start` and `npm run author` alike — and a process started anywhere else is refused, saying what is
|
|
807
|
-
* missing (`projectRoot` of `@plitzi/sdk-shared/project
|
|
807
|
+
* missing (`projectRoot` of `@plitzi/sdk-shared/project`, the check its server makes too). So is a project laid out
|
|
808
808
|
* where nothing reads it — a plugin folder with no `index.ts`, code in `src/plugin/`, `.env` in `src/` — every error at
|
|
809
|
-
* once (`assertProjectLayout` of `@plitzi/sdk-shared/project
|
|
809
|
+
* once (`assertProjectLayout` of `@plitzi/sdk-shared/project`, what its server and `plitzi doctor` say too).
|
|
810
810
|
*
|
|
811
811
|
* ```ts
|
|
812
812
|
* authorSpace(space, await projectAuthoring());
|
|
@@ -849,10 +849,30 @@ var ProjectModuleError = class extends Error {
|
|
|
849
849
|
}
|
|
850
850
|
};
|
|
851
851
|
Object.defineProperty(ProjectModuleError, "name", { value: "ProjectModuleError" });
|
|
852
|
+
/**
|
|
853
|
+
* A line of an error's message that is itself the problem, at its place: what a bundler's transform says under its
|
|
854
|
+
* summary — `Transform failed with 1 error:` then `/work/shop/src/space/hero.ts:139:12: ERROR: Expected ","` (esbuild,
|
|
855
|
+
* so tsx and vitest).
|
|
856
|
+
*/
|
|
857
|
+
var LOCATED_LINE = /^(\/[^\s:()]+\.(?:tsx?|m?js|json)):(\d+)(?::\d+)?:\s*(?:ERROR:\s*)?(.+)$/;
|
|
858
|
+
/** A path as it is on disk, links resolved — or as given, for one that is not there. */
|
|
859
|
+
var realOf = (file) => {
|
|
860
|
+
try {
|
|
861
|
+
return realpathSync(file);
|
|
862
|
+
} catch {
|
|
863
|
+
return file;
|
|
864
|
+
}
|
|
865
|
+
};
|
|
852
866
|
/** Where in the project's own files an error points first, and what it says: a module that did not load, located. */
|
|
853
867
|
var moduleProblem = (error, root) => {
|
|
868
|
+
const roots = [root, realOf(root)];
|
|
869
|
+
const ownFile = (file) => [file, realOf(file)].some((each) => roots.some((at) => each.startsWith(at))) && !file.includes("/node_modules/");
|
|
870
|
+
if (error instanceof Error) {
|
|
871
|
+
const located = error.message.split("\n").map((line) => LOCATED_LINE.exec(line.trim())).find((match) => match !== null && ownFile(match[1]));
|
|
872
|
+
if (located) return `${m.relative(process.cwd(), located[1])}:${located[2]}: ${located[3]}`;
|
|
873
|
+
}
|
|
854
874
|
const message = error instanceof Error ? error.message.split("\n")[0] : String(error);
|
|
855
|
-
const frame = (error instanceof Error ? error.stack ?? "" : "").split("\n").map((line) => /(?:file:\/\/)?(\/[^\s:()]+\.(?:tsx?|m?js|json)):(\d+)/.exec(line)).find((match) => match !== null &&
|
|
875
|
+
const frame = (error instanceof Error ? error.stack ?? "" : "").split("\n").map((line) => /(?:file:\/\/)?(\/[^\s:()]+\.(?:tsx?|m?js|json)):(\d+)/.exec(line)).find((match) => match !== null && ownFile(match[1]));
|
|
856
876
|
const at = frame ? `${m.relative(process.cwd(), frame[1])}:${frame[2]}` : void 0;
|
|
857
877
|
return at ? `${at}: ${message}` : message;
|
|
858
878
|
};
|
package/dist/plugin.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { a as definePlugin };
|
|
1
|
+
export { t as definePlugin } from "./index-declare.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-authoring",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.17",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/index.js",
|
|
@@ -17,16 +17,19 @@
|
|
|
17
17
|
"types": "dist/index.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
|
+
"@plitzi/source": "./src/index.ts",
|
|
20
21
|
"types": "./dist/index.d.ts",
|
|
21
22
|
"import": "./dist/index.js",
|
|
22
23
|
"default": "./dist/index.js"
|
|
23
24
|
},
|
|
24
25
|
"./node": {
|
|
26
|
+
"@plitzi/source": "./src/node.ts",
|
|
25
27
|
"types": "./dist/node.d.ts",
|
|
26
28
|
"import": "./dist/node.js",
|
|
27
29
|
"default": "./dist/node.js"
|
|
28
30
|
},
|
|
29
31
|
"./plugin": {
|
|
32
|
+
"@plitzi/source": "./src/plugin.ts",
|
|
30
33
|
"types": "./dist/plugin.d.ts",
|
|
31
34
|
"import": "./dist/plugin.js",
|
|
32
35
|
"default": "./dist/plugin.js"
|
|
@@ -59,19 +62,19 @@
|
|
|
59
62
|
}
|
|
60
63
|
},
|
|
61
64
|
"devDependencies": {
|
|
62
|
-
"@microsoft/api-extractor": "^7.59.
|
|
65
|
+
"@microsoft/api-extractor": "^7.59.4",
|
|
63
66
|
"@plitzi/plitzi-ui": "^1.6.33",
|
|
64
|
-
"@plitzi/sdk-elements": "0.38.
|
|
65
|
-
"@plitzi/sdk-interactions": "0.38.
|
|
66
|
-
"@plitzi/sdk-schema": "0.38.
|
|
67
|
-
"@plitzi/sdk-shared": "0.38.
|
|
68
|
-
"@plitzi/sdk-style": "0.38.
|
|
67
|
+
"@plitzi/sdk-elements": "0.38.17",
|
|
68
|
+
"@plitzi/sdk-interactions": "0.38.17",
|
|
69
|
+
"@plitzi/sdk-schema": "0.38.17",
|
|
70
|
+
"@plitzi/sdk-shared": "0.38.17",
|
|
71
|
+
"@plitzi/sdk-style": "0.38.17",
|
|
69
72
|
"@types/react": "^19.3.0",
|
|
70
73
|
"eslint": "^9.39.5",
|
|
71
|
-
"prettier": "^3.9.
|
|
74
|
+
"prettier": "^3.9.10",
|
|
72
75
|
"typescript": "^6.0.3",
|
|
73
|
-
"vite": "^8.3.
|
|
76
|
+
"vite": "^8.3.4",
|
|
74
77
|
"vite-plugin-dts": "^5.1.2",
|
|
75
|
-
"vitest": "^5.0.
|
|
78
|
+
"vitest": "^5.0.5"
|
|
76
79
|
}
|
|
77
80
|
}
|