-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
295 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,9 @@ | |
], | ||
"@typescript-eslint/no-var-requires": [ | ||
"off" | ||
], | ||
"@typescript-eslint/no-empty-interface": [ | ||
"off" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ npm-debug.log | |
.DS_Store | ||
Thumbs.db | ||
yarn-error.log | ||
/umd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const shell = require('shelljs'); | ||
|
||
shell.rm('-rf', 'types/*'); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ | |
"./**/*.ts" | ||
], | ||
"exclude": [ | ||
"src/**/*.spec.ts" | ||
"./**/*.spec.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,6 +229,17 @@ ansi-styles@^4.1.0: | |
dependencies: | ||
color-convert "^2.0.1" | ||
|
||
balanced-match@^1.0.0: | ||
version "1.0.2" | ||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" | ||
|
||
brace-expansion@^1.1.7: | ||
version "1.1.11" | ||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" | ||
dependencies: | ||
balanced-match "^1.0.0" | ||
concat-map "0.0.1" | ||
|
||
braces@^3.0.2: | ||
version "3.0.2" | ||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" | ||
|
@@ -293,6 +304,10 @@ commander@^7.0.0: | |
version "7.2.0" | ||
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" | ||
|
||
[email protected]: | ||
version "0.0.1" | ||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" | ||
|
||
cross-spawn@^7.0.3: | ||
version "7.0.3" | ||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" | ||
|
@@ -374,6 +389,10 @@ find-up@^4.0.0: | |
locate-path "^5.0.0" | ||
path-exists "^4.0.0" | ||
|
||
fs.realpath@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" | ||
|
||
function-bind@^1.1.1: | ||
version "1.1.1" | ||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" | ||
|
@@ -382,6 +401,17 @@ glob-to-regexp@^0.4.1: | |
version "0.4.1" | ||
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" | ||
|
||
glob@^7.0.0: | ||
version "7.2.3" | ||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" | ||
dependencies: | ||
fs.realpath "^1.0.0" | ||
inflight "^1.0.4" | ||
inherits "2" | ||
minimatch "^3.1.1" | ||
once "^1.3.0" | ||
path-is-absolute "^1.0.0" | ||
|
||
graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: | ||
version "4.2.10" | ||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" | ||
|
@@ -403,6 +433,21 @@ import-local@^3.0.2: | |
pkg-dir "^4.2.0" | ||
resolve-cwd "^3.0.0" | ||
|
||
inflight@^1.0.4: | ||
version "1.0.6" | ||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" | ||
dependencies: | ||
once "^1.3.0" | ||
wrappy "1" | ||
|
||
inherits@2: | ||
version "2.0.4" | ||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" | ||
|
||
interpret@^1.0.0: | ||
version "1.4.0" | ||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" | ||
|
||
interpret@^2.2.0: | ||
version "2.2.0" | ||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" | ||
|
@@ -488,6 +533,12 @@ mime-types@^2.1.27: | |
dependencies: | ||
mime-db "1.52.0" | ||
|
||
minimatch@^3.1.1: | ||
version "3.1.2" | ||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" | ||
dependencies: | ||
brace-expansion "^1.1.7" | ||
|
||
neo-async@^2.6.2: | ||
version "2.6.2" | ||
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" | ||
|
@@ -496,6 +547,12 @@ node-releases@^2.0.5: | |
version "2.0.6" | ||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" | ||
|
||
once@^1.3.0: | ||
version "1.4.0" | ||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" | ||
dependencies: | ||
wrappy "1" | ||
|
||
p-limit@^2.2.0: | ||
version "2.3.0" | ||
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" | ||
|
@@ -516,6 +573,10 @@ path-exists@^4.0.0: | |
version "4.0.0" | ||
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" | ||
|
||
path-is-absolute@^1.0.0: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" | ||
|
||
path-key@^3.1.0: | ||
version "3.1.1" | ||
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" | ||
|
@@ -548,6 +609,12 @@ randombytes@^2.1.0: | |
dependencies: | ||
safe-buffer "^5.1.0" | ||
|
||
rechoir@^0.6.2: | ||
version "0.6.2" | ||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" | ||
dependencies: | ||
resolve "^1.1.6" | ||
|
||
rechoir@^0.7.0: | ||
version "0.7.1" | ||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" | ||
|
@@ -564,7 +631,7 @@ resolve-from@^5.0.0: | |
version "5.0.0" | ||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" | ||
|
||
resolve@^1.9.0: | ||
resolve@^1.1.6, resolve@^1.9.0: | ||
version "1.22.1" | ||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" | ||
dependencies: | ||
|
@@ -612,6 +679,14 @@ shebang-regex@^3.0.0: | |
version "3.0.0" | ||
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" | ||
|
||
shelljs@^0.8.5: | ||
version "0.8.5" | ||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" | ||
dependencies: | ||
glob "^7.0.0" | ||
interpret "^1.0.0" | ||
rechoir "^0.6.2" | ||
|
||
source-map-support@~0.5.20: | ||
version "0.5.21" | ||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" | ||
|
@@ -768,6 +843,10 @@ wildcard@^2.0.0: | |
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" | ||
|
||
wrappy@1: | ||
version "1.0.2" | ||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" | ||
|
||
yallist@^4.0.0: | ||
version "4.0.0" | ||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/umd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const shell = require('shelljs'); | ||
|
||
shell.rm('-rf', 'types/core'); | ||
shell.cp('-R', ' types/platform-browser/src/*', 'types'); | ||
shell.rm('-rf', ' types/platform-browser'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const shell = require('shelljs'); | ||
|
||
shell.rm('-rf', 'types/*'); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig", | ||
"include": [ | ||
"./**/*.ts" | ||
], | ||
"exclude": [ | ||
"./**/*.spec.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { type DarkElement } from '@dark-engine/core'; | ||
declare function createRoot(container: Element): { | ||
render: (element: DarkElement) => void; | ||
unmount: () => void; | ||
}; | ||
export { createRoot }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './create-root'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { type Fiber, type VirtualNode } from '@dark-engine/core'; | ||
import type { DOMElement } from './types'; | ||
declare let trackUpdate: (nativeElement: Element) => void; | ||
declare function createNativeElement(vNode: VirtualNode): DOMElement; | ||
declare function applyCommit(fiber: Fiber<Element>): void; | ||
declare function finishCommitWork(): void; | ||
declare function setTrackUpdate(fn: typeof trackUpdate): void; | ||
export { createNativeElement, applyCommit, finishCommitWork, setTrackUpdate }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './dom'; | ||
export * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export declare type DOMElement = HTMLElement | SVGElement | Text | Comment; | ||
export declare type DOMFragment = { | ||
fragment: DocumentFragment; | ||
callback: () => void; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
declare class SyntheticEvent<E extends Event, T = Element> { | ||
type: string; | ||
sourceEvent: E; | ||
target: T; | ||
private propagation; | ||
constructor(options: Pick<SyntheticEvent<E, T>, 'sourceEvent' | 'target'>); | ||
stopPropagation(): void; | ||
preventDefault(): void; | ||
getPropagation(): boolean; | ||
} | ||
declare type DelegateEventOptions = { | ||
target: Element; | ||
eventName: string; | ||
handler: (e: Event) => void; | ||
}; | ||
declare function delegateEvent(options: DelegateEventOptions): void; | ||
declare const detectIsEvent: (attrName: string) => boolean; | ||
declare const getEventName: (attrName: string) => string; | ||
export { SyntheticEvent, delegateEvent, detectIsEvent, getEventName }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './events'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export { render } from './render'; | ||
export { createRoot } from './create-root'; | ||
export { createPortal } from './portal'; | ||
export { useStyle } from './use-style'; | ||
export { setTrackUpdate } from './dom'; | ||
export type { SyntheticEvent } from './events'; | ||
export declare const version: string; | ||
declare global { | ||
namespace JSX { | ||
interface IntrinsicElements {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './portal'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { type Fiber, type DarkElement, type ComponentFactory } from '@dark-engine/core'; | ||
declare const $$portal: unique symbol; | ||
declare function createPortal( | ||
slot: DarkElement, | ||
container: Element, | ||
): ComponentFactory< | ||
PortalProps & | ||
import('@dark-engine/core').KeyProps & | ||
Readonly<{ | ||
slot?: DarkElement; | ||
}> & | ||
import('@dark-engine/core').RefProps<unknown>, | ||
any | ||
>; | ||
declare type PortalProps = { | ||
[$$portal]: Element; | ||
slot: DarkElement; | ||
}; | ||
declare const detectIsPortal: (factory: unknown) => factory is ComponentFactory<any, any>; | ||
declare const getPortalContainer: (factory: unknown) => Element | null; | ||
declare function unmountPortal(fiber: Fiber<Element>): void; | ||
export { createPortal, detectIsPortal, getPortalContainer, unmountPortal }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './render'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { type DarkElement } from '@dark-engine/core'; | ||
declare const roots: Map<Element, number>; | ||
declare function render(element: DarkElement, container: Element): void; | ||
export { render, roots }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './scheduler'; |
Oops, something went wrong.