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.
- package/.vscode/settings.json +6 -0
- package/definitions/app.d.ts +52050 -52048
- package/definitions/augments.d.ts +28 -0
- package/definitions/index.d.ts +5 -4
- package/definitions/jsx.d.ts +389 -369
- package/definitions/onejs.d.ts +2 -1
- package/definitions/preact.jsx.d.ts +6 -6
- package/dist/dom/document.d.ts +14 -0
- package/dist/dom/document.js +22 -0
- package/dist/dom/dom-style.d.ts +7 -0
- package/dist/dom/dom-style.js +18 -0
- package/dist/dom/dom.d.ts +32 -0
- package/dist/dom/dom.js +62 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +36 -0
- package/dist/preloads/inject.d.ts +2 -0
- package/dist/preloads/inject.js +35 -0
- package/dist/styling/index.d.ts +9 -0
- package/dist/styling/index.js +23 -0
- package/dist/styling/utils/generateAlphabeticName.d.ts +1 -0
- package/dist/styling/utils/generateAlphabeticName.js +16 -0
- package/dist/styling/utils/generateComponentId.d.ts +1 -0
- package/dist/styling/utils/generateComponentId.js +5 -0
- package/dist/styling/utils/hash.d.ts +5 -0
- package/dist/styling/utils/hash.js +34 -0
- package/dist/utils/color-palettes.d.ts +2 -0
- package/dist/utils/color-palettes.js +2 -0
- package/dist/utils/color-parser.d.ts +161 -0
- package/dist/utils/color-parser.js +241 -0
- package/dist/utils/float-parser.d.ts +7 -0
- package/dist/utils/float-parser.js +23 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +11 -0
- package/dom/document.ts +34 -0
- package/dom/dom-style.ts +25 -0
- package/dom/dom.ts +76 -0
- package/index.ts +14 -9
- package/package.json +8 -3
- package/styling/index.tsx +1 -54
- package/tsconfig.json +28 -0
- package/typings.d.ts +4 -0
- package/3rdparty/preact/LICENSE +0 -21
- package/3rdparty/preact/clone-element.ts +0 -45
- package/3rdparty/preact/compat/Children.ts +0 -21
- package/3rdparty/preact/compat/forwardRef.ts +0 -49
- package/3rdparty/preact/compat/index.ts +0 -3
- package/3rdparty/preact/compat/memo.ts +0 -34
- package/3rdparty/preact/compat/util.ts +0 -38
- package/3rdparty/preact/component.ts +0 -235
- package/3rdparty/preact/constants.ts +0 -3
- package/3rdparty/preact/create-context.ts +0 -71
- package/3rdparty/preact/create-element.ts +0 -98
- package/3rdparty/preact/diff/catch-error.ts +0 -40
- package/3rdparty/preact/diff/children.ts +0 -355
- package/3rdparty/preact/diff/index.ts +0 -563
- package/3rdparty/preact/diff/props.ts +0 -174
- package/3rdparty/preact/hooks/index.ts +0 -536
- package/3rdparty/preact/hooks/internal.d.ts +0 -85
- package/3rdparty/preact/hooks.d.ts +0 -145
- package/3rdparty/preact/index.ts +0 -13
- package/3rdparty/preact/internal.d.ts +0 -155
- package/3rdparty/preact/jsx-runtime/index.ts +0 -80
- package/3rdparty/preact/jsx.d.ts +0 -1008
- package/3rdparty/preact/options.ts +0 -16
- package/3rdparty/preact/preact.d.ts +0 -317
- package/3rdparty/preact/render.ts +0 -76
- package/3rdparty/preact/signals/index.ts +0 -443
- package/3rdparty/preact/signals/internal.d.ts +0 -36
- package/3rdparty/preact/signals-core/index.ts +0 -663
- package/3rdparty/preact/style.d.ts +0 -205
- package/3rdparty/preact/util.ts +0 -29
- 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 { }
|
package/definitions/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference path="./app.d.ts" />
|
|
2
|
-
/// <reference path="./
|
|
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" />
|