Skip to content

Commit

Permalink
version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
atellmer committed Nov 27, 2022
1 parent e6ae99f commit 357e153
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 19 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.9.14",
"version": "0.9.15",
"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
2 changes: 1 addition & 1 deletion packages/core/types/element/element.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ declare function createElement(
props: any,
...children: Array<any>
): ComponentFactory | TagVirtualNodeFactory | null;
export { createElement };
export { createElement, createElement as h };
5 changes: 2 additions & 3 deletions packages/core/types/fiber/fiber.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ declare class Fiber<N = NativeElement> {
alternate: Fiber<N>;
effectTag: EffectTag;
instance: DarkElementInstance;
hook: Hook;
hook: Hook | null;
shadow: Fiber<N>;
provider: Map<Context, ContextProviderValue>;
transposition: boolean;
Expand All @@ -34,12 +34,11 @@ declare class Fiber<N = NativeElement> {
}
declare function workLoop(): boolean;
declare function hasChildrenProp(element: DarkElementInstance): element is TagVirtualNode | ComponentFactory;
declare function createHook(): Hook;
declare type CreateUpdateCallbackOptions = {
rootId: number;
fiber: Fiber;
forceStart?: boolean;
onStart: () => void;
};
declare function createUpdateCallback(options: CreateUpdateCallbackOptions): () => void;
export { Fiber, workLoop, createHook, hasChildrenProp, createUpdateCallback };
export { Fiber, workLoop, hasChildrenProp, createUpdateCallback };
2 changes: 1 addition & 1 deletion packages/core/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './component';
export * from './context';
export { createElement as h } from './element';
export { h } from './element';
export * from './fiber';
export * from './fragment';
export * from './platform';
Expand Down
21 changes: 13 additions & 8 deletions packages/core/types/lazy/lazy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@ declare function lazy<P, R = unknown>(
dynamic: () => Promise<{
default: Component<P>;
}>,
): ({
ref,
...rest
}: P &
import('../component').KeyProps &
import('../component').RefProps<unknown> &
import('../component').RefProps<R>) => import('../component/component').ComponentFactory<
done?: () => void,
): (
props: P &
import('../component').KeyProps &
import('../component').RefProps<unknown> &
import('../component').RefProps<R>,
) => import('../component/component').ComponentFactory<
P & import('../component').KeyProps & import('../component').RefProps<unknown>,
R
>;
declare const detectIsLazy: (factory: unknown) => boolean;
export { lazy, detectIsLazy };
declare function fetchModule(
dynamic: () => Promise<{
default: Component;
}>,
): Promise<Component<any, any>>;
export { lazy, detectIsLazy, fetchModule };
4 changes: 1 addition & 3 deletions packages/core/types/ref/ref.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import type { Component, RefProps, ComponentFactory } from '../component';
import type { MutableRef } from './types';
declare function forwardRef<P, R>(
component: Component<P, R>,
): ({ ref, ...rest }: P & RefProps<R>) => ComponentFactory<P, R>;
declare function forwardRef<P, R>(component: Component<P, R>): (props: P & RefProps<R>) => ComponentFactory<P, R>;
declare const detectIsMutableRef: (ref: unknown) => ref is MutableRef<unknown>;
export { forwardRef, detectIsMutableRef };
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import type { MutableRef } from '../ref';
declare function useImperativeHandle<T>(ref: MutableRef<T>, createHandle: () => T, deps: Array<any>): void;
declare function useImperativeHandle<T>(ref: MutableRef<T>, createHandle: () => T, deps?: Array<any>): void;
export { useImperativeHandle };
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.9.14",
"version": "0.9.15",
"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 357e153

Please sign in to comment.