@tachui/core 0.8.0-alpha → 0.8.1-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -2
- package/dist/bundles/assets.d.ts +19 -0
- package/dist/bundles/assets.d.ts.map +1 -0
- package/dist/bundles/context.d.ts +22 -0
- package/dist/bundles/context.d.ts.map +1 -0
- package/dist/bundles/minimal.d.ts +6 -2
- package/dist/bundles/minimal.d.ts.map +1 -1
- package/dist/common.js +394 -393
- package/dist/compiler/codegen.d.ts.map +1 -1
- package/dist/compiler/index.js +6 -1393
- package/dist/compiler/parser.d.ts +1 -1
- package/dist/compiler/parser.d.ts.map +1 -1
- package/dist/compiler/plugin.d.ts.map +1 -1
- package/dist/compiler/types.d.ts +28 -0
- package/dist/compiler/types.d.ts.map +1 -1
- package/dist/essential.js +394 -393
- package/dist/{index-DCPJFUm9.js → index-DEBd8cq7.js} +315 -578
- package/dist/index.js +394 -393
- package/dist/minimal.js +112 -98
- package/dist/observed-object-Cos-FtjP.js +269 -0
- package/dist/plugin-BCAdZXKq.js +1680 -0
- package/dist/runtime/concatenation-aria.d.ts +24 -0
- package/dist/runtime/concatenation-aria.d.ts.map +1 -0
- package/dist/runtime/concatenation-aria.js +53 -0
- package/dist/runtime/concatenation-full.d.ts +30 -0
- package/dist/runtime/concatenation-full.d.ts.map +1 -0
- package/dist/runtime/concatenation-full.js +77 -0
- package/dist/runtime/concatenation-minimal.d.ts +25 -0
- package/dist/runtime/concatenation-minimal.d.ts.map +1 -0
- package/dist/runtime/concatenation-minimal.js +40 -0
- package/package.json +24 -4
package/README.md
CHANGED
|
@@ -24,9 +24,9 @@ tachUI core provides a SwiftUI-inspired declarative framework for building web a
|
|
|
24
24
|
### Installation
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
npm install @tachui/core@0.8.
|
|
27
|
+
npm install @tachui/core@0.8.1-alpha
|
|
28
28
|
# or
|
|
29
|
-
pnpm add @tachui/core@0.8.
|
|
29
|
+
pnpm add @tachui/core@0.8.1-alpha
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
### Basic Example
|
|
@@ -164,6 +164,24 @@ tachUI's architecture provides:
|
|
|
164
164
|
- **Memory-safe cleanup** - WeakMap-based automatic cleanup
|
|
165
165
|
- **Sub-millisecond updates** - Direct DOM manipulation
|
|
166
166
|
|
|
167
|
+
### Concatenation Optimization (New in 0.8.1-alpha)
|
|
168
|
+
|
|
169
|
+
Revolutionary bundle size reduction for component concatenation patterns:
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
// Before: Uses full 87.76KB concatenation runtime
|
|
173
|
+
Text('Hello').build().concat(Text('World').build())
|
|
174
|
+
|
|
175
|
+
// After: Smart optimization with 94.9% bundle reduction
|
|
176
|
+
// • Static patterns: 0KB runtime (compile-time concatenation)
|
|
177
|
+
// • Dynamic patterns: 1.2-1.9KB selective runtime based on accessibility needs
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
- **Automatic Detection**: TypeScript AST analysis finds `.build().concat()` patterns
|
|
181
|
+
- **Smart Runtime Selection**: Minimal (1.18KB), ARIA (1.42KB), or Full (1.93KB) based on component needs
|
|
182
|
+
- **CLI Integration**: Use `tachui analyze --concatenation` for optimization insights
|
|
183
|
+
- **Production Ready**: 27 tests passing, handles 250+ files in <500ms
|
|
184
|
+
|
|
167
185
|
## Plugin Ecosystem
|
|
168
186
|
|
|
169
187
|
Extend tachUI with additional packages:
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview TachUI Assets Bundle
|
|
3
|
+
*
|
|
4
|
+
* Dedicated entry point for asset-related functions (fonts, colors, images, gradients).
|
|
5
|
+
* Enables tree-shaking for applications that only need asset functionality.
|
|
6
|
+
*/
|
|
7
|
+
export { Assets, Asset, ColorAsset, ImageAsset, FontAsset, registerAsset, createColorAsset, createImageAsset, createFontAsset, createGoogleFont, createVariableFont, getAssetInfo, listAssetNames, type FontAssetOptions, type FontWeightValue, type FontWidthValue, type AssetInfo, type AssetsInterface, } from '../assets';
|
|
8
|
+
export { LinearGradient, RadialGradient, StateGradient } from '../gradients';
|
|
9
|
+
/**
|
|
10
|
+
* Assets Bundle Metadata
|
|
11
|
+
*/
|
|
12
|
+
export declare const BUNDLE_INFO: {
|
|
13
|
+
readonly name: "@tachui/core/assets";
|
|
14
|
+
readonly version: "0.1.0";
|
|
15
|
+
readonly description: "Dedicated assets bundle for fonts, colors, images, and gradients";
|
|
16
|
+
readonly targetSize: "~15KB";
|
|
17
|
+
readonly useCase: "Asset-heavy applications, theming systems, design systems";
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/bundles/assets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,MAAM,EACN,KAAK,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,eAAe,GACrB,MAAM,WAAW,CAAA;AAGlB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5E;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;CAOd,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview TachUI Context Bundle
|
|
3
|
+
*
|
|
4
|
+
* Dedicated entry point for context and component lifecycle functions.
|
|
5
|
+
* Enables tree-shaking for applications that need context/environment management.
|
|
6
|
+
*/
|
|
7
|
+
export { EnvironmentObject, createEnvironmentKey, provideEnvironmentObject, } from '../state/environment';
|
|
8
|
+
export { withComponentContext, getCurrentComponentContext, createComponentContext, setCurrentComponentContext, } from '../runtime/component-context';
|
|
9
|
+
export { batch, createRoot, getOwner, getReactiveContext, runWithOwner, untrack, } from '../reactive/context';
|
|
10
|
+
export { createDetachedRoot, getOwnerChain, getRootOwner, isReactiveContext, runOutsideReactiveContext, } from '../reactive/ownership';
|
|
11
|
+
export { mountRoot } from '../runtime/dom-bridge';
|
|
12
|
+
/**
|
|
13
|
+
* Context Bundle Metadata
|
|
14
|
+
*/
|
|
15
|
+
export declare const BUNDLE_INFO: {
|
|
16
|
+
readonly name: "@tachui/core/context";
|
|
17
|
+
readonly version: "0.1.0";
|
|
18
|
+
readonly description: "Dedicated context bundle for environment and component lifecycle management";
|
|
19
|
+
readonly targetSize: "~10KB";
|
|
20
|
+
readonly useCase: "Applications with complex state management and component hierarchies";
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/bundles/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,8BAA8B,CAAA;AAGrC,OAAO,EACL,KAAK,EACL,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,YAAY,EACZ,OAAO,GACR,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;CAQd,CAAA"}
|
|
@@ -9,15 +9,19 @@ export * from '../reactive/computed';
|
|
|
9
9
|
export * from '../reactive/effect';
|
|
10
10
|
export { onCleanup, dispose, createCleanupGroup } from '../reactive/cleanup';
|
|
11
11
|
export * from '../reactive/context';
|
|
12
|
+
export { setTheme, detectSystemTheme, getCurrentTheme } from '../reactive/theme';
|
|
12
13
|
export * from '../runtime/dom-bridge';
|
|
13
14
|
export * from '../runtime/component';
|
|
14
15
|
export * from '../runtime/props';
|
|
16
|
+
export { EnvironmentObject, createEnvironmentKey, provideEnvironmentObject, } from '../state/environment';
|
|
17
|
+
export { withComponentContext, getCurrentComponentContext, createComponentContext, setCurrentComponentContext, } from '../runtime/component-context';
|
|
15
18
|
export * from '../modifiers/core';
|
|
16
19
|
export { State, isState, unwrapValue } from '../state/state';
|
|
17
20
|
export { createBinding, isBinding } from '../state/binding';
|
|
18
|
-
export {
|
|
21
|
+
export { ObservableObjectBase } from '../state/observed-object';
|
|
22
|
+
export { Assets, Asset, ColorAsset, ImageAsset, FontAsset, registerAsset, createColorAsset, createImageAsset, createFontAsset, createGoogleFont, } from '../assets';
|
|
19
23
|
export { infinity, Layout, isInfinity } from '../constants';
|
|
20
|
-
export { LinearGradient } from '../gradients';
|
|
24
|
+
export { LinearGradient, StateGradient } from '../gradients';
|
|
21
25
|
/**
|
|
22
26
|
* Minimal Bundle Metadata
|
|
23
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimal.d.ts","sourceRoot":"","sources":["../../src/bundles/minimal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC5E,cAAc,qBAAqB,CAAA;AAGnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"minimal.d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