@dcl/playground-assets 7.4.3-7935604720.commit-e16c799 → 7.4.3-7964122901.commit-4aa0343
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/alpha.d.ts +40 -5
- package/dist/beta.d.ts +40 -5
- package/dist/index.bundled.d.ts +40 -5
- package/dist/index.js +4 -4
- package/dist/index.js.map +4 -4
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +40 -5
- package/dist/tsdoc-metadata.json +1 -1
- package/etc/playground-assets.api.json +244 -8
- package/etc/playground-assets.api.md +35 -4
- package/package.json +4 -4
package/dist/alpha.d.ts
CHANGED
@@ -5449,10 +5449,10 @@ export declare type PositionShorthand = PositionUnit | `${PositionUnit} ${Positi
|
|
5449
5449
|
export declare type PositionType = 'absolute' | 'relative';
|
5450
5450
|
|
5451
5451
|
/**
|
5452
|
-
* unit value specified. i.e. 1 || '100%' || '1px'
|
5452
|
+
* unit value specified. i.e. 1 || '100%' || '1px' || '10vw'
|
5453
5453
|
* @public
|
5454
5454
|
*/
|
5455
|
-
export declare type PositionUnit = `${number}px` | `${number}%` | number | `${number}
|
5455
|
+
export declare type PositionUnit = `${number}px` | `${number}%` | number | `${number}` | ScaleUnit;
|
5456
5456
|
|
5457
5457
|
export declare enum ProcessMessageResultType {
|
5458
5458
|
/**
|
@@ -6342,6 +6342,39 @@ export declare namespace Scale {
|
|
6342
6342
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): Scale;
|
6343
6343
|
}
|
6344
6344
|
|
6345
|
+
/**
|
6346
|
+
* context for applying a scale
|
6347
|
+
* @public
|
6348
|
+
*/
|
6349
|
+
export declare type ScaleContext = {
|
6350
|
+
width: number;
|
6351
|
+
height: number;
|
6352
|
+
ratio: number;
|
6353
|
+
};
|
6354
|
+
|
6355
|
+
/**
|
6356
|
+
* Scales a font size depending on a context's width/height
|
6357
|
+
* @param {number} fontSize size of the font to scale
|
6358
|
+
* @param {ScaleUnit} [scaleUnit=0.39] the scaling unit (uses "width" as unit if a number is supplied)
|
6359
|
+
* @param {ScaleContext} [ctx=viewport] the context where to apply the scaling
|
6360
|
+
* @returns {number} the fontSize scaled
|
6361
|
+
* @see https://matthewjamestaylor.com/responsive-font-size#fluid
|
6362
|
+
* @public
|
6363
|
+
*/
|
6364
|
+
export declare function scaleFontSize(fontSize: number, scaleUnit?: ScaleUnit, ctx?: ScaleContext | undefined): number;
|
6365
|
+
|
6366
|
+
/**
|
6367
|
+
* unit value specified. i.e. 10 || '10vw' || '10vh'
|
6368
|
+
* @public
|
6369
|
+
*/
|
6370
|
+
export declare type ScaleUnit = `${number}${ScaleUnits}` | number;
|
6371
|
+
|
6372
|
+
/**
|
6373
|
+
* unit value type. i.e. 'vw' || 'vh'
|
6374
|
+
* @public
|
6375
|
+
*/
|
6376
|
+
export declare type ScaleUnits = 'vw' | 'vh';
|
6377
|
+
|
6345
6378
|
/**
|
6346
6379
|
* @public
|
6347
6380
|
*/
|
@@ -6779,10 +6812,11 @@ export declare const UiDropdown: LastWriteWinElementSetComponentDefinition<PBUiD
|
|
6779
6812
|
* @public
|
6780
6813
|
* Dropdown Props
|
6781
6814
|
*/
|
6782
|
-
export declare interface UiDropdownProps extends EntityPropTypes, Omit<Partial<PBUiDropdown>, 'textAlign' | 'font'> {
|
6815
|
+
export declare interface UiDropdownProps extends EntityPropTypes, Omit<Partial<PBUiDropdown>, 'textAlign' | 'font' | 'fontSize'> {
|
6783
6816
|
onChange?(value: number): void;
|
6784
6817
|
font?: UiFontType;
|
6785
6818
|
textAlign?: TextAlignType;
|
6819
|
+
fontSize?: ScaleUnit;
|
6786
6820
|
}
|
6787
6821
|
|
6788
6822
|
/** @public */
|
@@ -6807,13 +6841,14 @@ export declare const UiInput: LastWriteWinElementSetComponentDefinition<PBUiInpu
|
|
6807
6841
|
/**
|
6808
6842
|
* @public
|
6809
6843
|
*/
|
6810
|
-
export declare interface UiInputProps extends Omit<PBUiInput, 'font' | 'textAlign'> {
|
6844
|
+
export declare interface UiInputProps extends Omit<PBUiInput, 'font' | 'textAlign' | 'fontSize'> {
|
6811
6845
|
/** function to be called on value change */
|
6812
6846
|
onChange?(value: string): void;
|
6813
6847
|
/** function to be called on text field submit */
|
6814
6848
|
onSubmit?(value: string): void;
|
6815
6849
|
font?: UiFontType;
|
6816
6850
|
textAlign?: TextAlignType;
|
6851
|
+
fontSize?: ScaleUnit;
|
6817
6852
|
}
|
6818
6853
|
|
6819
6854
|
/** @public */
|
@@ -6829,7 +6864,7 @@ export declare interface UiLabelProps {
|
|
6829
6864
|
/** Color of the label. @defaultValue `{ r: 1, g: 1, b: 1, a: 1 }` */
|
6830
6865
|
color?: PBColor4 | undefined;
|
6831
6866
|
/** Label font size. @defaultValue 10 */
|
6832
|
-
fontSize?:
|
6867
|
+
fontSize?: ScaleUnit | undefined;
|
6833
6868
|
/** Label align position. @defaultValue 'middle-center' */
|
6834
6869
|
textAlign?: TextAlignType | undefined;
|
6835
6870
|
/** Label font type. @defaultValue 'sans-serif' */
|
package/dist/beta.d.ts
CHANGED
@@ -5432,10 +5432,10 @@ export declare type PositionShorthand = PositionUnit | `${PositionUnit} ${Positi
|
|
5432
5432
|
export declare type PositionType = 'absolute' | 'relative';
|
5433
5433
|
|
5434
5434
|
/**
|
5435
|
-
* unit value specified. i.e. 1 || '100%' || '1px'
|
5435
|
+
* unit value specified. i.e. 1 || '100%' || '1px' || '10vw'
|
5436
5436
|
* @public
|
5437
5437
|
*/
|
5438
|
-
export declare type PositionUnit = `${number}px` | `${number}%` | number | `${number}
|
5438
|
+
export declare type PositionUnit = `${number}px` | `${number}%` | number | `${number}` | ScaleUnit;
|
5439
5439
|
|
5440
5440
|
export declare enum ProcessMessageResultType {
|
5441
5441
|
/**
|
@@ -6325,6 +6325,39 @@ export declare namespace Scale {
|
|
6325
6325
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): Scale;
|
6326
6326
|
}
|
6327
6327
|
|
6328
|
+
/**
|
6329
|
+
* context for applying a scale
|
6330
|
+
* @public
|
6331
|
+
*/
|
6332
|
+
export declare type ScaleContext = {
|
6333
|
+
width: number;
|
6334
|
+
height: number;
|
6335
|
+
ratio: number;
|
6336
|
+
};
|
6337
|
+
|
6338
|
+
/**
|
6339
|
+
* Scales a font size depending on a context's width/height
|
6340
|
+
* @param {number} fontSize size of the font to scale
|
6341
|
+
* @param {ScaleUnit} [scaleUnit=0.39] the scaling unit (uses "width" as unit if a number is supplied)
|
6342
|
+
* @param {ScaleContext} [ctx=viewport] the context where to apply the scaling
|
6343
|
+
* @returns {number} the fontSize scaled
|
6344
|
+
* @see https://matthewjamestaylor.com/responsive-font-size#fluid
|
6345
|
+
* @public
|
6346
|
+
*/
|
6347
|
+
export declare function scaleFontSize(fontSize: number, scaleUnit?: ScaleUnit, ctx?: ScaleContext | undefined): number;
|
6348
|
+
|
6349
|
+
/**
|
6350
|
+
* unit value specified. i.e. 10 || '10vw' || '10vh'
|
6351
|
+
* @public
|
6352
|
+
*/
|
6353
|
+
export declare type ScaleUnit = `${number}${ScaleUnits}` | number;
|
6354
|
+
|
6355
|
+
/**
|
6356
|
+
* unit value type. i.e. 'vw' || 'vh'
|
6357
|
+
* @public
|
6358
|
+
*/
|
6359
|
+
export declare type ScaleUnits = 'vw' | 'vh';
|
6360
|
+
|
6328
6361
|
/**
|
6329
6362
|
* @public
|
6330
6363
|
*/
|
@@ -6757,10 +6790,11 @@ export declare const UiDropdown: LastWriteWinElementSetComponentDefinition<PBUiD
|
|
6757
6790
|
* @public
|
6758
6791
|
* Dropdown Props
|
6759
6792
|
*/
|
6760
|
-
export declare interface UiDropdownProps extends EntityPropTypes, Omit<Partial<PBUiDropdown>, 'textAlign' | 'font'> {
|
6793
|
+
export declare interface UiDropdownProps extends EntityPropTypes, Omit<Partial<PBUiDropdown>, 'textAlign' | 'font' | 'fontSize'> {
|
6761
6794
|
onChange?(value: number): void;
|
6762
6795
|
font?: UiFontType;
|
6763
6796
|
textAlign?: TextAlignType;
|
6797
|
+
fontSize?: ScaleUnit;
|
6764
6798
|
}
|
6765
6799
|
|
6766
6800
|
/** @public */
|
@@ -6785,13 +6819,14 @@ export declare const UiInput: LastWriteWinElementSetComponentDefinition<PBUiInpu
|
|
6785
6819
|
/**
|
6786
6820
|
* @public
|
6787
6821
|
*/
|
6788
|
-
export declare interface UiInputProps extends Omit<PBUiInput, 'font' | 'textAlign'> {
|
6822
|
+
export declare interface UiInputProps extends Omit<PBUiInput, 'font' | 'textAlign' | 'fontSize'> {
|
6789
6823
|
/** function to be called on value change */
|
6790
6824
|
onChange?(value: string): void;
|
6791
6825
|
/** function to be called on text field submit */
|
6792
6826
|
onSubmit?(value: string): void;
|
6793
6827
|
font?: UiFontType;
|
6794
6828
|
textAlign?: TextAlignType;
|
6829
|
+
fontSize?: ScaleUnit;
|
6795
6830
|
}
|
6796
6831
|
|
6797
6832
|
/** @public */
|
@@ -6807,7 +6842,7 @@ export declare interface UiLabelProps {
|
|
6807
6842
|
/** Color of the label. @defaultValue `{ r: 1, g: 1, b: 1, a: 1 }` */
|
6808
6843
|
color?: PBColor4 | undefined;
|
6809
6844
|
/** Label font size. @defaultValue 10 */
|
6810
|
-
fontSize?:
|
6845
|
+
fontSize?: ScaleUnit | undefined;
|
6811
6846
|
/** Label align position. @defaultValue 'middle-center' */
|
6812
6847
|
textAlign?: TextAlignType | undefined;
|
6813
6848
|
/** Label font type. @defaultValue 'sans-serif' */
|
package/dist/index.bundled.d.ts
CHANGED
@@ -5432,10 +5432,10 @@ export declare type PositionShorthand = PositionUnit | `${PositionUnit} ${Positi
|
|
5432
5432
|
export declare type PositionType = 'absolute' | 'relative';
|
5433
5433
|
|
5434
5434
|
/**
|
5435
|
-
* unit value specified. i.e. 1 || '100%' || '1px'
|
5435
|
+
* unit value specified. i.e. 1 || '100%' || '1px' || '10vw'
|
5436
5436
|
* @public
|
5437
5437
|
*/
|
5438
|
-
export declare type PositionUnit = `${number}px` | `${number}%` | number | `${number}
|
5438
|
+
export declare type PositionUnit = `${number}px` | `${number}%` | number | `${number}` | ScaleUnit;
|
5439
5439
|
|
5440
5440
|
export declare enum ProcessMessageResultType {
|
5441
5441
|
/**
|
@@ -6325,6 +6325,39 @@ export declare namespace Scale {
|
|
6325
6325
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): Scale;
|
6326
6326
|
}
|
6327
6327
|
|
6328
|
+
/**
|
6329
|
+
* context for applying a scale
|
6330
|
+
* @public
|
6331
|
+
*/
|
6332
|
+
export declare type ScaleContext = {
|
6333
|
+
width: number;
|
6334
|
+
height: number;
|
6335
|
+
ratio: number;
|
6336
|
+
};
|
6337
|
+
|
6338
|
+
/**
|
6339
|
+
* Scales a font size depending on a context's width/height
|
6340
|
+
* @param {number} fontSize size of the font to scale
|
6341
|
+
* @param {ScaleUnit} [scaleUnit=0.39] the scaling unit (uses "width" as unit if a number is supplied)
|
6342
|
+
* @param {ScaleContext} [ctx=viewport] the context where to apply the scaling
|
6343
|
+
* @returns {number} the fontSize scaled
|
6344
|
+
* @see https://matthewjamestaylor.com/responsive-font-size#fluid
|
6345
|
+
* @public
|
6346
|
+
*/
|
6347
|
+
export declare function scaleFontSize(fontSize: number, scaleUnit?: ScaleUnit, ctx?: ScaleContext | undefined): number;
|
6348
|
+
|
6349
|
+
/**
|
6350
|
+
* unit value specified. i.e. 10 || '10vw' || '10vh'
|
6351
|
+
* @public
|
6352
|
+
*/
|
6353
|
+
export declare type ScaleUnit = `${number}${ScaleUnits}` | number;
|
6354
|
+
|
6355
|
+
/**
|
6356
|
+
* unit value type. i.e. 'vw' || 'vh'
|
6357
|
+
* @public
|
6358
|
+
*/
|
6359
|
+
export declare type ScaleUnits = 'vw' | 'vh';
|
6360
|
+
|
6328
6361
|
/**
|
6329
6362
|
* @public
|
6330
6363
|
*/
|
@@ -6757,10 +6790,11 @@ export declare const UiDropdown: LastWriteWinElementSetComponentDefinition<PBUiD
|
|
6757
6790
|
* @public
|
6758
6791
|
* Dropdown Props
|
6759
6792
|
*/
|
6760
|
-
export declare interface UiDropdownProps extends EntityPropTypes, Omit<Partial<PBUiDropdown>, 'textAlign' | 'font'> {
|
6793
|
+
export declare interface UiDropdownProps extends EntityPropTypes, Omit<Partial<PBUiDropdown>, 'textAlign' | 'font' | 'fontSize'> {
|
6761
6794
|
onChange?(value: number): void;
|
6762
6795
|
font?: UiFontType;
|
6763
6796
|
textAlign?: TextAlignType;
|
6797
|
+
fontSize?: ScaleUnit;
|
6764
6798
|
}
|
6765
6799
|
|
6766
6800
|
/** @public */
|
@@ -6785,13 +6819,14 @@ export declare const UiInput: LastWriteWinElementSetComponentDefinition<PBUiInpu
|
|
6785
6819
|
/**
|
6786
6820
|
* @public
|
6787
6821
|
*/
|
6788
|
-
export declare interface UiInputProps extends Omit<PBUiInput, 'font' | 'textAlign'> {
|
6822
|
+
export declare interface UiInputProps extends Omit<PBUiInput, 'font' | 'textAlign' | 'fontSize'> {
|
6789
6823
|
/** function to be called on value change */
|
6790
6824
|
onChange?(value: string): void;
|
6791
6825
|
/** function to be called on text field submit */
|
6792
6826
|
onSubmit?(value: string): void;
|
6793
6827
|
font?: UiFontType;
|
6794
6828
|
textAlign?: TextAlignType;
|
6829
|
+
fontSize?: ScaleUnit;
|
6795
6830
|
}
|
6796
6831
|
|
6797
6832
|
/** @public */
|
@@ -6807,7 +6842,7 @@ export declare interface UiLabelProps {
|
|
6807
6842
|
/** Color of the label. @defaultValue `{ r: 1, g: 1, b: 1, a: 1 }` */
|
6808
6843
|
color?: PBColor4 | undefined;
|
6809
6844
|
/** Label font size. @defaultValue 10 */
|
6810
|
-
fontSize?:
|
6845
|
+
fontSize?: ScaleUnit | undefined;
|
6811
6846
|
/** Label align position. @defaultValue 'middle-center' */
|
6812
6847
|
textAlign?: TextAlignType | undefined;
|
6813
6848
|
/** Label font type. @defaultValue 'sans-serif' */
|