onejs-core 2.0.10 → 2.0.12

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 (2) hide show
  1. package/definitions/jsx.d.ts +102 -92
  2. package/package.json +1 -1
@@ -1,74 +1,76 @@
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 AttachToPanelEvent = CS.UnityEngine.UIElements.AttachToPanelEvent;
15
- type BlurEvent = CS.UnityEngine.UIElements.BlurEvent;
16
- type ChangeEvent<T> = CS.UnityEngine.UIElements.ChangeEvent<T>;
17
- type ClickEvent = CS.UnityEngine.UIElements.ClickEvent;
18
- type DetachFromPanelEvent = CS.UnityEngine.UIElements.DetachFromPanelEvent;
19
- type DragEnterEvent = CS.UnityEngine.UIElements.DragEnterEvent;
20
- type DragExitedEvent = CS.UnityEngine.UIElements.DragExitedEvent;
21
- type DragLeaveEvent = CS.UnityEngine.UIElements.DragLeaveEvent;
22
- type DragPerformEvent = CS.UnityEngine.UIElements.DragPerformEvent;
23
- type DragUpdatedEvent = CS.UnityEngine.UIElements.DragUpdatedEvent;
24
- type ExecuteCommandEvent = CS.UnityEngine.UIElements.ExecuteCommandEvent;
25
- type FocusEvent = CS.UnityEngine.UIElements.FocusEvent;
26
- type FocusInEvent = CS.UnityEngine.UIElements.FocusInEvent;
27
- type FocusOutEvent = CS.UnityEngine.UIElements.FocusOutEvent;
28
- type GeometryChangedEvent = CS.UnityEngine.UIElements.GeometryChangedEvent;
29
- type InputEvent = CS.UnityEngine.UIElements.InputEvent;
30
- type KeyDownEvent = CS.UnityEngine.UIElements.KeyDownEvent;
31
- type KeyUpEvent = CS.UnityEngine.UIElements.KeyUpEvent;
32
- type MouseCaptureEvent = CS.UnityEngine.UIElements.MouseCaptureEvent;
33
- type MouseCaptureOutEvent = CS.UnityEngine.UIElements.MouseCaptureOutEvent;
34
- type MouseDownEvent = CS.UnityEngine.UIElements.MouseDownEvent;
35
- type MouseEnterEvent = CS.UnityEngine.UIElements.MouseEnterEvent;
36
- type MouseEnterWindowEvent = CS.UnityEngine.UIElements.MouseEnterWindowEvent;
37
- type MouseLeaveEvent = CS.UnityEngine.UIElements.MouseLeaveEvent;
38
- type MouseLeaveWindowEvent = CS.UnityEngine.UIElements.MouseLeaveWindowEvent;
39
- type MouseMoveEvent = CS.UnityEngine.UIElements.MouseMoveEvent;
40
- type MouseOutEvent = CS.UnityEngine.UIElements.MouseOutEvent;
41
- type MouseOverEvent = CS.UnityEngine.UIElements.MouseOverEvent;
42
- type MouseUpEvent = CS.UnityEngine.UIElements.MouseUpEvent;
43
- type NavigationCancelEvent = CS.UnityEngine.UIElements.NavigationCancelEvent;
44
- type NavigationMoveEvent = CS.UnityEngine.UIElements.NavigationMoveEvent;
45
- type NavigationSubmitEvent = CS.UnityEngine.UIElements.NavigationSubmitEvent;
46
- type PickingMode = CS.UnityEngine.UIElements.PickingMode;
47
- type PointerCancelEvent = CS.UnityEngine.UIElements.PointerCancelEvent;
48
- type PointerCaptureEvent = CS.UnityEngine.UIElements.PointerCaptureEvent;
49
- type PointerCaptureOutEvent = CS.UnityEngine.UIElements.PointerCaptureOutEvent;
50
- type PointerDownEvent = CS.UnityEngine.UIElements.PointerDownEvent;
51
- type PointerEnterEvent = CS.UnityEngine.UIElements.PointerEnterEvent;
52
- type PointerLeaveEvent = CS.UnityEngine.UIElements.PointerLeaveEvent;
53
- type PointerMoveEvent = CS.UnityEngine.UIElements.PointerMoveEvent;
54
- type PointerOutEvent = CS.UnityEngine.UIElements.PointerOutEvent;
55
- type PointerOverEvent = CS.UnityEngine.UIElements.PointerOverEvent;
56
- type PointerStationaryEvent = CS.UnityEngine.UIElements.PointerStationaryEvent;
57
- type PointerUpEvent = CS.UnityEngine.UIElements.PointerUpEvent;
58
- type ScrollViewMode = CS.UnityEngine.UIElements.ScrollViewMode;
59
- type ScrollerVisibility = CS.UnityEngine.UIElements.ScrollerVisibility;
60
- type TouchScrollBehavior = CS.UnityEngine.UIElements.ScrollView.TouchScrollBehavior;
61
- type TooltipEvent = CS.UnityEngine.UIElements.TooltipEvent;
62
- type TransitionCancelEvent = CS.UnityEngine.UIElements.TransitionCancelEvent;
63
- type TransitionEndEvent = CS.UnityEngine.UIElements.TransitionEndEvent;
64
- type TransitionRunEvent = CS.UnityEngine.UIElements.TransitionRunEvent;
65
- type TransitionStartEvent = CS.UnityEngine.UIElements.TransitionStartEvent;
66
- type ValidateCommandEvent = CS.UnityEngine.UIElements.ValidateCommandEvent;
67
- type VectorImage = CS.UnityEngine.UIElements.VectorImage;
68
- type WheelEvent = CS.UnityEngine.UIElements.WheelEvent;
69
- type ContextualMenuPopulateEvent = CS.UnityEngine.UIElements.ContextualMenuPopulateEvent;
70
-
71
- 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 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
72
74
 
