@wix/himalaya-cli 0.1472.0 → 0.1474.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.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +6 -9
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +36 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/auth-gate-screen.d.ts +29 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +42 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +50 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +16 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +26 -0
- package/dist/cli.mjs +6077 -5726
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +12 -2
- package/guides/component-reference.md +51 -2
- package/guides/index.json +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import type { IncomingMessage, ServerResponse } from "node:http";
|
|
|
2
2
|
import type { DerivedAppMeta } from "./app-module.js";
|
|
3
3
|
import { type WixCachePolicy } from "./wix-cache-policy.js";
|
|
4
4
|
import type { NetMocksFile, WixMockRule } from "./wix-gateway.js";
|
|
5
|
-
import { gateScreenIdProblem } from "../../ts/src/auth-gate-screen.js";
|
|
5
|
+
import { gateScreenIdProblem, liftAuthBlock } from "../../ts/src/auth-gate-screen.js";
|
|
6
6
|
import { type UnmappedPushDestination } from "../../ts/src/wix-push-links.js";
|
|
7
7
|
import type { PushConfig, FlagConfig, AppControl, TabBarConfig, DrawerConfig, SidebarConfig, SplashConfig, LocaleConfig, NavKind, OrientationConfig, StreamPolicy } from "@wix/himalaya/core";
|
|
8
8
|
export type { PushConfig, FlagConfig, AppControl, TabBarConfig, DrawerConfig, SidebarConfig, SplashConfig, LocaleConfig, NavKind, OrientationConfig, StreamPolicy };
|
|
@@ -202,14 +202,11 @@ export { gateScreenIdProblem };
|
|
|
202
202
|
/** Derive the OTA authConfig block from a defineApp auth block
|
|
203
203
|
* ({ providerId, config }). `required` is read from `config.required === true`
|
|
204
204
|
* and lifted to the top level, as is `config.gateScreenId` (#4651); secret-ish
|
|
205
|
-
* keys are scrubbed
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
* `himalaya-dev app validate` is where a bad id fails ([gateScreenIdProblem]). */
|
|
209
|
-
export declare function deriveAuthConfig(auth:
|
|
210
|
-
providerId: string;
|
|
211
|
-
config: Record<string, unknown>;
|
|
212
|
-
} | undefined, screenIds?: readonly string[]): AuthConfigBlock | undefined;
|
|
205
|
+
* keys are scrubbed — the same `liftAuthBlock` the auth bake runs (#4818). When
|
|
206
|
+
* the app's screens are given, a `gateScreenId` naming none of them is DROPPED
|
|
207
|
+
* (the shell falls back to the stock login) and warned about — never thrown: this
|
|
208
|
+
* runs on every app-config serve and hot reload, and `himalaya-dev app validate` is where a bad id fails ([gateScreenIdProblem]). */
|
|
209
|
+
export declare function deriveAuthConfig(auth: Parameters<typeof liftAuthBlock>[0], screenIds?: readonly string[]): AuthConfigBlock | undefined;
|
|
213
210
|
/** Derive a baseline NavigationConfig from the loaded app's derived meta. */
|
|
214
211
|
/** What `deriveNavigationConfig` needs to finish an app-level nav bundle ref.
|
|
215
212
|
*
|
|
@@ -368,6 +368,42 @@ export declare function donutChart(props: {
|
|
|
368
368
|
}, opts?: {
|
|
369
369
|
id?: string;
|
|
370
370
|
}): Component;
|
|
371
|
+
/** RFC 0065 §5 — the kinds a {@link shape} draws and `modifiers.clipShape` clips to. */
|
|
372
|
+
export type ShapeKind = "rectangle" | "roundedRectangle" | "capsule" | "circle" | "ellipse";
|
|
373
|
+
/** RFC 0065 §5 — per-corner radii in layout direction (mirror in RTL). */
|
|
374
|
+
export interface CornerRadiiSpec {
|
|
375
|
+
topLeading?: number;
|
|
376
|
+
topTrailing?: number;
|
|
377
|
+
bottomLeading?: number;
|
|
378
|
+
bottomTrailing?: number;
|
|
379
|
+
}
|
|
380
|
+
/** RFC 0065 §5 — a basic shape: fill (token or inline gradient) and an optionally dashed
|
|
381
|
+
* stroke drawn INSIDE its bounds. Size it with `modifiers.width/height`; with no frame it
|
|
382
|
+
* fills its proposal. Decorative — name a meaningful one with `accessibilityLabel`. */
|
|
383
|
+
export declare function shape(props: {
|
|
384
|
+
kind?: ShapeKind;
|
|
385
|
+
cornerRadius?: number;
|
|
386
|
+
cornerRadii?: CornerRadiiSpec;
|
|
387
|
+
/** colour token */
|
|
388
|
+
fill?: string;
|
|
389
|
+
fillGradient?: {
|
|
390
|
+
kind?: "linear" | "radial";
|
|
391
|
+
stops: Array<{
|
|
392
|
+
token: string;
|
|
393
|
+
at?: number;
|
|
394
|
+
}>;
|
|
395
|
+
start?: string;
|
|
396
|
+
end?: string;
|
|
397
|
+
};
|
|
398
|
+
stroke?: {
|
|
399
|
+
color?: string;
|
|
400
|
+
width?: number;
|
|
401
|
+
dash?: number[];
|
|
402
|
+
};
|
|
403
|
+
}, opts?: {
|
|
404
|
+
id?: string;
|
|
405
|
+
modifiers?: NonNullable<Component["modifiers"]>;
|
|
406
|
+
}): Component;
|
|
371
407
|
/** RFC 0057 — labels for a chart or a table. `marker: "dashed"` labels a
|
|
372
408
|
* {@link chart} series drawn with the dashed stroke, which is what makes
|
|
373
409
|
* colour-free series identity readable. `value` is already formatted. */
|
|
@@ -8,3 +8,32 @@ export declare function gateScreenIdProblem(auth: {
|
|
|
8
8
|
providerId: string;
|
|
9
9
|
config: Record<string, unknown>;
|
|
10
10
|
} | undefined, screenIds: readonly string[]): string | null;
|
|
11
|
+
/** Keys never lifted into a client auth block — the baked auth.json or the OTA authConfig (defense in
|
|
12
|
+
* depth: public OAuth client ids are safe; anything secret-shaped is not). */
|
|
13
|
+
export declare const AUTH_SECRET_KEY_RE: RegExp;
|
|
14
|
+
/** The client auth block: what auth.json bakes and what the OTA `authConfig` serves. */
|
|
15
|
+
export interface LiftedAuthBlock {
|
|
16
|
+
providerId: string;
|
|
17
|
+
required: boolean;
|
|
18
|
+
/** #4651 — the app's own auth gate screen; absent ⇒ the stock login. */
|
|
19
|
+
gateScreenId?: string;
|
|
20
|
+
config: Record<string, unknown>;
|
|
21
|
+
}
|
|
22
|
+
/** #4818 — the one lift from an auth block to the client shape, shared by the auth bake and the OTA
|
|
23
|
+
* authConfig so the two cannot drift. Accepts the defineApp shape (`config.required`,
|
|
24
|
+
* `config.gateScreenId`) AND an already-lifted block (top-level `required` / `gateScreenId`, as an
|
|
25
|
+
* existing auth.json or a seed's `authConfig` carries them): re-lifting a lifted block is the
|
|
26
|
+
* identity, so a re-bake never fails open. `required` is true when either place says so; a
|
|
27
|
+
* `config.gateScreenId` wins over a top-level one. Secret-ish config keys are scrubbed. Returns null
|
|
28
|
+
* when there is no usable providerId. */
|
|
29
|
+
export declare function liftAuthBlock(auth: {
|
|
30
|
+
providerId?: unknown;
|
|
31
|
+
required?: unknown;
|
|
32
|
+
gateScreenId?: unknown;
|
|
33
|
+
config?: Record<string, unknown>;
|
|
34
|
+
} | undefined | null): LiftedAuthBlock | null;
|
|
35
|
+
/** The raw gate id of either auth shape (`config.gateScreenId` first), unvalidated — for the checks. */
|
|
36
|
+
export declare function liftedGateScreenId(auth: {
|
|
37
|
+
gateScreenId?: unknown;
|
|
38
|
+
config?: Record<string, unknown>;
|
|
39
|
+
}): unknown;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -387,6 +387,13 @@ export interface Modifiers {
|
|
|
387
387
|
* The generalization of `FragmentSlotCase.accessibilityAnnouncement`, which only ever
|
|
388
388
|
* fired on a fragment-slot case swap. */
|
|
389
389
|
announce?: LiveRegion;
|
|
390
|
+
/** RFC 0065 §5 — clip ANY node (content + surface) to a shape:
|
|
391
|
+
* "rectangle" | "roundedRectangle" | "capsule" | "circle" | "ellipse". Unknown/empty =
|
|
392
|
+
* no shape clip (`cornerRadius` keeps its meaning). When set it replaces the
|
|
393
|
+
* corner-radius-only clip; a "roundedRectangle" uses `clipCornerRadii`, else `cornerRadius`. */
|
|
394
|
+
clipShape?: string;
|
|
395
|
+
/** RFC 0065 §5 — uneven corner radii for `clipShape: "roundedRectangle"`. */
|
|
396
|
+
clipCornerRadii?: CornerRadii;
|
|
390
397
|
/** RFC 0069 — a recurring, finite, transform-only motion on a decorative node: a
|
|
391
398
|
* living character's idle `hop`, a `blink`, a working `breathe`. Never changes the
|
|
392
399
|
* node's layout footprint. Stopped by reduced motion unless `respectReducedMotion`
|
|
@@ -1591,6 +1598,37 @@ export interface DonutChartProps {
|
|
|
1591
1598
|
/** base token for the derived opacity ramp (default "accentPrimary") */
|
|
1592
1599
|
color?: TokenName;
|
|
1593
1600
|
}
|
|
1601
|
+
/** RFC 0065 §5 — per-corner radii in LAYOUT direction (leading/trailing mirror in RTL). */
|
|
1602
|
+
export interface CornerRadii {
|
|
1603
|
+
topLeading?: number;
|
|
1604
|
+
topTrailing?: number;
|
|
1605
|
+
bottomLeading?: number;
|
|
1606
|
+
bottomTrailing?: number;
|
|
1607
|
+
}
|
|
1608
|
+
/** RFC 0065 §5 — a stroke along a {@link ShapeProps} outline. Drawn INSIDE the shape's
|
|
1609
|
+
* bounds (SwiftUI `strokeBorder` semantics) so a stroke never overhangs its frame. */
|
|
1610
|
+
export interface ShapeStroke {
|
|
1611
|
+
color?: TokenRef;
|
|
1612
|
+
/** pt/dp; absent/0 ⇒ 1 */
|
|
1613
|
+
width?: number;
|
|
1614
|
+
/** on/off dash lengths in pt/dp; empty ⇒ solid. RN draws any dash as its fixed `dashed` style. */
|
|
1615
|
+
dash?: number[];
|
|
1616
|
+
}
|
|
1617
|
+
/**
|
|
1618
|
+
* RFC 0065 §5 — a basic shape. Size comes from `modifiers.width/height` like any node;
|
|
1619
|
+
* with no frame it fills its proposal. `kind` is a string discriminator: unknown ⇒
|
|
1620
|
+
* "rectangle". `fillGradient` wins over `fill`; `cornerRadii` wins over `cornerRadius`
|
|
1621
|
+
* when any corner is set. Decorative: it has no accessible name of its own.
|
|
1622
|
+
*/
|
|
1623
|
+
export interface ShapeProps {
|
|
1624
|
+
/** "rectangle" (default) | "roundedRectangle" | "capsule" | "circle" | "ellipse" */
|
|
1625
|
+
kind?: string;
|
|
1626
|
+
cornerRadius?: number;
|
|
1627
|
+
cornerRadii?: CornerRadii;
|
|
1628
|
+
fill?: TokenRef;
|
|
1629
|
+
fillGradient?: Gradient;
|
|
1630
|
+
stroke?: ShapeStroke;
|
|
1631
|
+
}
|
|
1594
1632
|
/** One row of a {@link LegendProps}. */
|
|
1595
1633
|
export interface LegendItem {
|
|
1596
1634
|
label?: string;
|
|
@@ -2560,6 +2598,10 @@ export type CoreComponentBody = {
|
|
|
2560
2598
|
package: "himalaya";
|
|
2561
2599
|
type: "DataTable";
|
|
2562
2600
|
props: DataTableProps;
|
|
2601
|
+
} | {
|
|
2602
|
+
package: "himalaya";
|
|
2603
|
+
type: "Shape";
|
|
2604
|
+
props: ShapeProps;
|
|
2563
2605
|
} | {
|
|
2564
2606
|
package: "himalaya";
|
|
2565
2607
|
type: "RichContent";
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts
CHANGED
|
@@ -938,6 +938,31 @@ export declare const screenDescriptorSchema: {
|
|
|
938
938
|
};
|
|
939
939
|
};
|
|
940
940
|
};
|
|
941
|
+
readonly clipShape: {
|
|
942
|
+
readonly type: "string";
|
|
943
|
+
};
|
|
944
|
+
readonly clipCornerRadii: {
|
|
945
|
+
readonly type: "object";
|
|
946
|
+
readonly additionalProperties: false;
|
|
947
|
+
readonly properties: {
|
|
948
|
+
readonly topLeading: {
|
|
949
|
+
readonly type: "integer";
|
|
950
|
+
readonly minimum: 0;
|
|
951
|
+
};
|
|
952
|
+
readonly topTrailing: {
|
|
953
|
+
readonly type: "integer";
|
|
954
|
+
readonly minimum: 0;
|
|
955
|
+
};
|
|
956
|
+
readonly bottomLeading: {
|
|
957
|
+
readonly type: "integer";
|
|
958
|
+
readonly minimum: 0;
|
|
959
|
+
};
|
|
960
|
+
readonly bottomTrailing: {
|
|
961
|
+
readonly type: "integer";
|
|
962
|
+
readonly minimum: 0;
|
|
963
|
+
};
|
|
964
|
+
};
|
|
965
|
+
};
|
|
941
966
|
readonly ambientMotion: {
|
|
942
967
|
readonly type: "object";
|
|
943
968
|
readonly additionalProperties: false;
|
|
@@ -2209,6 +2234,31 @@ export declare const widgetSnapshotSchema: {
|
|
|
2209
2234
|
};
|
|
2210
2235
|
};
|
|
2211
2236
|
};
|
|
2237
|
+
readonly clipShape: {
|
|
2238
|
+
readonly type: "string";
|
|
2239
|
+
};
|
|
2240
|
+
readonly clipCornerRadii: {
|
|
2241
|
+
readonly type: "object";
|
|
2242
|
+
readonly additionalProperties: false;
|
|
2243
|
+
readonly properties: {
|
|
2244
|
+
readonly topLeading: {
|
|
2245
|
+
readonly type: "integer";
|
|
2246
|
+
readonly minimum: 0;
|
|
2247
|
+
};
|
|
2248
|
+
readonly topTrailing: {
|
|
2249
|
+
readonly type: "integer";
|
|
2250
|
+
readonly minimum: 0;
|
|
2251
|
+
};
|
|
2252
|
+
readonly bottomLeading: {
|
|
2253
|
+
readonly type: "integer";
|
|
2254
|
+
readonly minimum: 0;
|
|
2255
|
+
};
|
|
2256
|
+
readonly bottomTrailing: {
|
|
2257
|
+
readonly type: "integer";
|
|
2258
|
+
readonly minimum: 0;
|
|
2259
|
+
};
|
|
2260
|
+
};
|
|
2261
|
+
};
|
|
2212
2262
|
readonly ambientMotion: {
|
|
2213
2263
|
readonly type: "object";
|
|
2214
2264
|
readonly additionalProperties: false;
|
|
@@ -8870,6 +8870,20 @@ var screenDescriptorSchema = {
|
|
|
8870
8870
|
trigger: { type: "string", enum: ["on_change", "on_appear", "both", "none"] }
|
|
8871
8871
|
}
|
|
8872
8872
|
},
|
|
8873
|
+
// RFC 0065 §5 — shape clipping (core.proto Modifiers 76–77). A STRING, not an enum:
|
|
8874
|
+
// RFC 0065 constraint 1 — an unknown kind coalesces to "no shape clip" on every arm,
|
|
8875
|
+
// so a newer kind must not fail validation on an older toolchain.
|
|
8876
|
+
clipShape: { type: "string" },
|
|
8877
|
+
clipCornerRadii: {
|
|
8878
|
+
type: "object",
|
|
8879
|
+
additionalProperties: false,
|
|
8880
|
+
properties: {
|
|
8881
|
+
topLeading: { type: "integer", minimum: 0 },
|
|
8882
|
+
topTrailing: { type: "integer", minimum: 0 },
|
|
8883
|
+
bottomLeading: { type: "integer", minimum: 0 },
|
|
8884
|
+
bottomTrailing: { type: "integer", minimum: 0 }
|
|
8885
|
+
}
|
|
8886
|
+
},
|
|
8873
8887
|
// RFC 0069 — recurring, finite, transform-only motion on a decorative node. `kind`
|
|
8874
8888
|
// is an open string: an unknown kind renders no motion, so an older validator must
|
|
8875
8889
|
// not reject a newer one.
|
|
@@ -9228,6 +9242,8 @@ var CORE_COMPONENTS = /* @__PURE__ */ new Set([
|
|
|
9228
9242
|
"himalaya.DonutChart",
|
|
9229
9243
|
"himalaya.Legend",
|
|
9230
9244
|
"himalaya.DataTable",
|
|
9245
|
+
// Shape — RFC 0065 §5
|
|
9246
|
+
"himalaya.Shape",
|
|
9231
9247
|
// Rich content — RFC 0063
|
|
9232
9248
|
"himalaya.RichContent",
|
|
9233
9249
|
// Rich content editor — RFC 0063 §6
|
|
@@ -7548,6 +7548,20 @@ var screenDescriptorSchema = {
|
|
|
7548
7548
|
trigger: { type: "string", enum: ["on_change", "on_appear", "both", "none"] }
|
|
7549
7549
|
}
|
|
7550
7550
|
},
|
|
7551
|
+
// RFC 0065 §5 — shape clipping (core.proto Modifiers 76–77). A STRING, not an enum:
|
|
7552
|
+
// RFC 0065 constraint 1 — an unknown kind coalesces to "no shape clip" on every arm,
|
|
7553
|
+
// so a newer kind must not fail validation on an older toolchain.
|
|
7554
|
+
clipShape: { type: "string" },
|
|
7555
|
+
clipCornerRadii: {
|
|
7556
|
+
type: "object",
|
|
7557
|
+
additionalProperties: false,
|
|
7558
|
+
properties: {
|
|
7559
|
+
topLeading: { type: "integer", minimum: 0 },
|
|
7560
|
+
topTrailing: { type: "integer", minimum: 0 },
|
|
7561
|
+
bottomLeading: { type: "integer", minimum: 0 },
|
|
7562
|
+
bottomTrailing: { type: "integer", minimum: 0 }
|
|
7563
|
+
}
|
|
7564
|
+
},
|
|
7551
7565
|
// RFC 0069 — recurring, finite, transform-only motion on a decorative node. `kind`
|
|
7552
7566
|
// is an open string: an unknown kind renders no motion, so an older validator must
|
|
7553
7567
|
// not reject a newer one.
|
|
@@ -8780,6 +8794,17 @@ function chart(props, opts) {
|
|
|
8780
8794
|
function donutChart(props, opts) {
|
|
8781
8795
|
return { id: opts?.id ?? auto("donut_chart"), body: { package: "himalaya", type: "DonutChart", props } };
|
|
8782
8796
|
}
|
|
8797
|
+
function shape(props, opts) {
|
|
8798
|
+
const { fill, stroke, ...rest } = props;
|
|
8799
|
+
const wire = { ...rest };
|
|
8800
|
+
if (fill != null) wire.fill = { token: fill };
|
|
8801
|
+
if (stroke != null) {
|
|
8802
|
+
const { color, ...s } = stroke;
|
|
8803
|
+
wire.stroke = color != null ? { ...s, color: { token: color } } : s;
|
|
8804
|
+
}
|
|
8805
|
+
const node = { id: opts?.id ?? auto("shape"), body: { package: "himalaya", type: "Shape", props: wire } };
|
|
8806
|
+
return opts?.modifiers ? withModifiers(node, opts.modifiers) : node;
|
|
8807
|
+
}
|
|
8783
8808
|
function legend(props, opts) {
|
|
8784
8809
|
return { id: opts?.id ?? auto("legend"), body: { package: "himalaya", type: "Legend", props } };
|
|
8785
8810
|
}
|
|
@@ -9396,6 +9421,7 @@ export {
|
|
|
9396
9421
|
section,
|
|
9397
9422
|
segmentedControl,
|
|
9398
9423
|
selectionControl,
|
|
9424
|
+
shape,
|
|
9399
9425
|
skRect,
|
|
9400
9426
|
skeleton,
|
|
9401
9427
|
slider,
|