diff --git a/packages/core/package.json b/packages/core/package.json index 67d14cad..d5972017 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@dark-engine/core", - "version": "0.20.1", + "version": "0.21.0", "description": "The lightweight and powerful UI rendering engine without dependencies and written in TypeScript (Browser, Node.js, Android, iOS)", "author": "AlexPlex", "license": "MIT", diff --git a/packages/core/src/component/component.ts b/packages/core/src/component/component.ts index 25116079..285bc322 100644 --- a/packages/core/src/component/component.ts +++ b/packages/core/src/component/component.ts @@ -1,9 +1,11 @@ import type { DarkElementKey, DarkElementInstance } from '../shared'; -import { __DEV__, ATTR_KEY, ATTR_FLAG, Flag } from '../constants'; +import { ATTR_KEY, ATTR_FLAG, Flag } from '../constants'; import { error, detectIsEmpty } from '../helpers'; import type { Ref } from '../ref'; import type { CreateElement, ComponentFactory, ComponentOptions, ShouldUpdate, StandardComponentProps } from './types'; +const __DEV__ = process.env.NODE_ENV === 'development'; + const $$component = Symbol('component'); class Component

{ public type: CreateElement

; diff --git a/packages/core/src/constants.ts b/packages/core/src/constants.ts index 06d4bec2..a53feaff 100644 --- a/packages/core/src/constants.ts +++ b/packages/core/src/constants.ts @@ -1,5 +1,4 @@ -export const VERSION = '0.20.1'; -export const __DEV__ = process.env.NODE_ENV === 'development'; +export const VERSION = '0.21.0'; export const ROOT = 'root'; export const REPLACER = 'dark:matter'; export const INDEX_KEY = 'dark:idx'; diff --git a/packages/core/src/fiber/fiber.ts b/packages/core/src/fiber/fiber.ts index a9f22ae3..3d68d3d8 100644 --- a/packages/core/src/fiber/fiber.ts +++ b/packages/core/src/fiber/fiber.ts @@ -44,7 +44,7 @@ import { import { detectIsMemo } from '../memo'; import type { Context, ContextProviderValue } from '../context'; import type { DarkElementKey, DarkElement, DarkElementInstance } from '../shared'; -import { __DEV__, INDEX_KEY, TYPE, Flag } from '../constants'; +import { INDEX_KEY, TYPE, Flag } from '../constants'; import { type NativeElement, type Hook, EffectTag } from './types'; import { hasEffects } from '../use-effect'; import { hasLayoutEffects } from '../use-layout-effect'; @@ -54,6 +54,8 @@ import { unmountFiber } from '../unmount'; import { Text } from '../view'; import { Fragment, detectIsFragment } from '../fragment'; +const __DEV__ = process.env.NODE_ENV === 'development'; + const cloneTagMap = { [EffectTag.CREATE]: true, }; diff --git a/packages/core/src/hot/hot.ts b/packages/core/src/hot/hot.ts index a77d5ef5..b9c68833 100644 --- a/packages/core/src/hot/hot.ts +++ b/packages/core/src/hot/hot.ts @@ -1,5 +1,6 @@ import { hot } from '../scope'; -import { __DEV__ } from '../constants'; + +const __DEV__ = process.env.NODE_ENV === 'development'; function hot$(update: () => void) { if (__DEV__) { diff --git a/packages/native-navigation/package.json b/packages/native-navigation/package.json index 23292cee..bd483162 100644 --- a/packages/native-navigation/package.json +++ b/packages/native-navigation/package.json @@ -1,6 +1,6 @@ { "name": "@dark-engine/native-navigation", - "version": "0.20.1", + "version": "0.21.0", "description": "Dark navigation for NativeScript platform", "author": "AlexPlex", "license": "MIT", diff --git a/packages/native-navigation/src/constants.ts b/packages/native-navigation/src/constants.ts index 4ece886f..178680a0 100644 --- a/packages/native-navigation/src/constants.ts +++ b/packages/native-navigation/src/constants.ts @@ -1,4 +1,4 @@ -export const VERSION = '0.20.1'; +export const VERSION = '0.21.0'; export const SLASH = '/'; export enum TransitionName { diff --git a/packages/platform-browser/package.json b/packages/platform-browser/package.json index dfa36deb..a7ba77d5 100644 --- a/packages/platform-browser/package.json +++ b/packages/platform-browser/package.json @@ -1,6 +1,6 @@ { "name": "@dark-engine/platform-browser", - "version": "0.20.1", + "version": "0.21.0", "description": "Dark renderer for browser", "author": "AlexPlex", "license": "MIT", diff --git a/packages/platform-browser/src/constants.ts b/packages/platform-browser/src/constants.ts index f89ec5ab..989360ba 100644 --- a/packages/platform-browser/src/constants.ts +++ b/packages/platform-browser/src/constants.ts @@ -1,4 +1,4 @@ -export const VERSION = '0.20.1'; +export const VERSION = '0.21.0'; export const SVG_TAG_NAMES = 'svg,animate,animateMotion,animateTransform,circle,clipPath,defs,desc,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,image,line,linearGradient,marker,mask,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,stop,switch,symbol,text,textPath,tspan,use,view'; export const VOID_TAG_NAMES = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'; diff --git a/packages/platform-native/package.json b/packages/platform-native/package.json index ab92d28e..2e50ec27 100644 --- a/packages/platform-native/package.json +++ b/packages/platform-native/package.json @@ -1,6 +1,6 @@ { "name": "@dark-engine/platform-native", - "version": "0.20.1", + "version": "0.21.0", "description": "Dark renderer to native platforms like Android and iOS via NativeScript", "author": "AlexPlex", "license": "MIT", diff --git a/packages/platform-native/src/constants.ts b/packages/platform-native/src/constants.ts index 0af63c69..4f82cd70 100644 --- a/packages/platform-native/src/constants.ts +++ b/packages/platform-native/src/constants.ts @@ -1,4 +1,4 @@ -export const VERSION = '0.20.1'; +export const VERSION = '0.21.0'; export const ANDROID = 'android'; export const IOS = 'ios'; export const ATTR_TEXT = 'text'; diff --git a/packages/platform-server/package.json b/packages/platform-server/package.json index 6f5f3816..87638324 100644 --- a/packages/platform-server/package.json +++ b/packages/platform-server/package.json @@ -1,6 +1,6 @@ { "name": "@dark-engine/platform-server", - "version": "0.20.1", + "version": "0.21.0", "description": "Dark renderer for server", "author": "AlexPlex", "license": "MIT", diff --git a/packages/platform-server/src/constants.ts b/packages/platform-server/src/constants.ts index ad18b277..fcce7ca0 100644 --- a/packages/platform-server/src/constants.ts +++ b/packages/platform-server/src/constants.ts @@ -1,2 +1,2 @@ -export const VERSION = '0.20.1'; +export const VERSION = '0.21.0'; export const VOID_TAG_NAMES = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'; diff --git a/packages/web-router/package.json b/packages/web-router/package.json index 328b6969..0817c1d7 100644 --- a/packages/web-router/package.json +++ b/packages/web-router/package.json @@ -1,6 +1,6 @@ { "name": "@dark-engine/web-router", - "version": "0.20.1", + "version": "0.21.0", "description": "The isomorphic Dark router designed for rendering universal web applications that work both on the client and on the server", "author": "AlexPlex", "license": "MIT", diff --git a/packages/web-router/src/constants.ts b/packages/web-router/src/constants.ts index 04f47b62..67239ea2 100644 --- a/packages/web-router/src/constants.ts +++ b/packages/web-router/src/constants.ts @@ -1,4 +1,4 @@ -export const VERSION = '0.20.1'; +export const VERSION = '0.21.0'; export const SLASH = '/'; export const PARAMETER = ':'; export const WILDCARD = '**';