Skip to content

Commit

Permalink
fix: build and refs issues (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMD authored Sep 20, 2023
2 parents e5ac265 + 61c0e04 commit d3edc8d
Show file tree
Hide file tree
Showing 35 changed files with 105 additions and 93 deletions.
2 changes: 1 addition & 1 deletion demo/i18n/i18n.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
8 changes: 4 additions & 4 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
<li><a href="./logger/">Logger</a></li>
<li><a href="./fetch/">Fetch</a></li>
<li><a href="./signal/">Signal</a></li>
<li><a href="./signal2/simple/">Signal Simple</a></li>
<li><a href="./signal2/context/">Context Signal</a></li>
<li><a href="./signal2/multithread-context/">Signal multithread</a></li>
<li><a href="./signal/simple/">Signal Simple</a></li>
<li><a href="./signal/context/">Context Signal</a></li>
<li><a href="./signal/multithread-context/">Signal multithread</a></li>
<li><a href="./router/">Router</a></li>
<li><a href="./router2/">Router2</a></li>
<li><a href="./router/">router</a></li>
<li><a href="./font/">Font</a></li>
<li><a href="./math/">Math</a></li>
<li><a href="./icon/">Icon</a></li>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion demo/router2/index.ts → demo/router/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
6 changes: 6 additions & 0 deletions packages/demo-pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
10 changes: 5 additions & 5 deletions packages/demo-pwa/src/share/app-navigation-context.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {AlwatrContextSignal} from '@alwatr/signal2';
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;
Expand Down
10 changes: 5 additions & 5 deletions packages/demo-pwa/src/ui/alwatr-pwa.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {AlwatrDynamicDirective, alwatrObserve, cache, directive, html, type PartInfo} from '@alwatr/fract';
import {router, type RouteContext} from '@alwatr/router2';
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 {router, type RouteContext} from '@alwatr/router';
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';
Expand Down
14 changes: 6 additions & 8 deletions packages/demo-pwa/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
"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": "../icon"},
{"path": "../fract"},
{"path": "../router"},
{"path": "../i18n"},
{"path": "../style"},
{"path": "../ui-kit"}
]
}
4 changes: 2 additions & 2 deletions packages/fract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/fract/src/directives/observe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T extends AlwatrObservableInterface<unknown>> extends AlwatrDynamicDirective {
protected _$observable?: T;
Expand Down
5 changes: 1 addition & 4 deletions packages/fract/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,5 @@

"include": ["src/**/*.ts"],
"exclude": [],
"references": [
{"path": "../logger"},
{"path": "../signal2"}
]
"references": []
}
10 changes: 5 additions & 5 deletions packages/i18n/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/README.md
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/src/l10n.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
7 changes: 1 addition & 6 deletions packages/i18n/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,5 @@

"include": ["src/**/*.ts"],
"exclude": [],
"references": [
{"path": "../type"},
{"path": "../logger"},
{"path": "../math"},
{"path": "../signal2"}
]
"references": []
}
5 changes: 1 addition & 4 deletions packages/icon/src/preload.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import {fetch} from '@alwatr/fetch';
import {contextConsumer} from '@alwatr/signal';

const urlPrefixContext = contextConsumer.bind<string>('icon-url-prefix');

export async function preloadIcon(name: string): Promise<string> {
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({
Expand Down
6 changes: 1 addition & 5 deletions packages/icon/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,5 @@

"include": ["src/**/*.ts"],
"exclude": [],
"references": [
{"path": "../element"},
{"path": "../../core/fetch"},
{"path": "../../core/logger"}
]
"references": []
}
2 changes: 1 addition & 1 deletion packages/playground/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
],
};
4 changes: 2 additions & 2 deletions packages/router/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion packages/router/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 2 additions & 2 deletions packages/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"repository": {
"type": "git",
"url": "https://github.com/AliMD/fract",
"directory": "core/router2"
"directory": "packages/router"
},
"homepage": "https://github.com/AliMD/fract/tree/next/core/router2#readme",
"homepage": "https://github.com/AliMD/fract/tree/next/packages/router#readme",
"bugs": {
"url": "https://github.com/AliMD/fract/issues"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/router/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {AlwatrRouter} from './router2.js';
import {AlwatrRouter} from './router.js';

export type {RouteContext} from './type.js';

Expand Down
Original file line number Diff line number Diff line change
@@ -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<RouteContext> {
protected override _logger = createLogger('alwatr/router2');
protected override _logger = createLogger('alwatr/router');

get route(): RouteContext {
return this._$data ?? this._makeRouteContext();
Expand Down
7 changes: 1 addition & 6 deletions packages/router/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,5 @@

"include": ["src/**/*.ts"],
"exclude": [],
"references": [
{"path": "../logger"},
{"path": "../math"},
{"path": "../type"},
{"path": "../signal2"}
]
"references": []
}
2 changes: 1 addition & 1 deletion packages/style/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion packages/style/lib/tailwind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 1 addition & 3 deletions packages/style/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@

"include": ["**/*.ts"],
"exclude": [],
"references": [
{"path": "../../core/logger"}
]
"references": []
}
2 changes: 1 addition & 1 deletion packages/ui-kit/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Alwatr UI-Kit 2 - `@alwatr/ui-kit2`
# Alwatr UI-Kit - `@alwatr/ui-kit`

Alwatr UI Elements Kit.

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-kit/navigation-bar/navigation-bar.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-kit/navigation-drawer/navigation-drawer.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-kit/navigation-rail/navigation-rail.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
4 changes: 2 additions & 2 deletions packages/ui-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
6 changes: 1 addition & 5 deletions packages/ui-kit/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
"include": ["**/*.ts"],
"exclude": [],
"references": [
{"path": "../../core/fract"},
{"path": "../../core/type"},
{"path": "../../core/i18n2"},
{"path": "../../core/signal2"},
{"path": "../../core/util"},
{"path": "../fract"},
]
}
Loading

0 comments on commit d3edc8d

Please sign in to comment.