@playcanvas/web-components 0.10.1 → 0.11.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/app.d.ts +103 -32
- package/dist/components/camera-component.d.ts +13 -13
- package/dist/components/screen-component.d.ts +25 -4
- package/dist/components/scrollview-component.d.ts +6 -4
- package/dist/custom-elements.json +239 -96
- package/dist/entity.d.ts +13 -0
- package/dist/parse.d.ts +4 -2
- package/dist/pwc.cjs +308 -156
- package/dist/pwc.cjs.map +1 -1
- package/dist/pwc.js +308 -156
- package/dist/pwc.js.map +1 -1
- package/dist/pwc.min.js +1 -1
- package/dist/pwc.min.js.map +1 -1
- package/dist/pwc.min.mjs +1 -1
- package/dist/pwc.min.mjs.map +1 -1
- package/dist/pwc.mjs +309 -157
- package/dist/pwc.mjs.map +1 -1
- package/dist/sky.d.ts +12 -11
- package/dist/vscode.html-custom-data.json +40 -20
- package/dist/web-types.json +67 -48
- package/package.json +1 -1
- package/src/app.ts +189 -79
- package/src/components/camera-component.ts +31 -26
- package/src/components/screen-component.ts +42 -12
- package/src/components/scrollview-component.ts +6 -4
- package/src/entity.ts +35 -17
- package/src/parse.ts +5 -3
- package/src/sky.ts +26 -25
package/dist/parse.d.ts
CHANGED
|
@@ -58,12 +58,14 @@ export declare const parseColor: <T extends Color | null>(value: string | null,
|
|
|
58
58
|
* the value is invalid — the latter also logs a warning listing the valid names.
|
|
59
59
|
*
|
|
60
60
|
* @param value - The attribute value to parse (`null` when the attribute is absent).
|
|
61
|
-
* @param valid - The valid names: an array, or a map whose keys are the valid names.
|
|
61
|
+
* @param valid - The valid names: an array, or a map whose keys are the valid names. Only the keys
|
|
62
|
+
* are read, so the map's value type is unconstrained - engine enums are mostly numeric constants,
|
|
63
|
+
* but some (e.g. `SCALEMODE_BLEND`) are strings.
|
|
62
64
|
* @param defaultValue - The value to use when the attribute is absent or invalid.
|
|
63
65
|
* @param attribute - The attribute name, used in the warning message.
|
|
64
66
|
* @returns The resolved enum name.
|
|
65
67
|
*/
|
|
66
|
-
export declare const parseEnum: <T extends string>(value: string | null, valid: readonly T[] | ReadonlyMap<T,
|
|
68
|
+
export declare const parseEnum: <T extends string>(value: string | null, valid: readonly T[] | ReadonlyMap<T, unknown>, defaultValue: T, attribute: string) => T;
|
|
67
69
|
/**
|
|
68
70
|
* Parses a number attribute value. Returns the parsed number when the value is a finite number.
|
|
69
71
|
* Returns `defaultValue` when the attribute is absent (`null`), or when the value is not a
|