onejs-core 0.3.28 → 0.3.31

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.
@@ -0,0 +1,21 @@
1
+ declare namespace CS {
2
+ namespace OneJS.Samples {
3
+ class SampleCharacter extends UnityEngine.MonoBehaviour
4
+ {
5
+ protected [__keep_incompatibility]: never;
6
+ public get Health(): number;
7
+ public set Health(value: number);
8
+ public get MaxHealth(): number;
9
+ public set MaxHealth(value: number);
10
+ public get SlotIndex(): number;
11
+ public set SlotIndex(value: number);
12
+ public add_OnHealthChanged ($value: System.Action$1<number>) : void
13
+ public remove_OnHealthChanged ($value: System.Action$1<number>) : void
14
+ public add_OnMaxHealthChanged ($value: System.Action$1<number>) : void
15
+ public remove_OnMaxHealthChanged ($value: System.Action$1<number>) : void
16
+ public add_OnSlotIndexChanged ($value: System.Action$1<number>) : void
17
+ public remove_OnSlotIndexChanged ($value: System.Action$1<number>) : void
18
+ public constructor ()
19
+ }
20
+ }
21
+ }
@@ -48,4 +48,8 @@ declare global {
48
48
  }
49
49
  }
50
50
 
51
+ declare module "UnityEngine" {
52
+ class PhysicsMaterial extends PhysicMaterial { }
53
+ }
54
+
51
55
  export { }
@@ -1,5 +1,5 @@
1
1
  export declare class DomStyleWrapper implements CS.OneJS.Dom.DomStyle {
2
- #private;
2
+ _domStyle: CS.OneJS.Dom.DomStyle;
3
3
  constructor(domStyle: CS.OneJS.Dom.DomStyle);
4
4
  setProperty(name: string, value: any): void;
5
5
  }
@@ -1,7 +1,7 @@
1
1
  export class DomStyleWrapper {
2
- #domStyle;
2
+ _domStyle; // Making this public so that Proxy's setProperty can access it
3
3
  constructor(domStyle) {
4
- this.#domStyle = domStyle;
4
+ this._domStyle = domStyle;
5
5
  return new Proxy(this, {
6
6
  set(target, prop, value) {
7
7
  target.setProperty(prop, value);
@@ -13,6 +13,6 @@ export class DomStyleWrapper {
13
13
  });
14
14
  }
15
15
  setProperty(name, value) {
16
- this.#domStyle.setProperty(name, value);
16
+ this._domStyle.setProperty(name, value);
17
17
  }
18
18
  }
package/dist/dom/dom.d.ts CHANGED
@@ -10,11 +10,11 @@ export declare class DomWrapper {
10
10
  get parentNode(): DomWrapper | null;
11
11
  get nextSibling(): DomWrapper | null;
12
12
  get nodeType(): number;
13
+ get style(): DomStyleWrapper;
13
14
  get Id(): string;
14
15
  set Id(value: string);
15
16
  get key(): string;
16
17
  set key(value: string);
17
- get style(): DomStyleWrapper;
18
18
  get value(): any;
19
19
  get checked(): boolean;
20
20
  get data(): any;
package/dist/dom/dom.js CHANGED
@@ -13,11 +13,11 @@ export class DomWrapper {
13
13
  return this.#dom.nextSibling ? new DomWrapper(this.#dom.nextSibling) : null;
14
14
  }
15
15
  get nodeType() { return this.#dom.nodeType; }
16
+ get style() { return this.#domStyleWrapper; }
16
17
  get Id() { return this.#dom.Id; }
17
18
  set Id(value) { this.#dom.Id = value; }
18
19
  get key() { return this.#dom.key; }
19
20
  set key(value) { this.#dom.key = value; }
20
- get style() { return this.#domStyleWrapper; }
21
21
  get value() { return this.#dom.value; }
22
22
  get checked() { return this.#dom.checked; }
23
23
  get data() { return this.#dom.data; }
package/dom/dom-style.ts CHANGED
@@ -1,10 +1,10 @@
1
1
 
2
2
 
3
3
  export class DomStyleWrapper implements CS.OneJS.Dom.DomStyle {
4
- #domStyle: CS.OneJS.Dom.DomStyle
4
+ _domStyle: CS.OneJS.Dom.DomStyle // Making this public so that Proxy's setProperty can access it
5
5
 
6
6
  constructor(domStyle: CS.OneJS.Dom.DomStyle) {
7
- this.#domStyle = domStyle
7
+ this._domStyle = domStyle
8
8
 
9
9
  return new Proxy(this, {
10
10
  set(target, prop, value) {
@@ -18,7 +18,7 @@ export class DomStyleWrapper implements CS.OneJS.Dom.DomStyle {
18
18
  }
19
19
 
20
20
  setProperty(name: string, value: any) {
21
- this.#domStyle.setProperty(name, value)
21
+ this._domStyle.setProperty(name, value)
22
22
  }
23
23
  }
24
24
 
package/dom/dom.ts CHANGED
@@ -16,11 +16,11 @@ export class DomWrapper {
16
16
  }
17
17
 
18
18
  public get nodeType(): number { return this.#dom.nodeType }
19
+ public get style(): DomStyleWrapper { return this.#domStyleWrapper }
19
20
  public get Id(): string { return this.#dom.Id }
20
21
  public set Id(value: string) { this.#dom.Id = value }
21
22
  public get key(): string { return this.#dom.key }
22
23
  public set key(value: string) { this.#dom.key = value }
23
- public get style(): DomStyleWrapper { return this.#domStyleWrapper }
24
24
  public get value(): any { return this.#dom.value }
25
25
  public get checked(): boolean { return this.#dom.checked }
26
26
  public get data(): any { return this.#dom.data }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "onejs-core",
3
3
  "description": "The JS part of OneJS, a UI framework and Scripting Engine for Unity.",
4
- "version": "0.3.28",
4
+ "version": "0.3.31",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./typings.d.ts",
7
7
  "dependencies": {
@@ -162,7 +162,7 @@ exports.corePlugins = [
162
162
  "fontFamily", "fontSize", "fontStyle",
163
163
  "width", "height", "maxWidth", "maxHeight", "minWidth", "minHeight",
164
164
  "margin", "padding",
165
- "opacity", "overflow",
165
+ "opacity", "overflow", "display",
166
166
  "position", "inset"
167
167
  ]
168
168