@reactunity/renderer 0.15.2 → 0.16.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.
Files changed (175) hide show
  1. package/dist/editor/index.d.ts +1 -0
  2. package/dist/editor/index.js +1 -0
  3. package/dist/editor/jsx-dev-runtime.d.ts +2 -0
  4. package/dist/editor/jsx-dev-runtime.js +1 -0
  5. package/dist/editor/jsx-runtime.d.ts +2 -0
  6. package/dist/editor/jsx-runtime.js +1 -0
  7. package/dist/index.d.ts +9 -9
  8. package/dist/index.js +9 -9
  9. package/dist/src/helpers/dictionary-watcher.d.ts +66 -66
  10. package/dist/src/helpers/dictionary-watcher.js +100 -98
  11. package/dist/src/helpers/hooks/use-globals.d.ts +6 -6
  12. package/dist/src/helpers/hooks/use-globals.js +6 -6
  13. package/dist/src/helpers/hooks/use-reactive-value.d.ts +4 -4
  14. package/dist/src/helpers/hooks/use-reactive-value.js +27 -27
  15. package/dist/src/helpers/icons.d.ts +11 -7
  16. package/dist/src/helpers/icons.js +29 -29
  17. package/dist/src/models/base.d.ts +56 -56
  18. package/dist/src/models/base.js +2 -2
  19. package/dist/src/models/editor/components.d.ts +22 -22
  20. package/dist/src/models/editor/components.js +1 -1
  21. package/dist/src/models/editor/environment.d.ts +9 -10
  22. package/dist/src/models/editor/environment.js +1 -1
  23. package/dist/src/models/editor/index.d.ts +3 -3
  24. package/dist/src/models/editor/index.js +3 -3
  25. package/dist/src/models/editor/jsx.d.ts +111 -104
  26. package/dist/src/models/editor/jsx.js +1 -1
  27. package/dist/src/models/environment/dom/common.d.ts +85 -85
  28. package/dist/src/models/environment/dom/common.js +1 -1
  29. package/dist/src/models/environment/dom/fetch.d.ts +111 -111
  30. package/dist/src/models/environment/dom/fetch.js +1 -1
  31. package/dist/src/models/environment/dom/global.d.ts +11 -11
  32. package/dist/src/models/environment/dom/global.js +1 -1
  33. package/dist/src/models/environment/dom/xhr.d.ts +161 -161
  34. package/dist/src/models/environment/dom/xhr.js +1 -1
  35. package/dist/src/models/environment/index.d.ts +43 -47
  36. package/dist/src/models/environment/index.js +2 -3
  37. package/dist/src/models/environment/interop.d.ts +23 -23
  38. package/dist/src/models/environment/interop.js +1 -1
  39. package/dist/src/models/generated/editor.d.ts +18501 -18501
  40. package/dist/src/models/generated/editor.js +6 -6
  41. package/dist/src/models/generated/index.d.ts +6 -6
  42. package/dist/src/models/generated/index.js +6 -6
  43. package/dist/src/models/generated/react.d.ts +15214 -15214
  44. package/dist/src/models/generated/react.js +6 -6
  45. package/dist/src/models/generated/system.d.ts +36731 -36731
  46. package/dist/src/models/generated/system.js +6 -6
  47. package/dist/src/models/generated/tests.d.ts +5023 -5023
  48. package/dist/src/models/generated/tests.js +6 -6
  49. package/dist/src/models/generated/unity.d.ts +43446 -43446
  50. package/dist/src/models/generated/unity.js +6 -6
  51. package/dist/src/models/generated/yoga.d.ts +368 -368
  52. package/dist/src/models/generated/yoga.js +6 -6
  53. package/dist/src/models/properties/colors.d.ts +150 -150
  54. package/dist/src/models/properties/colors.js +1 -1
  55. package/dist/src/models/properties/common.d.ts +2 -2
  56. package/dist/src/models/properties/common.js +1 -1
  57. package/dist/src/models/properties/index.d.ts +7 -7
  58. package/dist/src/models/properties/index.js +7 -7
  59. package/dist/src/models/properties/style.d.ts +10 -10
  60. package/dist/src/models/properties/style.js +1 -1
  61. package/dist/src/models/properties/styles-enums.d.ts +23 -23
  62. package/dist/src/models/properties/styles-enums.js +1 -1
  63. package/dist/src/models/properties/styles.d.ts +127 -127
  64. package/dist/src/models/properties/styles.js +1 -1
  65. package/dist/src/models/properties/values.d.ts +24 -24
  66. package/dist/src/models/properties/values.js +1 -1
  67. package/dist/src/models/properties/yoga-enums.d.ts +8 -8
  68. package/dist/src/models/properties/yoga-enums.js +1 -1
  69. package/dist/src/models/properties/yoga.d.ts +66 -66
  70. package/dist/src/models/properties/yoga.js +1 -1
  71. package/dist/src/models/renderer.d.ts +20 -20
  72. package/dist/src/models/renderer.js +1 -1
  73. package/dist/src/models/richtext.d.ts +69 -69
  74. package/dist/src/models/richtext.js +2 -2
  75. package/dist/src/models/svg.d.ts +68 -68
  76. package/dist/src/models/svg.js +1 -1
  77. package/dist/src/models/tests/index.d.ts +12 -12
  78. package/dist/src/models/tests/index.js +1 -1
  79. package/dist/src/models/ugui/components.d.ts +86 -86
  80. package/dist/src/models/ugui/components.js +1 -1
  81. package/dist/src/models/ugui/events.d.ts +74 -74
  82. package/dist/src/models/ugui/events.js +2 -2
  83. package/dist/src/models/ugui/index.d.ts +4 -4
  84. package/dist/src/models/ugui/index.js +4 -4
  85. package/dist/src/models/ugui/input.d.ts +26 -26
  86. package/dist/src/models/ugui/input.js +1 -1
  87. package/dist/src/models/ugui/jsx.d.ts +67 -60
  88. package/dist/src/models/ugui/jsx.js +1 -1
  89. package/dist/src/models/uitoolkit/components.d.ts +82 -82
  90. package/dist/src/models/uitoolkit/components.js +1 -1
  91. package/dist/src/models/uitoolkit/events.d.ts +64 -64
  92. package/dist/src/models/uitoolkit/events.js +1 -1
  93. package/dist/src/models/uitoolkit/index.d.ts +3 -3
  94. package/dist/src/models/uitoolkit/index.js +3 -3
  95. package/dist/src/models/uitoolkit/jsx.d.ts +71 -64
  96. package/dist/src/models/uitoolkit/jsx.js +1 -1
  97. package/dist/src/renderer/async/callbacks.d.ts +5 -6
  98. package/dist/src/renderer/async/callbacks.js +52 -52
  99. package/dist/src/renderer/async/commands.d.ts +98 -47
  100. package/dist/src/renderer/async/commands.js +1 -1
  101. package/dist/src/renderer/async/objects.d.ts +7 -8
  102. package/dist/src/renderer/async/objects.js +31 -31
  103. package/dist/src/renderer/async/reconciler.d.ts +2 -2
  104. package/dist/src/renderer/async/reconciler.js +304 -283
  105. package/dist/src/renderer/async/serializer.d.ts +6 -9
  106. package/dist/src/renderer/async/serializer.js +31 -31
  107. package/dist/src/renderer/async/types.d.ts +45 -45
  108. package/dist/src/renderer/async/types.js +1 -1
  109. package/dist/src/renderer/constants.d.ts +30 -30
  110. package/dist/src/renderer/constants.js +70 -70
  111. package/dist/src/renderer/diffing.d.ts +3 -3
  112. package/dist/src/renderer/diffing.js +83 -83
  113. package/dist/src/renderer/renderer.d.ts +26 -26
  114. package/dist/src/renderer/renderer.js +93 -93
  115. package/dist/src/renderer/subcontexts/index.d.ts +6 -6
  116. package/dist/src/renderer/subcontexts/index.js +6 -6
  117. package/dist/src/renderer/subcontexts/richtext.d.ts +3 -3
  118. package/dist/src/renderer/subcontexts/richtext.js +52 -52
  119. package/dist/src/renderer/subcontexts/svg.d.ts +3 -3
  120. package/dist/src/renderer/subcontexts/svg.js +70 -70
  121. package/dist/src/renderer/sync/reconciler.d.ts +2 -2
  122. package/dist/src/renderer/sync/reconciler.js +35 -35
  123. package/dist/src/version.d.ts +1 -1
  124. package/dist/src/version.js +1 -1
  125. package/dist/src/views/default-view.d.ts +8 -8
  126. package/dist/src/views/default-view.js +7 -7
  127. package/dist/src/views/error-boundary.d.ts +10 -10
  128. package/dist/src/views/error-boundary.js +42 -53
  129. package/dist/src/webgl-compat/error-messages.d.ts +9 -9
  130. package/dist/src/webgl-compat/error-messages.js +10 -10
  131. package/dist/src/webgl-compat/index.d.ts +13 -13
  132. package/dist/src/webgl-compat/index.js +8 -8
  133. package/dist/src/webgl-compat/types.d.ts +21 -21
  134. package/dist/src/webgl-compat/types.js +1 -1
  135. package/dist/src/webgl-compat/use-event-system.d.ts +3 -3
  136. package/dist/src/webgl-compat/use-event-system.js +77 -76
  137. package/dist/src/webgl-compat/use-unity-context.d.ts +31 -31
  138. package/dist/src/webgl-compat/use-unity-context.js +92 -91
  139. package/dist/tests.d.ts +1 -1
  140. package/dist/tests.js +1 -1
  141. package/dist/ugui/index.d.ts +1 -0
  142. package/dist/ugui/index.js +1 -0
  143. package/dist/ugui/jsx-dev-runtime.d.ts +2 -0
  144. package/dist/ugui/jsx-dev-runtime.js +1 -0
  145. package/dist/ugui/jsx-runtime.d.ts +2 -0
  146. package/dist/ugui/jsx-runtime.js +1 -0
  147. package/dist/uitoolkit/index.d.ts +1 -0
  148. package/dist/uitoolkit/index.js +1 -0
  149. package/dist/uitoolkit/jsx-dev-runtime.d.ts +2 -0
  150. package/dist/uitoolkit/jsx-dev-runtime.js +1 -0
  151. package/dist/uitoolkit/jsx-runtime.d.ts +2 -0
  152. package/dist/uitoolkit/jsx-runtime.js +1 -0
  153. package/dist/webgl-compat.d.ts +1 -1
  154. package/dist/webgl-compat.js +1 -1
  155. package/editor/jsx-dev-runtime.ts +4 -0
  156. package/editor/jsx-runtime.ts +4 -0
  157. package/package.json +13 -32
  158. package/ugui/jsx-dev-runtime.ts +4 -0
  159. package/ugui/jsx-runtime.ts +4 -0
  160. package/uitoolkit/jsx-dev-runtime.ts +4 -0
  161. package/uitoolkit/jsx-runtime.ts +4 -0
  162. package/dist/editor.d.ts +0 -1
  163. package/dist/editor.js +0 -1
  164. package/dist/src/models/environment/jsx.d.ts +0 -45
  165. package/dist/src/models/environment/jsx.js +0 -1
  166. package/dist/ugui.d.ts +0 -1
  167. package/dist/ugui.js +0 -1
  168. package/dist/uitoolkit.d.ts +0 -1
  169. package/dist/uitoolkit.js +0 -1
  170. package/editor.ts +0 -1
  171. package/tsconfig.editor.json +0 -6
  172. package/tsconfig.ugui.json +0 -6
  173. package/tsconfig.uitoolkit.json +0 -6
  174. package/ugui.ts +0 -1
  175. package/uitoolkit.ts +0 -1
