Skip to content

Commit

Permalink
version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
atellmer committed Nov 29, 2022
1 parent d31a9da commit d799cab
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dark-engine/core",
"version": "0.10.1",
"version": "0.11.0",
"description": "Dark is lightweight (10 Kb gzipped) component-and-hook-based UI rendering engine for javascript apps without dependencies and written in TypeScript 💫",
"author": "AlexPlex",
"license": "MIT",
Expand Down
8 changes: 5 additions & 3 deletions packages/core/types/fiber/fiber.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,22 @@ declare class Fiber<N = NativeElement> {
provider: Map<Context, ContextProviderValue>;
transposition: boolean;
mountedToHost: boolean;
portalHost: boolean;
effectHost: boolean;
layoutEffectHost: boolean;
insertionEffectHost: boolean;
portalHost: boolean;
childrenCount: number;
marker: string;
isUsed: boolean;
idx: number;
batched: () => void | null;
catchException: (error: Error) => void;
constructor(options: Partial<Fiber<N>>);
markPortalHost(): void;
markMountedToHost(): void;
markEffectHost(): void;
markLayoutEffectHost(): void;
markMountedToHost(): void;
markInsertionEffectHost(): void;
markPortalHost(): void;
setError(error: Error): void;
}
declare function workLoop(): boolean;
Expand Down
32 changes: 17 additions & 15 deletions packages/core/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,28 @@ export * from './ref';
export * from './scope';
export * from './shared';
export * from './suspense';
export * from './use-callback';
export * from './use-context';
export * from './use-deferred-value';
export { useCallback } from './use-callback';
export { useContext } from './use-context';
export { useDeferredValue } from './use-deferred-value';
export { useEffect } from './use-effect';
export * from './use-error';
export * from './use-event';
export * from './use-imperative-handle';
export { useLayoutEffect } from './use-layout-effect';
export * from './use-memo';
export * from './use-reducer';
export * from './use-ref';
export * from './use-update';
export * from './use-state';
export * from './use-reactive-state';
export * from './use-id';
export * from './view';
export * from './constants';
export { useInsertionEffect } from './use-insertion-effect';
export { useError } from './use-error';
export { useEvent } from './use-event';
export { useImperativeHandle } from './use-imperative-handle';
export { useMemo } from './use-memo';
export { useReducer } from './use-reducer';
export { useRef } from './use-ref';
export { useUpdate } from './use-update';
export { useState } from './use-state';
export { useReactiveState } from './use-reactive-state';
export { useId } from './use-id';
export { useSyncExternalStore } from './use-sync-external-store';
export { walkFiber } from './walk';
export { unmountRoot } from './unmount';
export { batch } from './batch';
export * from './view';
export * from './constants';
export declare const version: string;
declare global {
namespace JSX {
Expand Down
11 changes: 11 additions & 0 deletions packages/core/types/scope/scope.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,19 @@ declare const layoutEffectsStore: {
reset: () => any[];
add: (effect: () => void) => number;
};
declare const insertionEffectsStore: {
get: () => (() => void)[];
reset: () => any[];
add: (effect: () => void) => number;
};
declare const isLayoutEffectsZone: {
get: () => boolean;
set: (value: boolean) => boolean;
};
declare const isInsertionEffectsZone: {
get: (id?: number) => boolean;
set: (value: boolean) => boolean;
};
declare const isUpdateHookZone: {
get: () => boolean;
set: (value: boolean) => boolean;
Expand All @@ -74,7 +83,9 @@ export {
fiberMountStore,
effectsStore,
layoutEffectsStore,
insertionEffectsStore,
isLayoutEffectsZone,
isInsertionEffectsZone,
isUpdateHookZone,
isBatchZone,
};
1 change: 1 addition & 0 deletions packages/core/types/use-insertion-effect/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './use-insertion-effect';
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare const useInsertionEffect: (effect: import('../use-effect/types').Effect, deps?: any[]) => void,
hasInsertionEffects: (fiber: import('../fiber/fiber').Fiber<unknown>) => boolean,
dropInsertionEffects: (
hook: import('..').Hook<import('..').HookValue<import('../use-effect/types').DropEffect>>,
) => void;
export { useInsertionEffect, hasInsertionEffects, dropInsertionEffects };
1 change: 1 addition & 0 deletions packages/core/types/use-sync-external-store/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './use-sync-external-store';
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare type Sunscribe = (cb: () => void) => Unsubscribe;
declare type Unsubscribe = () => void;
declare function useSyncExternalStore<T>(subscribe: Sunscribe, getSnapshot: () => T): T;
export { useSyncExternalStore };
2 changes: 1 addition & 1 deletion packages/platform-browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dark-engine/platform-browser",
"version": "0.10.1",
"version": "0.11.0",
"description": "Dark is lightweight (10 Kb gzipped) component-and-hook-based UI rendering engine for javascript apps without dependencies and written in TypeScript 💫",
"author": "AlexPlex",
"license": "MIT",
Expand Down

0 comments on commit d799cab

Please sign in to comment.