onejs-core 2.0.11 → 2.0.13

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.
@@ -1,76 +1,77 @@
1
- type Texture = CS.UnityEngine.Texture;
2
- type Sprite = CS.UnityEngine.Sprite;
3
- type Rect = CS.UnityEngine.Rect;
4
- type Vector2 = CS.UnityEngine.Vector2;
5
- type Vector2Int = CS.UnityEngine.Vector2Int;
6
- type Vector3 = CS.UnityEngine.Vector3;
7
- type Vector3Int = CS.UnityEngine.Vector3Int;
8
- type Vector4 = CS.UnityEngine.Vector4;
9
- type RectInt = CS.UnityEngine.RectInt;
10
- type Bounds = CS.UnityEngine.Bounds;
11
- type BoundsInt = CS.UnityEngine.BoundsInt;
12
- type Texture2D = CS.UnityEngine.Texture2D;
13
-
14
- type TouchScreenKeyboardType = CS.UnityEngine.TouchScreenKeyboardType;
15
-
16
- type AttachToPanelEvent = CS.UnityEngine.UIElements.AttachToPanelEvent;
17
- type BlurEvent = CS.UnityEngine.UIElements.BlurEvent;
18
- type ChangeEvent<T> = CS.UnityEngine.UIElements.ChangeEvent<T>;
19
- type ClickEvent = CS.UnityEngine.UIElements.ClickEvent;
20
- type DetachFromPanelEvent = CS.UnityEngine.UIElements.DetachFromPanelEvent;
21
- type DragEnterEvent = CS.UnityEngine.UIElements.DragEnterEvent;
22
- type DragExitedEvent = CS.UnityEngine.UIElements.DragExitedEvent;
23
- type DragLeaveEvent = CS.UnityEngine.UIElements.DragLeaveEvent;
24
- type DragPerformEvent = CS.UnityEngine.UIElements.DragPerformEvent;
25
- type DragUpdatedEvent = CS.UnityEngine.UIElements.DragUpdatedEvent;
26
- type ExecuteCommandEvent = CS.UnityEngine.UIElements.ExecuteCommandEvent;
27
- type FocusEvent = CS.UnityEngine.UIElements.FocusEvent;
28
- type FocusInEvent = CS.UnityEngine.UIElements.FocusInEvent;
29
- type FocusOutEvent = CS.UnityEngine.UIElements.FocusOutEvent;
30
- type GeometryChangedEvent = CS.UnityEngine.UIElements.GeometryChangedEvent;
31
- type InputEvent = CS.UnityEngine.UIElements.InputEvent;
32
- type KeyDownEvent = CS.UnityEngine.UIElements.KeyDownEvent;
33
- type KeyUpEvent = CS.UnityEngine.UIElements.KeyUpEvent;
34
- type MouseCaptureEvent = CS.UnityEngine.UIElements.MouseCaptureEvent;
35
- type MouseCaptureOutEvent = CS.UnityEngine.UIElements.MouseCaptureOutEvent;
36
- type MouseDownEvent = CS.UnityEngine.UIElements.MouseDownEvent;
37
- type MouseEnterEvent = CS.UnityEngine.UIElements.MouseEnterEvent;
38
- type MouseEnterWindowEvent = CS.UnityEngine.UIElements.MouseEnterWindowEvent;
39
- type MouseLeaveEvent = CS.UnityEngine.UIElements.MouseLeaveEvent;
40
- type MouseLeaveWindowEvent = CS.UnityEngine.UIElements.MouseLeaveWindowEvent;
41
- type MouseMoveEvent = CS.UnityEngine.UIElements.MouseMoveEvent;
42
- type MouseOutEvent = CS.UnityEngine.UIElements.MouseOutEvent;
43
- type MouseOverEvent = CS.UnityEngine.UIElements.MouseOverEvent;
44
- type MouseUpEvent = CS.UnityEngine.UIElements.MouseUpEvent;
45
- type NavigationCancelEvent = CS.UnityEngine.UIElements.NavigationCancelEvent;
46
- type NavigationMoveEvent = CS.UnityEngine.UIElements.NavigationMoveEvent;
47
- type NavigationSubmitEvent = CS.UnityEngine.UIElements.NavigationSubmitEvent;
48
- type PickingMode = CS.UnityEngine.UIElements.PickingMode;
49
- type PointerCancelEvent = CS.UnityEngine.UIElements.PointerCancelEvent;
50
- type PointerCaptureEvent = CS.UnityEngine.UIElements.PointerCaptureEvent;
51
- type PointerCaptureOutEvent = CS.UnityEngine.UIElements.PointerCaptureOutEvent;
52
- type PointerDownEvent = CS.UnityEngine.UIElements.PointerDownEvent;
53
- type PointerEnterEvent = CS.UnityEngine.UIElements.PointerEnterEvent;
54
- type PointerLeaveEvent = CS.UnityEngine.UIElements.PointerLeaveEvent;
55
- type PointerMoveEvent = CS.UnityEngine.UIElements.PointerMoveEvent;
56
- type PointerOutEvent = CS.UnityEngine.UIElements.PointerOutEvent;
57
- type PointerOverEvent = CS.UnityEngine.UIElements.PointerOverEvent;
58
- type PointerStationaryEvent = CS.UnityEngine.UIElements.PointerStationaryEvent;
59
- type PointerUpEvent = CS.UnityEngine.UIElements.PointerUpEvent;
60
- type ScrollViewMode = CS.UnityEngine.UIElements.ScrollViewMode;
61
- type ScrollerVisibility = CS.UnityEngine.UIElements.ScrollerVisibility;
62
- type TouchScrollBehavior = CS.UnityEngine.UIElements.ScrollView.TouchScrollBehavior;
63
- type TooltipEvent = CS.UnityEngine.UIElements.TooltipEvent;
64
- type TransitionCancelEvent = CS.UnityEngine.UIElements.TransitionCancelEvent;
65
- type TransitionEndEvent = CS.UnityEngine.UIElements.TransitionEndEvent;
66
- type TransitionRunEvent = CS.UnityEngine.UIElements.TransitionRunEvent;
67
- type TransitionStartEvent = CS.UnityEngine.UIElements.TransitionStartEvent;
68
- type ValidateCommandEvent = CS.UnityEngine.UIElements.ValidateCommandEvent;
69
- type VectorImage = CS.UnityEngine.UIElements.VectorImage;
70
- type WheelEvent = CS.UnityEngine.UIElements.WheelEvent;
71
- type ContextualMenuPopulateEvent = CS.UnityEngine.UIElements.ContextualMenuPopulateEvent;
72
-
73
- type TwoPaneSplitViewOrientation = CS.UnityEngine.UIElements.TwoPaneSplitViewOrientation;
1
+ type Texture = CS.UnityEngine.Texture
2
+ type Sprite = CS.UnityEngine.Sprite
3
+ type Rect = CS.UnityEngine.Rect
4
+ type Vector2 = CS.UnityEngine.Vector2
5
+ type Vector2Int = CS.UnityEngine.Vector2Int
6
+ type Vector3 = CS.UnityEngine.Vector3
7
+ type Vector3Int = CS.UnityEngine.Vector3Int
8
+ type Vector4 = CS.UnityEngine.Vector4
9
+ type RectInt = CS.UnityEngine.RectInt
10
+ type Bounds = CS.UnityEngine.Bounds
11
+ type BoundsInt = CS.UnityEngine.BoundsInt
12
+ type Texture2D = CS.UnityEngine.Texture2D
13
+
14
+ type TouchScreenKeyboardType = CS.UnityEngine.TouchScreenKeyboardType
15
+
16
+ type AttachToPanelEvent = CS.UnityEngine.UIElements.AttachToPanelEvent
17
+ type BlurEvent = CS.UnityEngine.UIElements.BlurEvent
18
+ type ChangeEvent<T> = CS.UnityEngine.UIElements.ChangeEvent<T>
19
+ type ClickEvent = CS.UnityEngine.UIElements.ClickEvent
20
+ type CustomStyleResolvedEvent = CS.UnityEngine.UIElements.CustomStyleResolvedEvent
21
+ type DetachFromPanelEvent = CS.UnityEngine.UIElements.DetachFromPanelEvent
22
+ type DragEnterEvent = CS.UnityEngine.UIElements.DragEnterEvent
23
+ type DragExitedEvent = CS.UnityEngine.UIElements.DragExitedEvent
24
+ type DragLeaveEvent = CS.UnityEngine.UIElements.DragLeaveEvent
25
+ type DragPerformEvent = CS.UnityEngine.UIElements.DragPerformEvent
26
+ type DragUpdatedEvent = CS.UnityEngine.UIElements.DragUpdatedEvent
27
+ type ExecuteCommandEvent = CS.UnityEngine.UIElements.ExecuteCommandEvent
28
+ type FocusEvent = CS.UnityEngine.UIElements.FocusEvent
29
+ type FocusInEvent = CS.UnityEngine.UIElements.FocusInEvent
30
+ type FocusOutEvent = CS.UnityEngine.UIElements.FocusOutEvent
31
+ type GeometryChangedEvent = CS.UnityEngine.UIElements.GeometryChangedEvent
32
+ type InputEvent = CS.UnityEngine.UIElements.InputEvent
33
+ type KeyDownEvent = CS.UnityEngine.UIElements.KeyDownEvent
34
+ type KeyUpEvent = CS.UnityEngine.UIElements.KeyUpEvent
35
+ type MouseCaptureEvent = CS.UnityEngine.UIElements.MouseCaptureEvent
36
+ type MouseCaptureOutEvent = CS.UnityEngine.UIElements.MouseCaptureOutEvent
37
+ type MouseDownEvent = CS.UnityEngine.UIElements.MouseDownEvent
38
+ type MouseEnterEvent = CS.UnityEngine.UIElements.MouseEnterEvent
39
+ type MouseEnterWindowEvent = CS.UnityEngine.UIElements.MouseEnterWindowEvent
40
+ type MouseLeaveEvent = CS.UnityEngine.UIElements.MouseLeaveEvent
41
+ type MouseLeaveWindowEvent = CS.UnityEngine.UIElements.MouseLeaveWindowEvent
42
+ type MouseMoveEvent = CS.UnityEngine.UIElements.MouseMoveEvent
43
+ type MouseOutEvent = CS.UnityEngine.UIElements.MouseOutEvent
44
+ type MouseOverEvent = CS.UnityEngine.UIElements.MouseOverEvent
45
+ type MouseUpEvent = CS.UnityEngine.UIElements.MouseUpEvent
46
+ type NavigationCancelEvent = CS.UnityEngine.UIElements.NavigationCancelEvent
47
+ type NavigationMoveEvent = CS.UnityEngine.UIElements.NavigationMoveEvent
48
+ type NavigationSubmitEvent = CS.UnityEngine.UIElements.NavigationSubmitEvent
49
+ type PickingMode = CS.UnityEngine.UIElements.PickingMode
50
+ type PointerCancelEvent = CS.UnityEngine.UIElements.PointerCancelEvent
51
+ type PointerCaptureEvent = CS.UnityEngine.UIElements.PointerCaptureEvent
52
+ type PointerCaptureOutEvent = CS.UnityEngine.UIElements.PointerCaptureOutEvent
53
+ type PointerDownEvent = CS.UnityEngine.UIElements.PointerDownEvent
54
+ type PointerEnterEvent = CS.UnityEngine.UIElements.PointerEnterEvent
55
+ type PointerLeaveEvent = CS.UnityEngine.UIElements.PointerLeaveEvent
56
+ type PointerMoveEvent = CS.UnityEngine.UIElements.PointerMoveEvent
57
+ type PointerOutEvent = CS.UnityEngine.UIElements.PointerOutEvent
58
+ type PointerOverEvent = CS.UnityEngine.UIElements.PointerOverEvent
59
+ type PointerStationaryEvent = CS.UnityEngine.UIElements.PointerStationaryEvent
60
+ type PointerUpEvent = CS.UnityEngine.UIElements.PointerUpEvent
61
+ type ScrollViewMode = CS.UnityEngine.UIElements.ScrollViewMode
62
+ type ScrollerVisibility = CS.UnityEngine.UIElements.ScrollerVisibility
63
+ type TouchScrollBehavior = CS.UnityEngine.UIElements.ScrollView.TouchScrollBehavior
64
+ type TooltipEvent = CS.UnityEngine.UIElements.TooltipEvent
65
+ type TransitionCancelEvent = CS.UnityEngine.UIElements.TransitionCancelEvent
66
+ type TransitionEndEvent = CS.UnityEngine.UIElements.TransitionEndEvent
67
+ type TransitionRunEvent = CS.UnityEngine.UIElements.TransitionRunEvent
68
+ type TransitionStartEvent = CS.UnityEngine.UIElements.TransitionStartEvent
69
+ type ValidateCommandEvent = CS.UnityEngine.UIElements.ValidateCommandEvent
70
+ type VectorImage = CS.UnityEngine.UIElements.VectorImage
71
+ type WheelEvent = CS.UnityEngine.UIElements.WheelEvent
72
+ type ContextualMenuPopulateEvent = CS.UnityEngine.UIElements.ContextualMenuPopulateEvent
73
+
74
+ type TwoPaneSplitViewOrientation = CS.UnityEngine.UIElements.TwoPaneSplitViewOrientation
74
75
 
