@plitzi/sdk-authoring 0.35.3 → 0.35.5
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 +12 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.js +18 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4551,6 +4551,11 @@ declare type InteractionCallbackParam<T extends Record<string, unknown> = Record
|
|
|
4551
4551
|
canBind?: boolean;
|
|
4552
4552
|
label?: string;
|
|
4553
4553
|
when?: boolean | ((params: InteractionCallbackParamValues<T>) => boolean);
|
|
4554
|
+
/**
|
|
4555
|
+
* This param names one of the space's credentials, of this provider. Serializable on purpose: an editor offers the
|
|
4556
|
+
* space's credentials of that kind to pick from, rather than a text box somebody has to type an identifier into.
|
|
4557
|
+
*/
|
|
4558
|
+
credentialProvider?: SpaceCredentialProvider;
|
|
4554
4559
|
} & ({
|
|
4555
4560
|
type: 'text';
|
|
4556
4561
|
defaultValue?: string | number;
|
|
@@ -5331,7 +5336,7 @@ export declare const richText: ElementFactory<Partial<{
|
|
|
5331
5336
|
|
|
5332
5337
|
export declare const row: (gap: string, extra?: CssProps) => StyleRules;
|
|
5333
5338
|
|
|
5334
|
-
declare type Rule = {
|
|
5339
|
+
export declare type Rule = {
|
|
5335
5340
|
id?: string;
|
|
5336
5341
|
field: string;
|
|
5337
5342
|
operator: Operator;
|
|
@@ -5344,7 +5349,7 @@ declare type Rule = {
|
|
|
5344
5349
|
value: RuleValue;
|
|
5345
5350
|
});
|
|
5346
5351
|
|
|
5347
|
-
declare type RuleGroup = {
|
|
5352
|
+
export declare type RuleGroup = {
|
|
5348
5353
|
id?: string;
|
|
5349
5354
|
combinator: Combinator;
|
|
5350
5355
|
rules: (Rule | RuleGroup)[];
|
|
@@ -5517,6 +5522,8 @@ export declare type SourceTypes = Record<string, string>;
|
|
|
5517
5522
|
*/
|
|
5518
5523
|
export declare const spaceCallbacks: Record<string, BuiltinGlobalCallback>;
|
|
5519
5524
|
|
|
5525
|
+
declare type SpaceCredentialProvider = 's3' | 'r2' | 'ssr' | 'custom' | 'smtp';
|
|
5526
|
+
|
|
5520
5527
|
/**
|
|
5521
5528
|
* Whether a pair of documents is a space that can be served.
|
|
5522
5529
|
*
|
package/dist/index.js
CHANGED
|
@@ -6101,6 +6101,23 @@ var SpaceAuthor = class {
|
|
|
6101
6101
|
details: { properties: skipped }
|
|
6102
6102
|
});
|
|
6103
6103
|
}
|
|
6104
|
+
/**
|
|
6105
|
+
* A provider dressed with a class it will never wear.
|
|
6106
|
+
*
|
|
6107
|
+
* An `apiContainer` whose `subType` is left empty — the builder's "Container Tag: None" — renders its children and
|
|
6108
|
+
* no element of its own, so its class and css style nothing and its id finds nothing on the page. Found three times
|
|
6109
|
+
* on real spaces: a counter card with no card, a sticky sidebar that did not stick, a map layer positioned nowhere.
|
|
6110
|
+
* A warning and not a refusal, because a provider with no tag is legal and often right; one with styles is not.
|
|
6111
|
+
*/
|
|
6112
|
+
warnStyleWithoutTag(spec, where) {
|
|
6113
|
+
const subType = spec.attributes?.subType;
|
|
6114
|
+
if (spec.type !== "apiContainer" || typeof subType === "string" && subType !== "" || !spec.class && !spec.css) return;
|
|
6115
|
+
this.styleWarnings.push({
|
|
6116
|
+
code: "provider-style-without-tag",
|
|
6117
|
+
message: `${where} has ${spec.class ? "a class" : "css"} but no \`subType\`, so it renders no element of its own and the style applies to nothing. Give it a tag — \`subType: 'div'\`, or \`section\`, \`aside\`… — or move the style onto a child.`,
|
|
6118
|
+
details: { type: spec.type }
|
|
6119
|
+
});
|
|
6120
|
+
}
|
|
6104
6121
|
writeSelector(name, responsive, where) {
|
|
6105
6122
|
this.warnTabletOnly(responsive, where);
|
|
6106
6123
|
for (const breakpoint of BREAKPOINTS) {
|
|
@@ -6275,6 +6292,7 @@ var SpaceAuthor = class {
|
|
|
6275
6292
|
this.assertStepsKnown(spec.flows, where);
|
|
6276
6293
|
const bindings = withVisibility(spec);
|
|
6277
6294
|
const sourceIndex = this.options.sourceTypes ? this.sources : void 0;
|
|
6295
|
+
this.warnStyleWithoutTag(spec, where);
|
|
6278
6296
|
const element = {
|
|
6279
6297
|
id,
|
|
6280
6298
|
attributes: spec.attributes ?? {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-authoring",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.5",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/index.js",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@microsoft/api-extractor": "^7.59.1",
|
|
46
46
|
"@plitzi/plitzi-ui": "^1.6.21",
|
|
47
|
-
"@plitzi/sdk-elements": "0.35.
|
|
48
|
-
"@plitzi/sdk-interactions": "0.35.
|
|
49
|
-
"@plitzi/sdk-schema": "0.35.
|
|
50
|
-
"@plitzi/sdk-shared": "0.35.
|
|
51
|
-
"@plitzi/sdk-style": "0.35.
|
|
47
|
+
"@plitzi/sdk-elements": "0.35.5",
|
|
48
|
+
"@plitzi/sdk-interactions": "0.35.5",
|
|
49
|
+
"@plitzi/sdk-schema": "0.35.5",
|
|
50
|
+
"@plitzi/sdk-shared": "0.35.5",
|
|
51
|
+
"@plitzi/sdk-style": "0.35.5",
|
|
52
52
|
"@types/react": "^19.3.0",
|
|
53
53
|
"eslint": "^9.39.5",
|
|
54
54
|
"typescript": "^6.0.3",
|