73
75
  declare global {
74
76
  export namespace JSX {
@@ -160,11 +162,11 @@ declare global {
160
162
 
161
163
  type AppendCapture<T> = {
162
164
  [K in keyof T as `${Extract<K, string>}Capture`]: T[K]
163
- };
165
+ }
164
166
 
165
- type RefObject<T> = { current: T | null };
166
- type RefCallback<T> = (instance: T | null) => void;
167
- type Ref<T> = RefObject<T> | RefCallback<T>;
167
+ type RefObject<T> = { current: T | null }
168
+ type RefCallback<T> = (instance: T | null) => void
169
+ type Ref<T> = RefObject<T> | RefCallback<T>
168
170
 
169
171
  interface VisualElement extends CommonEvents, AppendCapture<CommonEvents> {
170
172
  id?: string
@@ -175,7 +177,7 @@ declare global {
175
177
  children?: RecursiveElement
176
178
 
177
179
  dangerouslySetInnerHTML?: {
178
- __html: string;
180
+ __html: string
179
181
  }
180
182
 
181
183
  name?: string
@@ -184,7 +186,7 @@ declare global {
184
186
  tooltip?: string
185
187
  focusable?: boolean
186
188
  tabindex?: number
187
- usageHints?: CS.UnityEngine.UIElements.UsageHints
189
+ "usage-hints"?: CS.UnityEngine.UIElements.UsageHints
188
190
  "picking-mode"?: PickingMode
189
191
  "view-data-key"?: string
190
192
 
@@ -211,7 +213,7 @@ declare global {
211
213
 
212
214
  interface TextElement extends VisualElement {
213
215
  text?: string
214
- enableRichText?: boolean
216
+ "enable-rich-text"?: boolean
215
217
  }
216
218
 
217
219
  interface Label extends TextElement {
@@ -221,11 +223,11 @@ declare global {
221
223
  interface Image extends VisualElementNoChildren {
222
224
  image?: Texture
223
225
  sprite?: Sprite
224
- vectorImage?: VectorImage
225
- sourceRect?: Rect
226
+ "vector-image"?: VectorImage
227
+ "source-rect"?: Rect
226
228
  uv?: Rect
227
- scaleMode?: ScaleMode
228
- tintColor?: Color
229
+ "scale-mode"?: ScaleMode
230
+ "tint-color"?: Color
229
231
  }
230
232
 
231
233
  interface IMGUIContainer extends VisualElementNoChildren {
@@ -281,7 +283,7 @@ declare global {
281
283
 
282
284
  interface RepeatButton extends TextElement {
283
285
  delay?: number
284
- interva?: number
286
+ interval?: number
285
287
  }
286
288
 
287
289
  interface Toggle extends BaseBoolField {
@@ -340,13 +342,21 @@ declare global {
340
342
 
341
343
  interface TextInputBaseField<T> extends BaseField<T> {
342
344
  text?: string
343
- "max-length"?: number
345
+ "auto-correction"?: boolean
346
+ "cursor-index"?: number
347
+ "double-click-selects-word"?: boolean
348
+ "triple-click-selects-line"?: boolean
349
+ "emoji-fallback-support"?: boolean
350
+ "hide-mobile-input"?: boolean
344
351
  "is-delayed"?: boolean
345
352
  "is-password-field"?: boolean
346
- "mask-char"?: string
347
353
  "is-read-only"?: boolean
354
+ "keyboard-type"?: TouchScreenKeyboardType
355
+ "mask-char"?: string
356
+ "max-length"?: number
348
357
  "select-all-on-focus"?: boolean
349
358
  "select-all-on-mouse-up"?: boolean
359
+ "select-index"?: number
350
360
  "vertical-scroller-visibility"?: ScrollerVisibility
351
361
  }
352
362
 
@@ -355,7 +365,7 @@ declare global {
355
365
  }
356
366
 
357
367
  interface TextValueField<T> extends TextInputBaseField<T> {
358
- formatString?: string
368
+ "format-string"?: string
359
369
  }
360
370
 
361
371
  interface IntegerField extends TextValueField<number> {
@@ -472,8 +482,8 @@ declare global {
472
482
  }
473
483
 
474
484
  interface TwoPaneSplitView extends VisualElement {
475
- fixedPaneIndex?: number
476
- fixedPaneInitialDimension?: number
485
+ "fixed-pane-index"?: number
486
+ "fixed-pane-initial-dimension"?: number
477
487
  orientation?: TwoPaneSplitViewOrientation
478
488
  }
479
489
 
@@ -553,8 +563,8 @@ declare global {
553
563
  }
554
564
  }
555
565
 
556
- export type IntrinsicElements = JSX.IntrinsicElements;
557
- export type CommonEvents = JSX.CommonEvents;
558
- export type VisualElement = JSX.VisualElement;
566
+ export type IntrinsicElements = JSX.IntrinsicElements
567
+ export type CommonEvents = JSX.CommonEvents
568
+ export type VisualElement = JSX.VisualElement
559
569
 
560
- export { };
570
+ export { }
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": "2.0.10",
4
+ "version": "2.0.12",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./typings.d.ts",
7
7
  "bin": {