75
76
  declare global {
76
77
  export namespace JSX {
@@ -151,7 +152,7 @@ declare global {
151
152
  onPointerLeave?: (e: PointerLeaveEvent) => void
152
153
  onPointerOver?: (e: PointerOverEvent) => void
153
154
  onPointerOut?: (e: PointerOutEvent) => void
154
- // onCustomStyleResolved?: (e: CustomStyleResolvedEvent) => void
155
+ onCustomStyleResolved?: (e: CustomStyleResolvedEvent) => void
155
156
  onTooltip?: (e: TooltipEvent) => void
156
157
  onTransitionRun?: (e: TransitionRunEvent) => void
157
158
  onTransitionStart?: (e: TransitionStartEvent) => void
@@ -162,11 +163,11 @@ declare global {
162
163
 
163
164
  type AppendCapture<T> = {
164
165
  [K in keyof T as `${Extract<K, string>}Capture`]: T[K]
165
- };
166
+ }
166
167
 
167
- type RefObject<T> = { current: T | null };
168
- type RefCallback<T> = (instance: T | null) => void;
169
- type Ref<T> = RefObject<T> | RefCallback<T>;
168
+ type RefObject<T> = { current: T | null }
169
+ type RefCallback<T> = (instance: T | null) => void
170
+ type Ref<T> = RefObject<T> | RefCallback<T>
170
171
 
171
172
  interface VisualElement extends CommonEvents, AppendCapture<CommonEvents> {
172
173
  id?: string
@@ -177,7 +178,7 @@ declare global {
177
178
  children?: RecursiveElement
178
179
 
179
180
  dangerouslySetInnerHTML?: {
180
- __html: string;
181
+ __html: string
181
182
  }
182
183
 
183
184
  name?: string
@@ -186,7 +187,7 @@ declare global {
186
187
  tooltip?: string
187
188
  focusable?: boolean
188
189
  tabindex?: number
189
- usageHints?: CS.UnityEngine.UIElements.UsageHints
190
+ "usage-hints"?: CS.UnityEngine.UIElements.UsageHints
190
191
  "picking-mode"?: PickingMode
191
192
  "view-data-key"?: string
192
193
 
@@ -213,7 +214,7 @@ declare global {
213
214
 
214
215
  interface TextElement extends VisualElement {
215
216
  text?: string
216
- enableRichText?: boolean
217
+ "enable-rich-text"?: boolean
217
218
  }
218
219
 
219
220
  interface Label extends TextElement {
@@ -223,11 +224,11 @@ declare global {
223
224
  interface Image extends VisualElementNoChildren {
224
225
  image?: Texture
225
226
  sprite?: Sprite
226
- vectorImage?: VectorImage
227
- sourceRect?: Rect
227
+ "vector-image"?: VectorImage
228
+ "source-rect"?: Rect
228
229
  uv?: Rect
229
- scaleMode?: ScaleMode
230
- tintColor?: Color
230
+ "scale-mode"?: ScaleMode
231
+ "tint-color"?: Color
231
232
  }
232
233
 
233
234
  interface IMGUIContainer extends VisualElementNoChildren {
@@ -283,7 +284,7 @@ declare global {
283
284
 
284
285
  interface RepeatButton extends TextElement {
285
286
  delay?: number
286
- interva?: number
287
+ interval?: number
287
288
  }
288
289
 
289
290
  interface Toggle extends BaseBoolField {
@@ -365,7 +366,7 @@ declare global {
365
366
  }
366
367
 
367
368
  interface TextValueField<T> extends TextInputBaseField<T> {
368
- formatString?: string
369
+ "format-string"?: string
369
370
  }
370
371
 
371
372
  interface IntegerField extends TextValueField<number> {
@@ -482,8 +483,8 @@ declare global {
482
483
  }
483
484
 
484
485
  interface TwoPaneSplitView extends VisualElement {
485
- fixedPaneIndex?: number
486
- fixedPaneInitialDimension?: number
486
+ "fixed-pane-index"?: number
487
+ "fixed-pane-initial-dimension"?: number
487
488
  orientation?: TwoPaneSplitViewOrientation
488
489
  }
489
490
 
@@ -563,8 +564,8 @@ declare global {
563
564
  }
564
565
  }
565
566
 
566
- export type IntrinsicElements = JSX.IntrinsicElements;
567
- export type CommonEvents = JSX.CommonEvents;
568
- export type VisualElement = JSX.VisualElement;
567
+ export type IntrinsicElements = JSX.IntrinsicElements
568
+ export type CommonEvents = JSX.CommonEvents
569
+ export type VisualElement = JSX.VisualElement
569
570
 
570
- export { };
571
+ export { }
package/package.json CHANGED
@@ -1,13 +1,13 @@
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": "2.0.11",
4
+ "version": "2.0.13",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./typings.d.ts",
7
7
  "bin": {
8
8
  "oj": "./bin/oj.js"
9
9
  },
10
- "dependencies": {
10
+ "dependencies": {
11
11
  "chalk": "^4.1.2",
12
12
  "commander": "^11.0.0",
13
13
  "css-flatten": "^2.0.0",