From 1668b2dbe0fcde38d3d0689ac230ce3bcdc712cb Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Wed, 20 Sep 2023 03:21:07 +0330 Subject: [PATCH 1/9] fix: ts refs --- packages/demo-pwa/tsconfig.json | 13 +++++-------- packages/fract/tsconfig.json | 5 +---- packages/i18n/tsconfig.json | 7 +------ packages/icon/tsconfig.json | 6 +----- packages/router/tsconfig.json | 7 +------ packages/style/tsconfig.json | 4 +--- packages/ui-kit/tsconfig.json | 4 ---- 7 files changed, 10 insertions(+), 36 deletions(-) diff --git a/packages/demo-pwa/tsconfig.json b/packages/demo-pwa/tsconfig.json index 61517a0a..190755ff 100644 --- a/packages/demo-pwa/tsconfig.json +++ b/packages/demo-pwa/tsconfig.json @@ -17,13 +17,10 @@ "include": ["src/**/*.ts"], "exclude": [], "references": [ - {"path": "../../core/type"}, - {"path": "../../core/util"}, - {"path": "../../core/fract"}, - {"path": "../../core/router2"}, - {"path": "../../core/i18n2"}, - {"path": "../../packages/ui-kit"}, - {"path": "../../packages/ui-kit2"}, - {"path": "../../packages/style"} + {"path": "../fract"}, + {"path": "../router"}, + {"path": "../i18n"}, + {"path": "../style"}, + {"path": "../ui-kit"} ] } diff --git a/packages/fract/tsconfig.json b/packages/fract/tsconfig.json index 2c039985..51646795 100644 --- a/packages/fract/tsconfig.json +++ b/packages/fract/tsconfig.json @@ -9,8 +9,5 @@ "include": ["src/**/*.ts"], "exclude": [], - "references": [ - {"path": "../logger"}, - {"path": "../signal2"} - ] + "references": [] } diff --git a/packages/i18n/tsconfig.json b/packages/i18n/tsconfig.json index 4083e898..51646795 100644 --- a/packages/i18n/tsconfig.json +++ b/packages/i18n/tsconfig.json @@ -9,10 +9,5 @@ "include": ["src/**/*.ts"], "exclude": [], - "references": [ - {"path": "../type"}, - {"path": "../logger"}, - {"path": "../math"}, - {"path": "../signal2"} - ] + "references": [] } diff --git a/packages/icon/tsconfig.json b/packages/icon/tsconfig.json index fb9aae9c..1226f19b 100644 --- a/packages/icon/tsconfig.json +++ b/packages/icon/tsconfig.json @@ -15,9 +15,5 @@ "include": ["src/**/*.ts"], "exclude": [], - "references": [ - {"path": "../element"}, - {"path": "../../core/fetch"}, - {"path": "../../core/logger"} - ] + "references": [] } diff --git a/packages/router/tsconfig.json b/packages/router/tsconfig.json index 84df0035..51646795 100644 --- a/packages/router/tsconfig.json +++ b/packages/router/tsconfig.json @@ -9,10 +9,5 @@ "include": ["src/**/*.ts"], "exclude": [], - "references": [ - {"path": "../logger"}, - {"path": "../math"}, - {"path": "../type"}, - {"path": "../signal2"} - ] + "references": [] } diff --git a/packages/style/tsconfig.json b/packages/style/tsconfig.json index bb56d029..beb10a00 100644 --- a/packages/style/tsconfig.json +++ b/packages/style/tsconfig.json @@ -9,7 +9,5 @@ "include": ["**/*.ts"], "exclude": [], - "references": [ - {"path": "../../core/logger"} - ] + "references": [] } diff --git a/packages/ui-kit/tsconfig.json b/packages/ui-kit/tsconfig.json index ea1a237a..44e41242 100644 --- a/packages/ui-kit/tsconfig.json +++ b/packages/ui-kit/tsconfig.json @@ -17,9 +17,5 @@ "exclude": [], "references": [ {"path": "../../core/fract"}, - {"path": "../../core/type"}, - {"path": "../../core/i18n2"}, - {"path": "../../core/signal2"}, - {"path": "../../core/util"}, ] } From b20214bbe8d13ad3f47ec2b5d1c6219ab88699a0 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Wed, 20 Sep 2023 03:23:06 +0330 Subject: [PATCH 2/9] fix: repo paths --- packages/fract/package.json | 4 ++-- packages/i18n/package.json | 4 ++-- packages/router/CHANGELOG.md | 4 ++-- packages/router/package.json | 4 ++-- packages/ui-kit/tsconfig.json | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/fract/package.json b/packages/fract/package.json index b54310c6..2b4cd557 100644 --- a/packages/fract/package.json +++ b/packages/fract/package.json @@ -25,9 +25,9 @@ "repository": { "type": "git", "url": "https://github.com/AliMD/fract", - "directory": "core/fract" + "directory": "packages/fract" }, - "homepage": "https://github.com/AliMD/fract/tree/next/core/fract#readme", + "homepage": "https://github.com/AliMD/fract/tree/next/packages/fract#readme", "bugs": { "url": "https://github.com/AliMD/fract/issues" }, diff --git a/packages/i18n/package.json b/packages/i18n/package.json index 9a91729d..065092f8 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -25,9 +25,9 @@ "repository": { "type": "git", "url": "https://github.com/AliMD/fract", - "directory": "core/i18n" + "directory": "packages/i18n" }, - "homepage": "https://github.com/AliMD/fract/tree/next/core/i18n#readme", + "homepage": "https://github.com/AliMD/fract/tree/next/packages/i18n#readme", "bugs": { "url": "https://github.com/AliMD/fract/issues" }, diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index 88260860..94218651 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -65,7 +65,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Bug Fixes -* **core/router:** preventDefault on svg link click ([e35e935](https://github.com/AliMD/fract/commit/e35e9351857d5bcb5128afbc87eb62dd11da865e)) +* **packages/router:** preventDefault on svg link click ([e35e935](https://github.com/AliMD/fract/commit/e35e9351857d5bcb5128afbc87eb62dd11da865e)) # 0.26.0 (2022-12-22) @@ -132,7 +132,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Bug Fixes -- **core/router:** preventDefault on svg link click ([e35e935](https://github.com/AliMD/fract/commit/e35e9351857d5bcb5128afbc87eb62dd11da865e)) +- **packages/router:** preventDefault on svg link click ([e35e935](https://github.com/AliMD/fract/commit/e35e9351857d5bcb5128afbc87eb62dd11da865e)) # [0.26.0](https://github.com/AliMD/fract/compare/v0.25.0...v0.26.0) (2022-12-22) diff --git a/packages/router/package.json b/packages/router/package.json index bd51fef9..141b7c9c 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -24,9 +24,9 @@ "repository": { "type": "git", "url": "https://github.com/AliMD/fract", - "directory": "core/router2" + "directory": "packages/router2" }, - "homepage": "https://github.com/AliMD/fract/tree/next/core/router2#readme", + "homepage": "https://github.com/AliMD/fract/tree/next/packages/router2#readme", "bugs": { "url": "https://github.com/AliMD/fract/issues" }, diff --git a/packages/ui-kit/tsconfig.json b/packages/ui-kit/tsconfig.json index 44e41242..02d90cdd 100644 --- a/packages/ui-kit/tsconfig.json +++ b/packages/ui-kit/tsconfig.json @@ -16,6 +16,6 @@ "include": ["**/*.ts"], "exclude": [], "references": [ - {"path": "../../core/fract"}, + {"path": "../fract"}, ] } From ff5aae2c062050d82b0271cce4fab2f41ca15abd Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Wed, 20 Sep 2023 03:23:57 +0330 Subject: [PATCH 3/9] fix(demo): router path --- demo/{router2 => router}/index.html | 0 demo/{router2 => router}/index.ts | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename demo/{router2 => router}/index.html (100%) rename demo/{router2 => router}/index.ts (100%) diff --git a/demo/router2/index.html b/demo/router/index.html similarity index 100% rename from demo/router2/index.html rename to demo/router/index.html diff --git a/demo/router2/index.ts b/demo/router/index.ts similarity index 100% rename from demo/router2/index.ts rename to demo/router/index.ts From a4ad9f4f6db759451e84a37f6cad9606c8586c65 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Wed, 20 Sep 2023 03:26:38 +0330 Subject: [PATCH 4/9] fix: import paths --- demo/i18n/i18n.ts | 2 +- demo/index.html | 8 ++++---- demo/router/index.ts | 2 +- packages/demo-pwa/src/share/app-navigation-context.ts | 2 +- packages/demo-pwa/src/ui/alwatr-pwa.ts | 2 +- packages/fract/src/directives/observe.ts | 2 +- packages/i18n/CHANGELOG.md | 10 +++++----- packages/i18n/README.md | 2 +- packages/i18n/src/l10n.ts | 2 +- packages/router/README.md | 2 +- packages/router/package.json | 4 ++-- packages/router/src/index.ts | 2 +- packages/router/src/router2.ts | 6 +++--- packages/ui-kit/navigation-bar/navigation-bar.ts | 2 +- packages/ui-kit/navigation-drawer/navigation-drawer.ts | 2 +- packages/ui-kit/navigation-rail/navigation-rail.ts | 2 +- 16 files changed, 26 insertions(+), 26 deletions(-) diff --git a/demo/i18n/i18n.ts b/demo/i18n/i18n.ts index 85b22f4a..6ba0e51d 100644 --- a/demo/i18n/i18n.ts +++ b/demo/i18n/i18n.ts @@ -1,4 +1,4 @@ -import {l10n} from '@alwatr/i18n2'; +import {l10n} from '@alwatr/i18n'; import {createLogger} from '@alwatr/logger'; import {delay} from '@alwatr/util'; const logger = createLogger('demo/l18n', true); diff --git a/demo/index.html b/demo/index.html index 0ef10770..4e62b908 100644 --- a/demo/index.html +++ b/demo/index.html @@ -16,11 +16,11 @@
  • Logger
  • Fetch
  • Signal
  • -
  • Signal Simple
  • -
  • Context Signal
  • -
  • Signal multithread
  • +
  • Signal Simple
  • +
  • Context Signal
  • +
  • Signal multithread
  • Router
  • -
  • Router2
  • +
  • router
  • Font
  • Math
  • Icon
  • diff --git a/demo/router/index.ts b/demo/router/index.ts index 888a0104..ceee3a35 100644 --- a/demo/router/index.ts +++ b/demo/router/index.ts @@ -1,4 +1,4 @@ -import {router} from '@alwatr/router2'; +import {router} from '@alwatr/router'; import {renderState} from '@alwatr/util'; type PageName = 'home' | 'about' | 'products' | 'product' | 'contact'; diff --git a/packages/demo-pwa/src/share/app-navigation-context.ts b/packages/demo-pwa/src/share/app-navigation-context.ts index 2793e03a..79ebedd0 100644 --- a/packages/demo-pwa/src/share/app-navigation-context.ts +++ b/packages/demo-pwa/src/share/app-navigation-context.ts @@ -1,4 +1,4 @@ -import {AlwatrContextSignal} from '@alwatr/signal2'; +import {AlwatrContextSignal} from '@alwatr/signal'; import {icons} from '../icons.js'; diff --git a/packages/demo-pwa/src/ui/alwatr-pwa.ts b/packages/demo-pwa/src/ui/alwatr-pwa.ts index 4dce1dde..6837bf4f 100644 --- a/packages/demo-pwa/src/ui/alwatr-pwa.ts +++ b/packages/demo-pwa/src/ui/alwatr-pwa.ts @@ -1,5 +1,5 @@ import {AlwatrDynamicDirective, alwatrObserve, cache, directive, html, type PartInfo} from '@alwatr/fract'; -import {router, type RouteContext} from '@alwatr/router2'; +import {router, type RouteContext} from '@alwatr/router'; import {alwatrNavigationBar} from '@alwatr/ui-kit2/navigation-bar/navigation-bar.js'; import {alwatrNavigationDrawer} from '@alwatr/ui-kit2/navigation-drawer/navigation-drawer.js'; import {alwatrNavigationRail} from '@alwatr/ui-kit2/navigation-rail/navigation-rail.js'; diff --git a/packages/fract/src/directives/observe.ts b/packages/fract/src/directives/observe.ts index d412811c..f7a3a321 100644 --- a/packages/fract/src/directives/observe.ts +++ b/packages/fract/src/directives/observe.ts @@ -2,7 +2,7 @@ import {AlwatrDynamicDirective} from '../dynamic-directive.js'; import {directive, noChange, type PartInfo} from '../lit-html.js'; -import type {AlwatrObservableInterface} from '@alwatr/signal2'; +import type {AlwatrObservableInterface} from '@alwatr/signal'; class AlwatrObserveDirective> extends AlwatrDynamicDirective { protected _$observable?: T; diff --git a/packages/i18n/CHANGELOG.md b/packages/i18n/CHANGELOG.md index a5c8a7bf..65024e77 100644 --- a/packages/i18n/CHANGELOG.md +++ b/packages/i18n/CHANGELOG.md @@ -5,19 +5,19 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ## [1.0.1](https://github.com/AliMD/fract/compare/v1.0.0...v1.0.1) (2023-06-21) -**Note:** Version bump only for package @alwatr/i18n2 +**Note:** Version bump only for package @alwatr/i18n # [1.0.0](https://github.com/AliMD/fract/compare/v0.32.0...v1.0.0) (2023-06-14) ### Bug Fixes -- **i18n2:** return '' if key not exists ([2e68d1a](https://github.com/AliMD/fract/commit/2e68d1a082fb837b04fc8fe450626b507b0f2463)) -- **i18n2:** return loadingStr if resource not eixsts ([aff42e1](https://github.com/AliMD/fract/commit/aff42e18ddc61949f20cf13475520658ac1a5eb1)) -- **i18n2:** some issues & export an instacne ([b5874f3](https://github.com/AliMD/fract/commit/b5874f35051927815070a00e86c585f0e3dd291e)) +- **i18n:** return '' if key not exists ([2e68d1a](https://github.com/AliMD/fract/commit/2e68d1a082fb837b04fc8fe450626b507b0f2463)) +- **i18n:** return loadingStr if resource not eixsts ([aff42e1](https://github.com/AliMD/fract/commit/aff42e18ddc61949f20cf13475520658ac1a5eb1)) +- **i18n:** some issues & export an instacne ([b5874f3](https://github.com/AliMD/fract/commit/b5874f35051927815070a00e86c585f0e3dd291e)) ### Features -- **i18n2:** add `i18n2` class base ([4783d6b](https://github.com/AliMD/fract/commit/4783d6b7410e452a3458d72dc5ebaead62d08b2f)) +- **i18n:** add `i18n` class base ([4783d6b](https://github.com/AliMD/fract/commit/4783d6b7410e452a3458d72dc5ebaead62d08b2f)) # [0.32.0](https://github.com/AliMD/fract/compare/v0.31.0...v0.32.0) (2023-05-27) diff --git a/packages/i18n/README.md b/packages/i18n/README.md index f528cfb9..4bef30db 100644 --- a/packages/i18n/README.md +++ b/packages/i18n/README.md @@ -1,3 +1,3 @@ -# Alwatr Internationalization - `@alwatr/i18n2` +# Alwatr Internationalization - `@alwatr/i18n` Elegant powerful translation module (i18n/l10n) with dynamic json storage written in tiny TypeScript, ES module. diff --git a/packages/i18n/src/l10n.ts b/packages/i18n/src/l10n.ts index b213710d..f2397574 100644 --- a/packages/i18n/src/l10n.ts +++ b/packages/i18n/src/l10n.ts @@ -1,6 +1,6 @@ import {globalAlwatr} from '@alwatr/logger'; import {UnicodeDigits, UnicodeLangKeys} from '@alwatr/math'; -import {AlwatrObservable} from '@alwatr/signal2/observable.js'; +import {AlwatrObservable} from '@alwatr/signal/observable.js'; import {localeList} from './locale-list.js'; diff --git a/packages/router/README.md b/packages/router/README.md index 672ca02c..47a0ff8d 100644 --- a/packages/router/README.md +++ b/packages/router/README.md @@ -1,4 +1,4 @@ -# Alwatr Router2 - `@alwatr/router2` +# Alwatr router - `@alwatr/router` Elegant powerful router (fundamental advance browser page routing) based on the simplicity of the signals written in tiny TypeScript module. diff --git a/packages/router/package.json b/packages/router/package.json index 141b7c9c..ab3a3126 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -24,9 +24,9 @@ "repository": { "type": "git", "url": "https://github.com/AliMD/fract", - "directory": "packages/router2" + "directory": "packages/router" }, - "homepage": "https://github.com/AliMD/fract/tree/next/packages/router2#readme", + "homepage": "https://github.com/AliMD/fract/tree/next/packages/router#readme", "bugs": { "url": "https://github.com/AliMD/fract/issues" }, diff --git a/packages/router/src/index.ts b/packages/router/src/index.ts index 8492d77e..7f34593e 100644 --- a/packages/router/src/index.ts +++ b/packages/router/src/index.ts @@ -1,4 +1,4 @@ -import {AlwatrRouter} from './router2.js'; +import {AlwatrRouter} from './router.js'; export type {RouteContext} from './type.js'; diff --git a/packages/router/src/router2.ts b/packages/router/src/router2.ts index 2a5f9c77..33733a6c 100644 --- a/packages/router/src/router2.ts +++ b/packages/router/src/router2.ts @@ -1,18 +1,18 @@ import {createLogger, globalAlwatr} from '@alwatr/logger'; -import {AlwatrObservable} from '@alwatr/signal2/observable.js'; +import {AlwatrObservable} from '@alwatr/signal/observable.js'; import type {RouterConfig, PushState, RouteContext, RouteContextBase} from './type.js'; import type {QueryParameters} from '@alwatr/type'; globalAlwatr.registeredList.push({ - name: '@alwatr/router2', + name: '@alwatr/router', version: _ALWATR_VERSION_, }); const documentBaseUrl = document.querySelector('base')?.href || '/'; export class AlwatrRouter extends AlwatrObservable { - protected override _logger = createLogger('alwatr/router2'); + protected override _logger = createLogger('alwatr/router'); get route(): RouteContext { return this._$data ?? this._makeRouteContext(); diff --git a/packages/ui-kit/navigation-bar/navigation-bar.ts b/packages/ui-kit/navigation-bar/navigation-bar.ts index 957c8c3c..3811c477 100644 --- a/packages/ui-kit/navigation-bar/navigation-bar.ts +++ b/packages/ui-kit/navigation-bar/navigation-bar.ts @@ -1,5 +1,5 @@ import {AlwatrDirective, html, noChange, directive, mapObject, when, type PartInfo} from '@alwatr/fract'; -import {l10n} from '@alwatr/i18n2'; +import {l10n} from '@alwatr/i18n'; import {icon, type IconContent} from '../icon/icon.js'; diff --git a/packages/ui-kit/navigation-drawer/navigation-drawer.ts b/packages/ui-kit/navigation-drawer/navigation-drawer.ts index 896a8279..3b032f38 100644 --- a/packages/ui-kit/navigation-drawer/navigation-drawer.ts +++ b/packages/ui-kit/navigation-drawer/navigation-drawer.ts @@ -1,5 +1,5 @@ import {AlwatrDirective, directive, html, mapObject, when, type PartInfo, classMap, noChange} from '@alwatr/fract'; -import {l10n} from '@alwatr/i18n2'; +import {l10n} from '@alwatr/i18n'; import {icon, IconContent} from '../icon/icon.js'; diff --git a/packages/ui-kit/navigation-rail/navigation-rail.ts b/packages/ui-kit/navigation-rail/navigation-rail.ts index 3eba5440..281440da 100644 --- a/packages/ui-kit/navigation-rail/navigation-rail.ts +++ b/packages/ui-kit/navigation-rail/navigation-rail.ts @@ -1,5 +1,5 @@ import {AlwatrDirective, classMap, directive, html, mapObject, noChange, when, type PartInfo} from '@alwatr/fract'; -import {l10n} from '@alwatr/i18n2'; +import {l10n} from '@alwatr/i18n'; import {icon, type IconContent} from '../icon/icon.js'; From 2a69c08645acc331ecf9654bb9d35e2d0b902d4a Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Wed, 20 Sep 2023 03:26:53 +0330 Subject: [PATCH 5/9] fix(router): file name --- packages/router/src/{router2.ts => router.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/router/src/{router2.ts => router.ts} (100%) diff --git a/packages/router/src/router2.ts b/packages/router/src/router.ts similarity index 100% rename from packages/router/src/router2.ts rename to packages/router/src/router.ts From f32a0cfdf7d118b8f56931e4fbd05385dcda7376 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Wed, 20 Sep 2023 03:28:15 +0330 Subject: [PATCH 6/9] fix: ui-kit path --- packages/demo-pwa/src/share/app-navigation-context.ts | 8 ++++---- packages/demo-pwa/src/ui/alwatr-pwa.ts | 8 ++++---- packages/playground/tailwind.config.js | 2 +- packages/style/CHANGELOG.md | 2 +- packages/style/lib/tailwind.ts | 2 +- packages/ui-kit/README.md | 2 +- packages/ui-kit/package.json | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/demo-pwa/src/share/app-navigation-context.ts b/packages/demo-pwa/src/share/app-navigation-context.ts index 79ebedd0..ccb42d67 100644 --- a/packages/demo-pwa/src/share/app-navigation-context.ts +++ b/packages/demo-pwa/src/share/app-navigation-context.ts @@ -2,10 +2,10 @@ import {AlwatrContextSignal} from '@alwatr/signal'; import {icons} from '../icons.js'; -import type {NavigationBarContent} from '@alwatr/ui-kit2/navigation-bar/navigation-bar.js'; -import type {NavigationDrawerContent} from '@alwatr/ui-kit2/navigation-drawer/navigation-drawer.js'; -import type {NavigationRailContent} from '@alwatr/ui-kit2/navigation-rail/navigation-rail.js'; -import type {CenterTopAppBarContent} from '@alwatr/ui-kit2/top-app-bar/center-top-app-bar.js'; +import type {NavigationBarContent} from '@alwatr/ui-kit/navigation-bar/navigation-bar.js'; +import type {NavigationDrawerContent} from '@alwatr/ui-kit/navigation-drawer/navigation-drawer.js'; +import type {NavigationRailContent} from '@alwatr/ui-kit/navigation-rail/navigation-rail.js'; +import type {CenterTopAppBarContent} from '@alwatr/ui-kit/top-app-bar/center-top-app-bar.js'; export interface AppNavigationContext { navigationBar: NavigationBarContent; diff --git a/packages/demo-pwa/src/ui/alwatr-pwa.ts b/packages/demo-pwa/src/ui/alwatr-pwa.ts index 6837bf4f..2dd30e5e 100644 --- a/packages/demo-pwa/src/ui/alwatr-pwa.ts +++ b/packages/demo-pwa/src/ui/alwatr-pwa.ts @@ -1,9 +1,9 @@ import {AlwatrDynamicDirective, alwatrObserve, cache, directive, html, type PartInfo} from '@alwatr/fract'; import {router, type RouteContext} from '@alwatr/router'; -import {alwatrNavigationBar} from '@alwatr/ui-kit2/navigation-bar/navigation-bar.js'; -import {alwatrNavigationDrawer} from '@alwatr/ui-kit2/navigation-drawer/navigation-drawer.js'; -import {alwatrNavigationRail} from '@alwatr/ui-kit2/navigation-rail/navigation-rail.js'; -import {centerTopAppBar, type CenterTopAppBarContent} from '@alwatr/ui-kit2/top-app-bar/center-top-app-bar.js'; +import {alwatrNavigationBar} from '@alwatr/ui-kit/navigation-bar/navigation-bar.js'; +import {alwatrNavigationDrawer} from '@alwatr/ui-kit/navigation-drawer/navigation-drawer.js'; +import {alwatrNavigationRail} from '@alwatr/ui-kit/navigation-rail/navigation-rail.js'; +import {centerTopAppBar, type CenterTopAppBarContent} from '@alwatr/ui-kit/top-app-bar/center-top-app-bar.js'; import {renderState} from '@alwatr/util'; import {alwatrPageTest} from './page-test.js'; diff --git a/packages/playground/tailwind.config.js b/packages/playground/tailwind.config.js index 3981a8b1..51a3466f 100644 --- a/packages/playground/tailwind.config.js +++ b/packages/playground/tailwind.config.js @@ -4,6 +4,6 @@ export default { ...tailwindConfig, content: [ '**/*.html', - // join(dirname(require.resolve('@alwatr/ui-kit2')), '**/*.ts'), + // join(dirname(require.resolve('@alwatr/ui-kit')), '**/*.ts'), ], }; diff --git a/packages/style/CHANGELOG.md b/packages/style/CHANGELOG.md index 00d4d55f..e91d3023 100644 --- a/packages/style/CHANGELOG.md +++ b/packages/style/CHANGELOG.md @@ -21,7 +21,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline * **style:** add `stateLayerPlugin` ([db076dd](https://github.com/AliMD/fract/commit/db076dd5f3af851e5eac3e1c68d7b1e2cb7cbc0d)) * **style:** add new color h260 ([c128609](https://github.com/AliMD/fract/commit/c128609963df0aba508f239799ef8c52ea066c40)) * **style:** add our z-index ([af5c97f](https://github.com/AliMD/fract/commit/af5c97f6f9fb439ec414e903497f416ddd2a76de)) -* **style:** add ui-kit2 to tailwind content ([8aeb3c9](https://github.com/AliMD/fract/commit/8aeb3c90df1e87c1d7e128a0b50662727417e679)) +* **style:** add ui-kit to tailwind content ([8aeb3c9](https://github.com/AliMD/fract/commit/8aeb3c90df1e87c1d7e128a0b50662727417e679)) * **style:** elevation util ([29412d6](https://github.com/AliMD/fract/commit/29412d6541ce63e2dbf4078a81b308c1b7a6020c)) * **style:** enhance stateHover, stateActive ([0aa3ee1](https://github.com/AliMD/fract/commit/0aa3ee1ed13183921aed058502fd961f2902e676)) * **style:** new package for alwatr 2 css system ([9b9c791](https://github.com/AliMD/fract/commit/9b9c791570f23ec14d724528b5173cfe93a5e46b)) diff --git a/packages/style/lib/tailwind.ts b/packages/style/lib/tailwind.ts index 1db8bd47..a0bf8855 100644 --- a/packages/style/lib/tailwind.ts +++ b/packages/style/lib/tailwind.ts @@ -13,7 +13,7 @@ export const tailwindConfig: Config = { content: [ './res/*.html', './src/**/*.ts', - join(dirname(require.resolve('@alwatr/ui-kit2')), '**/*.ts'), + join(dirname(require.resolve('@alwatr/ui-kit')), '**/*.ts'), ], darkMode: 'media', theme: { diff --git a/packages/ui-kit/README.md b/packages/ui-kit/README.md index d67ab7ed..70ac0251 100644 --- a/packages/ui-kit/README.md +++ b/packages/ui-kit/README.md @@ -1,4 +1,4 @@ -# Alwatr UI-Kit 2 - `@alwatr/ui-kit2` +# Alwatr UI-Kit - `@alwatr/ui-kit` Alwatr UI Elements Kit. diff --git a/packages/ui-kit/package.json b/packages/ui-kit/package.json index cf772491..799b8e47 100644 --- a/packages/ui-kit/package.json +++ b/packages/ui-kit/package.json @@ -27,9 +27,9 @@ "repository": { "type": "git", "url": "https://github.com/AliMD/fract", - "directory": "packages/ui-kit2" + "directory": "packages/ui-kit" }, - "homepage": "https://github.com/AliMD/fract/tree/next/packages/ui-kit2#readme", + "homepage": "https://github.com/AliMD/fract/tree/next/packages/ui-kit#readme", "bugs": { "url": "https://github.com/AliMD/fract/issues" }, From 87590d1d351b482c8747bfebc521d12f8b9aa712 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Wed, 20 Sep 2023 03:35:18 +0330 Subject: [PATCH 7/9] fix(demo-pwa): devDependencies --- packages/demo-pwa/package.json | 6 ++++++ packages/demo-pwa/tsconfig.json | 1 + 2 files changed, 7 insertions(+) diff --git a/packages/demo-pwa/package.json b/packages/demo-pwa/package.json index daf874d9..94f26412 100644 --- a/packages/demo-pwa/package.json +++ b/packages/demo-pwa/package.json @@ -32,5 +32,11 @@ "watch": "run-p watch:root watch:es serve", "watch:es": "yarn build:es --clean --watch --debug", "watch:root": "cd ../../ && yarn watch:ts" + }, + "devDependencies": { + "@alwatr/fsm": "^2.0.0", + "@alwatr/logger": "^1.1.5", + "@alwatr/pwa-helper": "^1.1.2", + "@alwatr/signal": "^2.0.0" } } diff --git a/packages/demo-pwa/tsconfig.json b/packages/demo-pwa/tsconfig.json index 190755ff..c339e51b 100644 --- a/packages/demo-pwa/tsconfig.json +++ b/packages/demo-pwa/tsconfig.json @@ -17,6 +17,7 @@ "include": ["src/**/*.ts"], "exclude": [], "references": [ + {"path": "../icon"}, {"path": "../fract"}, {"path": "../router"}, {"path": "../i18n"}, From 134474251a3d88c94f3339c380c1d3f9f7acf988 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Wed, 20 Sep 2023 03:35:57 +0330 Subject: [PATCH 8/9] fix(icon): remove signal and urlPrefixContext --- packages/icon/src/preload.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/icon/src/preload.ts b/packages/icon/src/preload.ts index d10639c6..0d4f2b7a 100644 --- a/packages/icon/src/preload.ts +++ b/packages/icon/src/preload.ts @@ -1,10 +1,7 @@ import {fetch} from '@alwatr/fetch'; -import {contextConsumer} from '@alwatr/signal'; - -const urlPrefixContext = contextConsumer.bind('icon-url-prefix'); export async function preloadIcon(name: string): Promise { - const urlPrefix = urlPrefixContext.getValue() ?? 'https://cdn.jsdelivr.net/npm/@alwatr/icon@0/svg/'; + const urlPrefix = 'https://cdn.jsdelivr.net/npm/@alwatr/icon@1/svg/'; const url = urlPrefix + name + '.svg'; const response = await fetch({ From 61c0e0406779ece05bc6c487b87d8a2c49de57fa Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Wed, 20 Sep 2023 03:36:11 +0330 Subject: [PATCH 9/9] chore(yarn): update --- yarn.lock | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 09b84342..fa10b3f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,7 +20,7 @@ resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30" integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw== -"@alwatr/element@^1.1.2": +"@alwatr/element@^1.0.1", "@alwatr/element@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@alwatr/element/-/element-1.1.2.tgz#eb96aba4ee6d17db6fb8df37c970bc1602ac2084" integrity sha512-Td56+YDDeuS7cKZZ47QkkSeZF4Zm9svYyalh7hKnpGbd8aXMxn91cRJo5CwQU9NFDeXdfN3wdatlYPeLMMkWLA== @@ -32,7 +32,7 @@ lit "^2.8.0" tslib "^2.6.2" -"@alwatr/fetch@^1.1.2": +"@alwatr/fetch@^1.0.1", "@alwatr/fetch@^1.1.2": version "1.1.3" resolved "https://registry.yarnpkg.com/@alwatr/fetch/-/fetch-1.1.3.tgz#009907c5b6616be783d78a5a9a2665e7ca94afdc" integrity sha512-cW6Iyw5CTmMvLNRYv0u3nR8EQhP6Hn/v66a3r3pKd4evBR/ZFuNFvttITpuiVWadAefN3hiWg/bUz3L7cNe6oQ== @@ -52,7 +52,17 @@ "@alwatr/type" "^1.1.1" tslib "^2.6.2" -"@alwatr/i18n@^1.1.2": +"@alwatr/fsm@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@alwatr/fsm/-/fsm-2.0.0.tgz#e926748cdfa977b9e3596d205037fca1f3503511" + integrity sha512-I/LZ76NX+yP0myf6u0XTgznZuYiGlNQkVQ2MaDFOA3zXvMKZR4SdxZ/pYkPVT9jz0p9mRFlf6iXFbnu2avoNqA== + dependencies: + "@alwatr/logger" "^1.1.5" + "@alwatr/signal" "^2.0.0" + "@alwatr/type" "^1.1.4" + tslib "^2.6.2" + +"@alwatr/i18n@^1.0.1", "@alwatr/i18n@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@alwatr/i18n/-/i18n-1.1.2.tgz#4ac202bb9c326828213e191ac4d382e272d150dd" integrity sha512-tXzyQXjs6UtSFK4oq71XgY1t4muaoeKQamskO+JEkDNX+5PARknSKEgg4kadcmnVABw+6WklDq8sgfn4tqrdpA== @@ -78,6 +88,17 @@ "@alwatr/logger" "^1.1.5" tslib "^2.6.2" +"@alwatr/pwa-helper@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@alwatr/pwa-helper/-/pwa-helper-1.1.2.tgz#00af0aae0477a0e489bc32784cc98450b60b1c38" + integrity sha512-QRLa5sggpzMbV6zSD5OE0HI/YAkxfcSawgtIbm0XlimtuVhXpG2+fO5ZC8jsPc+Rxuf3fiM0kbWbRgsqnFmMuw== + dependencies: + "@alwatr/element" "^1.1.2" + "@alwatr/i18n" "^1.1.2" + "@alwatr/logger" "^1.1.2" + "@alwatr/ui-kit" "^1.0.0" + tslib "^2.6.2" + "@alwatr/router@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@alwatr/router/-/router-1.1.2.tgz#2eb38c1f19548fa834c073cd71df8b8cb8297a26" @@ -88,7 +109,7 @@ "@alwatr/signal" "^1.1.2" tslib "^2.6.2" -"@alwatr/signal@^1.1.2": +"@alwatr/signal@^1.0.1", "@alwatr/signal@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@alwatr/signal/-/signal-1.1.2.tgz#0ebf599de6a304c3d4f50d266f284a1cea14a94d" integrity sha512-7wuvTUYmuT5UZ5o2H86lBmrNwUp5bNDxUFSK4mjxYHuvDJ32s1pHlGe36YwemzZyz4AtD13Z4bVe7ewvK70mnQ== @@ -113,7 +134,20 @@ resolved "https://registry.yarnpkg.com/@alwatr/type/-/type-1.1.4.tgz#5bcff20284a0404614e56b9b6c5e7f99580b6586" integrity sha512-bjb3yQC/yiRz4ld+IGCIMiuaLGTjmhanaAE5pqPYLCvREIz82VvGvrfd9g9Si+Y8+fOUlIjKLtGvBWliTOaBcA== -"@alwatr/util@^1.0.0", "@alwatr/util@^1.2.0", "@alwatr/util@^1.2.1", "@alwatr/util@^1.2.3": +"@alwatr/ui-kit@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@alwatr/ui-kit/-/ui-kit-1.0.1.tgz#e0e9319e76ede38c69718934007d56534d081c7e" + integrity sha512-n4QPPJKipvHrZ92qYhBk6CsJud8Lf/aYrkR7jPa1SK5FCl5YW4S1dbbc+sNM0ezTXoMvOmMx3+w55X/ydVMLEA== + dependencies: + "@alwatr/element" "^1.0.1" + "@alwatr/fetch" "^1.0.1" + "@alwatr/i18n" "^1.0.1" + "@alwatr/icon" "^1.0.1" + "@alwatr/signal" "^1.0.1" + "@alwatr/util" "^1.0.1" + tslib "^2.5.3" + +"@alwatr/util@^1.0.0", "@alwatr/util@^1.0.1", "@alwatr/util@^1.2.0", "@alwatr/util@^1.2.1", "@alwatr/util@^1.2.3": version "1.2.3" resolved "https://registry.yarnpkg.com/@alwatr/util/-/util-1.2.3.tgz#3b926837e3d9ed82f2b2947f7aacbd8bdf39927a" integrity sha512-4KQUgP5izK+9xjt673U0gG0iYJdN5pfIe8+QHhzbHyJSHue6RBs406OSY6w++wyzpKW6sK3jLL7Xspu8CIaFCA== @@ -8590,7 +8624,7 @@ tsconfig-paths@^3.14.2: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.1.0, tslib@^2.6.2: +tslib@^2.1.0, tslib@^2.5.3, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==