onejs-core 0.3.5 → 0.3.6

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 (72) hide show
  1. package/.vscode/settings.json +6 -0
  2. package/definitions/app.d.ts +52050 -52048
  3. package/definitions/augments.d.ts +28 -0
  4. package/definitions/index.d.ts +5 -4
  5. package/definitions/jsx.d.ts +389 -369
  6. package/definitions/onejs.d.ts +2 -1
  7. package/definitions/preact.jsx.d.ts +6 -6
  8. package/dist/dom/document.d.ts +14 -0
  9. package/dist/dom/document.js +22 -0
  10. package/dist/dom/dom-style.d.ts +7 -0
  11. package/dist/dom/dom-style.js +18 -0
  12. package/dist/dom/dom.d.ts +32 -0
  13. package/dist/dom/dom.js +62 -0
  14. package/dist/index.d.ts +20 -0
  15. package/dist/index.js +36 -0
  16. package/dist/preloads/inject.d.ts +2 -0
  17. package/dist/preloads/inject.js +35 -0
  18. package/dist/styling/index.d.ts +9 -0
  19. package/dist/styling/index.js +23 -0
  20. package/dist/styling/utils/generateAlphabeticName.d.ts +1 -0
  21. package/dist/styling/utils/generateAlphabeticName.js +16 -0
  22. package/dist/styling/utils/generateComponentId.d.ts +1 -0
  23. package/dist/styling/utils/generateComponentId.js +5 -0
  24. package/dist/styling/utils/hash.d.ts +5 -0
  25. package/dist/styling/utils/hash.js +34 -0
  26. package/dist/utils/color-palettes.d.ts +2 -0
  27. package/dist/utils/color-palettes.js +2 -0
  28. package/dist/utils/color-parser.d.ts +161 -0
  29. package/dist/utils/color-parser.js +241 -0
  30. package/dist/utils/float-parser.d.ts +7 -0
  31. package/dist/utils/float-parser.js +23 -0
  32. package/dist/utils/index.d.ts +8 -0
  33. package/dist/utils/index.js +11 -0
  34. package/dom/document.ts +34 -0
  35. package/dom/dom-style.ts +25 -0
  36. package/dom/dom.ts +76 -0
  37. package/index.ts +14 -9
  38. package/package.json +8 -3
  39. package/styling/index.tsx +1 -54
  40. package/tsconfig.json +28 -0
  41. package/typings.d.ts +4 -0
  42. package/3rdparty/preact/LICENSE +0 -21
  43. package/3rdparty/preact/clone-element.ts +0 -45
  44. package/3rdparty/preact/compat/Children.ts +0 -21
  45. package/3rdparty/preact/compat/forwardRef.ts +0 -49
  46. package/3rdparty/preact/compat/index.ts +0 -3
  47. package/3rdparty/preact/compat/memo.ts +0 -34
  48. package/3rdparty/preact/compat/util.ts +0 -38
  49. package/3rdparty/preact/component.ts +0 -235
  50. package/3rdparty/preact/constants.ts +0 -3
  51. package/3rdparty/preact/create-context.ts +0 -71
  52. package/3rdparty/preact/create-element.ts +0 -98
  53. package/3rdparty/preact/diff/catch-error.ts +0 -40
  54. package/3rdparty/preact/diff/children.ts +0 -355
  55. package/3rdparty/preact/diff/index.ts +0 -563
  56. package/3rdparty/preact/diff/props.ts +0 -174
  57. package/3rdparty/preact/hooks/index.ts +0 -536
  58. package/3rdparty/preact/hooks/internal.d.ts +0 -85
  59. package/3rdparty/preact/hooks.d.ts +0 -145
  60. package/3rdparty/preact/index.ts +0 -13
  61. package/3rdparty/preact/internal.d.ts +0 -155
  62. package/3rdparty/preact/jsx-runtime/index.ts +0 -80
  63. package/3rdparty/preact/jsx.d.ts +0 -1008
  64. package/3rdparty/preact/options.ts +0 -16
  65. package/3rdparty/preact/preact.d.ts +0 -317
  66. package/3rdparty/preact/render.ts +0 -76
  67. package/3rdparty/preact/signals/index.ts +0 -443
  68. package/3rdparty/preact/signals/internal.d.ts +0 -36
  69. package/3rdparty/preact/signals-core/index.ts +0 -663
  70. package/3rdparty/preact/style.d.ts +0 -205
  71. package/3rdparty/preact/util.ts +0 -29
  72. package/hooks/eventful.ts +0 -56
@@ -1,16 +1,44 @@
1
1
  declare global {
2
2
  interface Document {
3
3
  addRuntimeUSS(uss: string): void
4
+
5
+ // createElement(tagName: string): CS.OneJS.Dom.Dom
6
+ // createTextNode(text: string): CS.OneJS.Dom.Dom
4
7
  }
5
8
 
6
9
  interface Element {
7
10
  classname: string
11
+ nodeType: number
8
12
  ve: CS.UnityEngine.UIElements.VisualElement
9
13
  }
10
14
 
11
15
  interface HTMLElement {
12
16
  style: CS.OneJS.Dom.DomStyle
13
17
  }
18
+
19
+ const document: Document
20
+ const setTimeout: (callback: () => void, delay?: number) => number
21
+ const clearTimeout: (id: number) => void
22
+ const setInterval: (callback: () => void, delay?: number) => number
23
+ const clearInterval: (id: number) => void
24
+ const requestAnimationFrame: (callback: (time: number) => void) => number
25
+ const cancelAnimationFrame: (id: number) => void
26
+
27
+ const console: {
28
+ log: (...args: any[]) => void
29
+ error: (...args: any[]) => void
30
+ warn: (...args: any[]) => void
31
+ info: (...args: any[]) => void
32
+ debug: (...args: any[]) => void
33
+ }
34
+
35
+ interface Event {
36
+ type: string
37
+ }
38
+ interface Text {
39
+ data: string
40
+ nodeType: number
41
+ }
14
42
  }
15
43
 
16
44
  export { }
@@ -1,9 +1,10 @@
1
1
  /// <reference path="./app.d.ts" />
2
- /// <reference path="./modules.d.ts" />
3
- /// <reference path="./onejs.d.ts" />
2
+ /// <reference path="./augments.d.ts" />
4
3
  /// <reference path="./globals.d.ts" />
5
4
  /// <reference path="./jsx.d.ts" />
5
+ /// <reference path="./modules.d.ts" />
6
+ /// <reference path="./onejs.d.ts" />
6
7
  /// <reference path="./preact.jsx.d.ts" />
8
+ /// <reference path="./proto-overrides.d.ts" />
7
9
  /// <reference path="./puerts.d.ts" />
8
- /// <reference path="./unity-engine.d.ts" />
9
- /// <reference path="./proto-overrides.d.ts" />
10
+ /// <reference path="./unity-engine.d.ts" />