babylonjs-serializers 9.15.0 → 9.16.1
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/babylon.glTF2Serializer.js +1 -1
- package/babylon.glTF2Serializer.js.map +1 -1
- package/babylon.glTF2Serializer.min.js +1 -1
- package/babylon.glTF2Serializer.min.js.map +1 -1
- package/babylon.objSerializer.js +1 -1
- package/babylon.objSerializer.js.map +1 -1
- package/babylon.objSerializer.min.js +1 -1
- package/babylon.objSerializer.min.js.map +1 -1
- package/babylon.stlSerializer.js +1 -1
- package/babylon.stlSerializer.js.map +1 -1
- package/babylon.stlSerializer.min.js +1 -1
- package/babylon.stlSerializer.min.js.map +1 -1
- package/babylon.threemfSerializer.js +1 -1
- package/babylon.threemfSerializer.js.map +1 -1
- package/babylon.threemfSerializer.min.js +1 -1
- package/babylon.threemfSerializer.min.js.map +1 -1
- package/babylon.usdzSerializer.js +1 -1
- package/babylon.usdzSerializer.js.map +1 -1
- package/babylon.usdzSerializer.min.js +1 -1
- package/babylon.usdzSerializer.min.js.map +1 -1
- package/babylonjs.serializers.d.ts +52 -11
- package/babylonjs.serializers.js +1 -1
- package/babylonjs.serializers.js.map +1 -1
- package/babylonjs.serializers.min.js +1 -1
- package/babylonjs.serializers.min.js.map +1 -1
- package/babylonjs.serializers.module.d.ts +104 -22
- package/package.json +3 -3
- package/tsconfig.build.json +1 -2
|
@@ -2616,19 +2616,48 @@ export class XmlSerializer {
|
|
|
2616
2616
|
}
|
|
2617
2617
|
declare module "babylonjs-serializers/3MF/core/xml/xml.interfaces" {
|
|
2618
2618
|
import { IXmlSerializerFormatOptions } from "babylonjs-serializers/3MF/core/xml/xml.serializer.format";
|
|
2619
|
-
/** */
|
|
2619
|
+
/** Describes an XML qualified name with an optional namespace. */
|
|
2620
2620
|
export interface IQualifiedName {
|
|
2621
|
-
/** */
|
|
2621
|
+
/** The namespace URI or prefix. */
|
|
2622
2622
|
ns?: string;
|
|
2623
|
-
/** */
|
|
2623
|
+
/** The local XML name. */
|
|
2624
2624
|
name: string;
|
|
2625
2625
|
}
|
|
2626
|
-
/** */
|
|
2626
|
+
/** Provides a fluent interface for writing XML content. */
|
|
2627
2627
|
export interface IXmlBuilder {
|
|
2628
|
+
/**
|
|
2629
|
+
* Writes the XML declaration.
|
|
2630
|
+
* @param version defines the XML version
|
|
2631
|
+
* @param encoding defines the optional XML encoding
|
|
2632
|
+
* @param standalone defines the optional standalone flag
|
|
2633
|
+
* @returns the XML builder
|
|
2634
|
+
*/
|
|
2628
2635
|
dec(version: string, encoding?: string, standalone?: boolean): IXmlBuilder;
|
|
2636
|
+
/**
|
|
2637
|
+
* Writes an XML attribute.
|
|
2638
|
+
* @param ns defines the attribute namespace
|
|
2639
|
+
* @param n defines the attribute name
|
|
2640
|
+
* @param v defines the attribute value
|
|
2641
|
+
* @returns the XML builder
|
|
2642
|
+
*/
|
|
2629
2643
|
att(ns: string | null, n: string, v: string): IXmlBuilder;
|
|
2644
|
+
/**
|
|
2645
|
+
* Writes an XML element.
|
|
2646
|
+
* @param ns defines the element namespace
|
|
2647
|
+
* @param n defines the element name
|
|
2648
|
+
* @returns the XML builder
|
|
2649
|
+
*/
|
|
2630
2650
|
ele(ns: string | null, n: string): IXmlBuilder;
|
|
2651
|
+
/**
|
|
2652
|
+
* Writes text content.
|
|
2653
|
+
* @param txt defines the text to write
|
|
2654
|
+
* @returns the XML builder
|
|
2655
|
+
*/
|
|
2631
2656
|
text(txt: string): IXmlBuilder;
|
|
2657
|
+
/**
|
|
2658
|
+
* Ends the current XML element.
|
|
2659
|
+
* @returns the XML builder
|
|
2660
|
+
*/
|
|
2632
2661
|
end(): IXmlBuilder;
|
|
2633
2662
|
}
|
|
2634
2663
|
/**
|
|
@@ -2640,10 +2669,13 @@ export function IsQualifiedName(x: unknown): x is {
|
|
|
2640
2669
|
};
|
|
2641
2670
|
export type XmlName = string | IQualifiedName;
|
|
2642
2671
|
type FieldKind = "attr" | "elem" | "none";
|
|
2643
|
-
/**
|
|
2644
|
-
*
|
|
2645
|
-
*/
|
|
2672
|
+
/** Formats values for XML serialization. */
|
|
2646
2673
|
export interface IFormatter<T = any> {
|
|
2674
|
+
/**
|
|
2675
|
+
* Converts a value to its XML string representation.
|
|
2676
|
+
* @param value defines the value to format
|
|
2677
|
+
* @returns the XML string representation
|
|
2678
|
+
*/
|
|
2647
2679
|
toString(value: T): string;
|
|
2648
2680
|
}
|
|
2649
2681
|
export type FormatterCtor<T> = new (args: IXmlSerializerFormatOptions) => IFormatter<T>;
|
|
@@ -2658,12 +2690,15 @@ type FieldMeta = {
|
|
|
2658
2690
|
* @param name
|
|
2659
2691
|
* @returns
|
|
2660
2692
|
*/
|
|
2661
|
-
export function XmlName(name: XmlName): (ctor: Function) => void;
|
|
2693
|
+
export function XmlName(name: XmlName): (ctor: Function, _context: ClassDecoratorContext) => void;
|
|
2662
2694
|
/**
|
|
2663
2695
|
* tell the serializer to ignore the property
|
|
2664
2696
|
* @returns
|
|
2665
2697
|
*/
|
|
2666
|
-
export function XmlIgnore(): (
|
|
2698
|
+
export function XmlIgnore(): (_value: unknown, context: {
|
|
2699
|
+
name: string | symbol;
|
|
2700
|
+
metadata: DecoratorMetadataObject;
|
|
2701
|
+
}) => void;
|
|
2667
2702
|
/**
|
|
2668
2703
|
* tell the serializer to serialize the property as attribute
|
|
2669
2704
|
* @returns
|
|
@@ -2671,7 +2706,10 @@ export function XmlIgnore(): (target: any, prop: string) => void;
|
|
|
2671
2706
|
export function XmlAttr(opts?: {
|
|
2672
2707
|
name: XmlName;
|
|
2673
2708
|
formatter?: FormatterCtor<any>;
|
|
2674
|
-
}): (
|
|
2709
|
+
}): (_value: unknown, context: {
|
|
2710
|
+
name: string | symbol;
|
|
2711
|
+
metadata: DecoratorMetadataObject;
|
|
2712
|
+
}) => void;
|
|
2675
2713
|
/**
|
|
2676
2714
|
* tell the serializer to serialize the property as element - this is the default behavior but shoud be
|
|
2677
2715
|
* specified when wanted to update the default name of the classe or if the class is not decorated (without \@XmlName)
|
|
@@ -2679,7 +2717,10 @@ export function XmlAttr(opts?: {
|
|
|
2679
2717
|
*/
|
|
2680
2718
|
export function XmlElem(opts?: {
|
|
2681
2719
|
name: XmlName;
|
|
2682
|
-
}): (
|
|
2720
|
+
}): (_value: unknown, context: {
|
|
2721
|
+
name: string | symbol;
|
|
2722
|
+
metadata: DecoratorMetadataObject;
|
|
2723
|
+
}) => void;
|
|
2683
2724
|
/**
|
|
2684
2725
|
*
|
|
2685
2726
|
* @param obj
|
|
@@ -6370,19 +6411,48 @@ declare namespace BABYLON {
|
|
|
6370
6411
|
}
|
|
6371
6412
|
|
|
6372
6413
|
|
|
6373
|
-
/** */
|
|
6414
|
+
/** Describes an XML qualified name with an optional namespace. */
|
|
6374
6415
|
export interface IQualifiedName {
|
|
6375
|
-
/** */
|
|
6416
|
+
/** The namespace URI or prefix. */
|
|
6376
6417
|
ns?: string;
|
|
6377
|
-
/** */
|
|
6418
|
+
/** The local XML name. */
|
|
6378
6419
|
name: string;
|
|
6379
6420
|
}
|
|
6380
|
-
/** */
|
|
6421
|
+
/** Provides a fluent interface for writing XML content. */
|
|
6381
6422
|
export interface IXmlBuilder {
|
|
6423
|
+
/**
|
|
6424
|
+
* Writes the XML declaration.
|
|
6425
|
+
* @param version defines the XML version
|
|
6426
|
+
* @param encoding defines the optional XML encoding
|
|
6427
|
+
* @param standalone defines the optional standalone flag
|
|
6428
|
+
* @returns the XML builder
|
|
6429
|
+
*/
|
|
6382
6430
|
dec(version: string, encoding?: string, standalone?: boolean): IXmlBuilder;
|
|
6431
|
+
/**
|
|
6432
|
+
* Writes an XML attribute.
|
|
6433
|
+
* @param ns defines the attribute namespace
|
|
6434
|
+
* @param n defines the attribute name
|
|
6435
|
+
* @param v defines the attribute value
|
|
6436
|
+
* @returns the XML builder
|
|
6437
|
+
*/
|
|
6383
6438
|
att(ns: string | null, n: string, v: string): IXmlBuilder;
|
|
6439
|
+
/**
|
|
6440
|
+
* Writes an XML element.
|
|
6441
|
+
* @param ns defines the element namespace
|
|
6442
|
+
* @param n defines the element name
|
|
6443
|
+
* @returns the XML builder
|
|
6444
|
+
*/
|
|
6384
6445
|
ele(ns: string | null, n: string): IXmlBuilder;
|
|
6446
|
+
/**
|
|
6447
|
+
* Writes text content.
|
|
6448
|
+
* @param txt defines the text to write
|
|
6449
|
+
* @returns the XML builder
|
|
6450
|
+
*/
|
|
6385
6451
|
text(txt: string): IXmlBuilder;
|
|
6452
|
+
/**
|
|
6453
|
+
* Ends the current XML element.
|
|
6454
|
+
* @returns the XML builder
|
|
6455
|
+
*/
|
|
6386
6456
|
end(): IXmlBuilder;
|
|
6387
6457
|
}
|
|
6388
6458
|
/**
|
|
@@ -6394,10 +6464,13 @@ declare namespace BABYLON {
|
|
|
6394
6464
|
};
|
|
6395
6465
|
export type XmlName = string | IQualifiedName;
|
|
6396
6466
|
type FieldKind = "attr" | "elem" | "none";
|
|
6397
|
-
/**
|
|
6398
|
-
*
|
|
6399
|
-
*/
|
|
6467
|
+
/** Formats values for XML serialization. */
|
|
6400
6468
|
export interface IFormatter<T = any> {
|
|
6469
|
+
/**
|
|
6470
|
+
* Converts a value to its XML string representation.
|
|
6471
|
+
* @param value defines the value to format
|
|
6472
|
+
* @returns the XML string representation
|
|
6473
|
+
*/
|
|
6401
6474
|
toString(value: T): string;
|
|
6402
6475
|
}
|
|
6403
6476
|
export type FormatterCtor<T> = new (args: IXmlSerializerFormatOptions) => IFormatter<T>;
|
|
@@ -6412,12 +6485,15 @@ declare namespace BABYLON {
|
|
|
6412
6485
|
* @param name
|
|
6413
6486
|
* @returns
|
|
6414
6487
|
*/
|
|
6415
|
-
export function XmlName(name: XmlName): (ctor: Function) => void;
|
|
6488
|
+
export function XmlName(name: XmlName): (ctor: Function, _context: ClassDecoratorContext) => void;
|
|
6416
6489
|
/**
|
|
6417
6490
|
* tell the serializer to ignore the property
|
|
6418
6491
|
* @returns
|
|
6419
6492
|
*/
|
|
6420
|
-
export function XmlIgnore(): (
|
|
6493
|
+
export function XmlIgnore(): (_value: unknown, context: {
|
|
6494
|
+
name: string | symbol;
|
|
6495
|
+
metadata: DecoratorMetadataObject;
|
|
6496
|
+
}) => void;
|
|
6421
6497
|
/**
|
|
6422
6498
|
* tell the serializer to serialize the property as attribute
|
|
6423
6499
|
* @returns
|
|
@@ -6425,7 +6501,10 @@ declare namespace BABYLON {
|
|
|
6425
6501
|
export function XmlAttr(opts?: {
|
|
6426
6502
|
name: XmlName;
|
|
6427
6503
|
formatter?: FormatterCtor<any>;
|
|
6428
|
-
}): (
|
|
6504
|
+
}): (_value: unknown, context: {
|
|
6505
|
+
name: string | symbol;
|
|
6506
|
+
metadata: DecoratorMetadataObject;
|
|
6507
|
+
}) => void;
|
|
6429
6508
|
/**
|
|
6430
6509
|
* tell the serializer to serialize the property as element - this is the default behavior but shoud be
|
|
6431
6510
|
* specified when wanted to update the default name of the classe or if the class is not decorated (without \@XmlName)
|
|
@@ -6433,7 +6512,10 @@ declare namespace BABYLON {
|
|
|
6433
6512
|
*/
|
|
6434
6513
|
export function XmlElem(opts?: {
|
|
6435
6514
|
name: XmlName;
|
|
6436
|
-
}): (
|
|
6515
|
+
}): (_value: unknown, context: {
|
|
6516
|
+
name: string | symbol;
|
|
6517
|
+
metadata: DecoratorMetadataObject;
|
|
6518
|
+
}) => void;
|
|
6437
6519
|
/**
|
|
6438
6520
|
*
|
|
6439
6521
|
* @param obj
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-serializers",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.16.1",
|
|
4
4
|
"main": "babylonjs.serializers.min.js",
|
|
5
5
|
"types": "babylonjs.serializers.module.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"test:escheck": "es-check es6 ./babylonjs.serializers.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"babylonjs": "9.
|
|
20
|
-
"babylonjs-gltf2interface": "9.
|
|
19
|
+
"babylonjs": "9.16.1",
|
|
20
|
+
"babylonjs-gltf2interface": "9.16.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@dev/build-tools": "1.0.0",
|