@@ -1,52 +1,52 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import { ObjectsRepo } from './objects';
17
- var CallbacksRepo = /** @class */ (function (_super) {
18
- __extends(CallbacksRepo, _super);
19
- function CallbacksRepo() {
20
- var _this = _super.call(this) || this;
21
- _this.call = function (ind, args) {
22
- var cb = _this.getObject(ind);
23
- var argsAsList = args;
24
- var argsAsArray = args;
25
- if (typeof argsAsArray.Length === 'number') {
26
- // C# Array
27
- args = [];
28
- var length = argsAsArray.Length;
29
- for (var index = 0; index < length; index++)
30
- args.push(argsAsArray.GetValue(index));
31
- }
32
- else if (typeof argsAsList.Count === 'number') {
33
- // C# List
34
- args = [];
35
- var length = argsAsList.Count;
36
- for (var index = 0; index < length; index++)
37
- args.push(argsAsList[index]);
38
- }
39
- else if (typeof argsAsList.Count === 'function') {
40
- // C# IList
41
- args = [];
42
- var length = argsAsList.Count();
43
- for (var index = 0; index < length; index++)
44
- args.push(argsAsArray.GetValue(index));
45
- }
46
- return cb.apply(null, args);
47
- };
48
- return _this;
49
- }
50
- return CallbacksRepo;
51
- }(ObjectsRepo));
52
- export { CallbacksRepo };
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ import { ObjectsRepo } from './objects';
17
+ var CallbacksRepo = /** @class */ (function (_super) {
18
+ __extends(CallbacksRepo, _super);
19
+ function CallbacksRepo() {
20
+ var _this = _super !== null && _super.apply(this, arguments) || this;
21
+ _this.call = function (ind, args) {
22
+ var cb = _this.getObject(ind);
23
+ var argsAsList = args;
24
+ var argsAsArray = args;
25
+ if (typeof argsAsArray.Length === 'number') {
26
+ // C# Array
27
+ args = [];
28
+ var length = argsAsArray.Length;
29
+ for (var index = 0; index < length; index++)
30
+ args.push(argsAsArray.GetValue(index));
31
+ }
32
+ else if (typeof argsAsList.Count === 'number') {
33
+ // C# List
34
+ args = [];
35
+ var length = argsAsList.Count;
36
+ for (var index = 0; index < length; index++)
37
+ args.push(argsAsList[index]);
38
+ }
39
+ else if (typeof argsAsList.Count === 'function') {
40
+ // C# IList
41
+ args = [];
42
+ var length = argsAsList.Count();
43
+ for (var index = 0; index < length; index++)
44
+ args.push(argsAsArray.GetValue(index));
45
+ }
46
+ return cb.apply(null, args);
47
+ };
48
+ return _this;
49
+ }
50
+ return CallbacksRepo;
51
+ }(ObjectsRepo));
52
+ export { CallbacksRepo };
@@ -1,47 +1,98 @@
1
- export type BatchUpdateProps = {
2
- [key: string]: string | number | object;
3
- };
4
- export type AsyncCallback = (...args: any[]) => any;
5
- export type BatchUpdateCallbacks = {
6
- [key: string]: number;
7
- };
8
- type ApplyUpdatesParams = {
9
- t: string;
10
- r: number;
11
- c?: string;
12
- p?: BatchUpdateProps;
13
- e?: BatchUpdateCallbacks;
14
- o?: BatchUpdateCallbacks;
15
- };
16
- export type CreateInstanceCommand = ['c', ApplyUpdatesParams & {
17
- k?: string;
18
- }];
19
- export type CreateTextInstanceCommand = ['t', {
20
- r: number;
21
- c?: string;
22
- }];
23
- export type AppendChildCommand = ['a', {
24
- p: number;
25
- c: number;
26
- }];
27
- export type RemoveChildCommand = ['r', {
28
- p: number;
29
- c: number;
30
- }];
31
- export type InsertChildCommand = ['i', {
32
- p: number;
33
- c: number;
34
- i?: number;
35
- }];
36
- export type ApplyUpdatesCommand = ['u', ApplyUpdatesParams];
37
- export type TextUpdateCommand = ['x', {
38
- r: number;
39
- c: string;
40
- }];
41
- export type ToggleHideCommand = ['h', {
42
- r: number;
43
- h: boolean;
44
- }];
45
- export type ClearContainerCommand = ['o'];
46
- export type BatchCommand = CreateInstanceCommand | CreateTextInstanceCommand | AppendChildCommand | RemoveChildCommand | InsertChildCommand | ApplyUpdatesCommand | TextUpdateCommand | ToggleHideCommand | ClearContainerCommand | null;
47
- export {};
1
+ export type BatchUpdateProps = {
2
+ [key: string]: string | number | object;
3
+ };
4
+ export type AsyncCallback = (...args: any[]) => any;
5
+ export type BatchUpdateCallbacks = {
6
+ [key: string]: number;
7
+ };
8
+ export type SerializableUpdateProps = {
9
+ p?: BatchUpdateProps;
10
+ e?: BatchUpdateCallbacks;
11
+ o?: BatchUpdateCallbacks;
12
+ };
13
+ type ApplyUpdatesParams = SerializableUpdateProps & {
14
+ r: number;
15
+ t: string;
16
+ c?: string;
17
+ };
18
+ export type CreateInstanceCommand = ['c', ApplyUpdatesParams & {
19
+ k?: string;
20
+ }];
21
+ export type CreateTextInstanceCommand = ['t', {
22
+ r: number;
23
+ c?: string;
24
+ }];
25
+ export type AppendChildCommand = ['a', {
26
+ p: number;
27
+ c: number;
28
+ }];
29
+ export type RemoveChildCommand = ['r', {
30
+ p: number;
31
+ c: number;
32
+ }];
33
+ export type InsertChildCommand = ['i', {
34
+ p: number;
35
+ c: number;
36
+ i?: number;
37
+ }];
38
+ export type ApplyUpdatesCommand = ['u', ApplyUpdatesParams];
39
+ export type TextUpdateCommand = ['x', {
40
+ r: number;
41
+ c: string;
42
+ }];
43
+ export type ToggleHideCommand = ['h', {
44
+ r: number;
45
+ h: boolean;
46
+ }];
47
+ export type ClearContainerCommand = ['o'];
48
+ export type CreateInstanceCommandShort = [
49
+ 0,
50
+ number,
51
+ string,
52
+ SerializableUpdateProps?,
53
+ string?
54
+ ];
55
+ export type CreateTextInstanceCommandShort = [
56
+ 1,
57
+ number,
58
+ string?
59
+ ];
60
+ export type AppendChildCommandShort = [
61
+ 2,
62
+ number,
63
+ number
64
+ ];
65
+ export type RemoveChildCommandShort = [
66
+ 3,
67
+ number,
68
+ number
69
+ ];
70
+ export type InsertChildCommandShort = [
71
+ 4,
72
+ number,
73
+ number,
74
+ number?
75
+ ];
76
+ export type ApplyUpdatesCommandShort = [
77
+ 5,
78
+ number,
79
+ string,
80
+ SerializableUpdateProps?
81
+ ];
82
+ export type TextUpdateCommandShort = [
83
+ 6,
84
+ number,
85
+ string
86
+ ];
87
+ export type ToggleHideCommandShort = [
88
+ 7,
89
+ number,
90
+ boolean
91
+ ];
92
+ export type ClearContainerCommandShort = [
93
+ 8
94
+ ];
95
+ export type BatchCommandLong = CreateInstanceCommand | CreateTextInstanceCommand | AppendChildCommand | RemoveChildCommand | InsertChildCommand | ApplyUpdatesCommand | TextUpdateCommand | ToggleHideCommand | ClearContainerCommand | null;
96
+ export type BatchCommandShort = CreateInstanceCommandShort | CreateTextInstanceCommandShort | AppendChildCommandShort | RemoveChildCommandShort | InsertChildCommandShort | ApplyUpdatesCommandShort | TextUpdateCommandShort | ToggleHideCommandShort | ClearContainerCommandShort | null;
97
+ export type BatchCommand = BatchCommandLong | BatchCommandShort | null;
98
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,8 +1,7 @@
1
- export declare class ObjectsRepo<T = any> {
2
- indices: {}[];
3
- objects: WeakMap<object, T>;
4
- constructor();
5
- setObject: (index: number, item: T) => void;
6
- addObject: (item: T) => number;
7
- getObject: (index: number) => T;
8
- }
1
+ export declare class ObjectsRepo<T = any> {
2
+ indices: {}[];
3
+ objects: WeakMap<object, T>;
4
+ setObject: (index: number, item: T) => void;
5
+ addObject: (item: T) => number;
6
+ getObject: (index: number) => T;
7
+ }
@@ -1,31 +1,31 @@
1
- var ObjectsRepo = /** @class */ (function () {
2
- function ObjectsRepo() {
3
- var _this = this;
4
- this.indices = [{}];
5
- this.objects = new WeakMap();
6
- this.setObject = function (index, item) {
7
- var it = _this.indices[index];
8
- if (!it) {
9
- it = _this.indices[index] = {};
10
- }
11
- _this.objects.set(it, item);
12
- };
13
- this.addObject = function (item) {
14
- if (!item)
15
- return -1;
16
- var it = {};
17
- var ind = _this.indices.length;
18
- _this.indices.push(it);
19
- _this.objects.set(it, item);
20
- return ind;
21
- };
22
- this.getObject = function (index) {
23
- if (index < 0)
24
- return undefined;
25
- var it = _this.indices[index];
26
- return _this.objects.get(it);
27
- };
28
- }
29
- return ObjectsRepo;
30
- }());
31
- export { ObjectsRepo };
1
+ var ObjectsRepo = /** @class */ (function () {
2
+ function ObjectsRepo() {
3
+ var _this = this;
4
+ this.indices = [{}];
5
+ this.objects = new WeakMap();
6
+ this.setObject = function (index, item) {
7
+ var it = _this.indices[index];
8
+ if (!it) {
9
+ it = _this.indices[index] = {};
10
+ }
11
+ _this.objects.set(it, item);
12
+ };
13
+ this.addObject = function (item) {
14
+ if (!item)
15
+ return -1;
16
+ var it = {};
17
+ var ind = _this.indices.length;
18
+ _this.indices.push(it);
19
+ _this.objects.set(it, item);
20
+ return ind;
21
+ };
22
+ this.getObject = function (index) {
23
+ if (index < 0)
24
+ return undefined;
25
+ var it = _this.indices[index];
26
+ return _this.objects.get(it);
27
+ };
28
+ }
29
+ return ObjectsRepo;
30
+ }());
31
+ export { ObjectsRepo };
@@ -1,2 +1,2 @@
1
- import * as Reconciler from 'react-reconciler';
2
- export declare const asyncReconciler: Reconciler.Reconciler<import("./types").AsyncContainerInstance, import("./types").AsyncInstance, import("./types").AsyncInstance, import("./types").AsyncNativeInstance, import("../../..").ReactUnity.IReactComponent>;
1
+ import * as Reconciler from 'react-reconciler';
2
+ export declare const asyncReconciler: Reconciler.Reconciler<import("./types").AsyncContainerInstance, import("./types").AsyncInstance, import("./types").AsyncInstance, import("./types").AsyncNativeInstance, import("../../..").ReactUnity.IReactComponent>;