kt.js 0.4.2 → 0.5.0
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 +82 -153
- package/dist/index.d.ts +2 -111
- package/dist/index.iife.js +1 -1
- package/dist/index.legacy.js +1 -0
- package/dist/index.mjs +1 -1
- package/package.json +39 -64
package/README.md
CHANGED
|
@@ -1,204 +1,133 @@
|
|
|
1
|
-
#
|
|
1
|
+
# kt.js
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://github.com/baendlorel/kt.js/blob/main/LICENSE)
|
|
3
|
+
<img src="https://raw.githubusercontent.com/baendlorel/kt.js/dev/.assets/ktjs-0.0.1.svg" alt="KT.js Logo" width="150"/>
|
|
5
4
|
|
|
6
|
-
[
|
|
5
|
+
> 📦 Main entry package - For full documentation, see [KT.js](https://raw.githubusercontent.com/baendlorel/kt.js/dev/README.md).
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
Main entry package for KT.js framework - a simple and easy-to-use web framework that never re-renders.
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
## Overview
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
`kt.js` is the all-in-one package that re-exports everything from the KT.js ecosystem. Install this single package to get access to all features including core DOM utilities, routing, and shortcuts.
|
|
13
12
|
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
As a web framework, repeatedly creating a large number of variables and objects is unacceptable. So I created KT.js.
|
|
17
|
-
|
|
18
|
-
KT.js follows one rule: full controll of dom and avoid unless repainting.
|
|
19
|
-
|
|
20
|
-
## Current Core Features
|
|
21
|
-
|
|
22
|
-
- **`h` function**: and its aliases
|
|
23
|
-
- **Router**:
|
|
24
|
-
- Auto-adapt to environment: uses async navigation guards when `Promise` is available, falls back to synchronous mode otherwise
|
|
25
|
-
- **Full ES5 compatibility**: works in IE9+ and other legacy browsers
|
|
26
|
-
- Transpiled to ES5 with no modern syntax
|
|
27
|
-
- Optional minimal Promise polyfill included for older environments
|
|
28
|
-
- **ktnull**: a special value representing "null", used for filtering. Since native DOM APIs do not ignore `undefined` or `null`, this feature is provided to maintain native behavior while enhancing usability.
|
|
29
|
-
|
|
30
|
-
## Getting started
|
|
31
|
-
|
|
32
|
-
### Using IIFE (direct browser usage)
|
|
33
|
-
|
|
34
|
-
KT.js provides an IIFE build that can be included directly in HTML:
|
|
35
|
-
|
|
36
|
-
```html
|
|
37
|
-
<script src="https://unpkg.com/kt.js@0.3.0/dist/index.iife.js"></script>
|
|
38
|
-
<script>
|
|
39
|
-
// kt is available globally
|
|
40
|
-
const { h, div } = kt;
|
|
41
|
-
const app = div('container', 'Hello World');
|
|
42
|
-
document.body.appendChild(app);
|
|
43
|
-
</script>
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Using ES Modules
|
|
47
|
-
|
|
48
|
-
Install via package managers:
|
|
13
|
+
## Installation
|
|
49
14
|
|
|
50
15
|
```bash
|
|
51
|
-
npm install kt.js
|
|
52
|
-
# or
|
|
53
16
|
pnpm add kt.js
|
|
54
17
|
```
|
|
55
18
|
|
|
56
|
-
|
|
57
|
-
import { h, div } from 'kt.js';
|
|
58
|
-
|
|
59
|
-
const container = div('container', [div('header'), div('body', 'something'), div('footer')]);
|
|
60
|
-
const app = h('section', { id: 'app' }, container);
|
|
61
|
-
```
|
|
19
|
+
## What's Included
|
|
62
20
|
|
|
63
|
-
This
|
|
21
|
+
This package re-exports everything from:
|
|
64
22
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
```
|
|
23
|
+
- **`@ktjs/core`** - Core DOM manipulation utilities
|
|
24
|
+
- `h` function for creating elements
|
|
25
|
+
- `ktnull` for conditional rendering
|
|
26
|
+
- Runtime utilities and helpers
|
|
27
|
+
- **`@ktjs/shortcuts`** - Convenient shortcuts
|
|
28
|
+
- Element creation shortcuts (div, span, button, etc.)
|
|
29
|
+
- `withDefaults` for creating element factories
|
|
30
|
+
- Form helpers and layout utilities
|
|
74
31
|
|
|
75
|
-
|
|
32
|
+
**Note:** The router (`@ktjs/router`) is a separate package and needs to be installed independently.
|
|
76
33
|
|
|
77
|
-
|
|
78
|
-
const button = btn({ click: () => alert('Clicked!') }, 'Click me');
|
|
79
|
-
// this equals
|
|
80
|
-
const button = btn(undefined, 'Click me');
|
|
81
|
-
button.addEventListener('click', () => alert('Clicked!'));
|
|
82
|
-
```
|
|
34
|
+
## Quick Start
|
|
83
35
|
|
|
84
|
-
|
|
36
|
+
```typescript
|
|
37
|
+
import { h, div, button, withDefaults } from 'kt.js';
|
|
85
38
|
|
|
86
|
-
|
|
87
|
-
|
|
39
|
+
// Create elements
|
|
40
|
+
const app = div('app', [h('h1', {}, 'Welcome to KT.js'), button({ '@click': () => alert('Hello!') }, 'Click me')]);
|
|
88
41
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
`;
|
|
42
|
+
// Use shortcuts with defaults
|
|
43
|
+
const card = withDefaults(div, { class: 'card' });
|
|
44
|
+
const myCard = card('card-body', 'Card content');
|
|
93
45
|
|
|
94
|
-
|
|
46
|
+
document.body.appendChild(app);
|
|
95
47
|
```
|
|
96
48
|
|
|
97
|
-
|
|
49
|
+
### Using with Router
|
|
98
50
|
|
|
99
|
-
|
|
51
|
+
If you need routing, install `@ktjs/router` separately:
|
|
100
52
|
|
|
101
|
-
```
|
|
102
|
-
|
|
53
|
+
```bash
|
|
54
|
+
pnpm add @ktjs/router
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
import { div } from 'kt.js';
|
|
59
|
+
import { createRouter } from '@ktjs/router';
|
|
103
60
|
|
|
104
61
|
const router = createRouter({
|
|
105
62
|
routes: [
|
|
106
63
|
{
|
|
107
64
|
path: '/',
|
|
108
|
-
|
|
65
|
+
name: 'home',
|
|
66
|
+
beforeEnter: (to) => {
|
|
67
|
+
const app = document.getElementById('app')!;
|
|
68
|
+
app.innerHTML = '';
|
|
69
|
+
app.appendChild(div({}, 'Home Page'));
|
|
70
|
+
},
|
|
109
71
|
},
|
|
110
72
|
{
|
|
111
|
-
path: '/
|
|
112
|
-
|
|
73
|
+
path: '/about',
|
|
74
|
+
name: 'about',
|
|
75
|
+
beforeEnter: (to) => {
|
|
76
|
+
const app = document.getElementById('app')!;
|
|
77
|
+
app.innerHTML = '';
|
|
78
|
+
app.appendChild(div({}, 'About Page'));
|
|
79
|
+
},
|
|
113
80
|
},
|
|
114
81
|
],
|
|
115
|
-
container: document.getElementById('app'),
|
|
116
|
-
beforeEach: async (to, from) => {
|
|
117
|
-
// Navigation guard - return false to block navigation
|
|
118
|
-
console.log('navigating to:', to.path);
|
|
119
|
-
return true;
|
|
120
|
-
},
|
|
121
|
-
afterEach: (to) => {
|
|
122
|
-
// Called after successful navigation
|
|
123
|
-
document.title = to.path;
|
|
124
|
-
},
|
|
125
|
-
onError: (error) => {
|
|
126
|
-
console.error('Router error:', error);
|
|
127
|
-
},
|
|
128
82
|
});
|
|
129
83
|
|
|
130
|
-
router.
|
|
131
|
-
|
|
132
|
-
// Navigate programmatically
|
|
133
|
-
router.push('/user/123');
|
|
134
|
-
router.push('/user/456?page=2');
|
|
135
|
-
|
|
136
|
-
// Get current route
|
|
137
|
-
const current = router.current();
|
|
138
|
-
console.log(current?.path, current?.params, current?.query);
|
|
84
|
+
router.push('/');
|
|
139
85
|
```
|
|
140
86
|
|
|
141
|
-
|
|
87
|
+
## Why Use the Main Package?
|
|
142
88
|
|
|
143
|
-
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
-
|
|
147
|
-
- Lifecycle hooks (`afterEach`)
|
|
148
|
-
- Error handling (`onError`)
|
|
149
|
-
- Minimal footprint
|
|
89
|
+
- **Convenience**: Single import for all KT.js functionality
|
|
90
|
+
- **Simplicity**: No need to manage multiple package versions
|
|
91
|
+
- **Complete**: Get all features out of the box
|
|
92
|
+
- **Optimized**: Proper tree-shaking ensures you only bundle what you use
|
|
150
93
|
|
|
151
|
-
##
|
|
94
|
+
## When to Use Individual Packages
|
|
152
95
|
|
|
153
|
-
|
|
154
|
-
It is used for filtering, you can do like this:
|
|
96
|
+
If you only need specific functionality, you can install individual packages:
|
|
155
97
|
|
|
156
|
-
|
|
98
|
+
- Need only DOM utilities? → `pnpm add @ktjs/core`
|
|
99
|
+
- Need only routing? → `pnpm add @ktjs/router`
|
|
100
|
+
- Need only shortcuts? → `pnpm add @ktjs/shortcuts @ktjs/core`
|
|
101
|
+
- Need everything except router? → `pnpm add kt.js` (this package)
|
|
102
|
+
- Need everything including router? → `pnpm add kt.js @ktjs/router`
|
|
157
103
|
|
|
158
|
-
|
|
159
|
-
import { div, ktnull } from 'kt.js';
|
|
160
|
-
const list = div(ktnull, [
|
|
161
|
-
div(ktnull, 'Item 1'),
|
|
162
|
-
someCondition ? div(ktnull, 'item 1.5') : ktnull,
|
|
163
|
-
div(ktnull, 'Item 2'),
|
|
164
|
-
undefined,
|
|
165
|
-
]);
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Then it will create:
|
|
104
|
+
This can result in slightly smaller dependency trees in your `node_modules`.
|
|
169
105
|
|
|
170
|
-
|
|
171
|
-
<div>
|
|
172
|
-
<div>Item 1</div>
|
|
173
|
-
<div>Item 2</div>
|
|
174
|
-
undefined
|
|
175
|
-
</div>
|
|
176
|
-
```
|
|
106
|
+
## Documentation
|
|
177
107
|
|
|
178
|
-
|
|
108
|
+
For complete documentation, examples, and guides, see:
|
|
179
109
|
|
|
180
|
-
|
|
110
|
+
- [Main Documentation](../../README.md) - Complete framework guide
|
|
111
|
+
- [Core Package](../core/README.md) - Core DOM utilities
|
|
112
|
+
- [Router Package](../router/README.md) - Routing documentation
|
|
113
|
+
- [Shortcuts Package](../shortcuts/README.md) - Shortcuts and utilities
|
|
114
|
+
- [Changelog](../../CHANGELOG.md) - Version history and updates
|
|
181
115
|
|
|
182
|
-
|
|
116
|
+
## Features
|
|
183
117
|
|
|
184
|
-
|
|
118
|
+
- ✅ Direct DOM manipulation with zero virtual DOM overhead
|
|
119
|
+
- ✅ Full TypeScript support with intelligent type inference
|
|
120
|
+
- ✅ ES5 compatible (works in IE9+)
|
|
121
|
+
- ✅ Zero dependencies (self-contained)
|
|
122
|
+
- ✅ Tiny bundle size with excellent tree-shaking
|
|
123
|
+
- ✅ Conditional rendering with `ktnull`
|
|
124
|
+
- ✅ Event handler shortcuts with `@<eventName>` syntax
|
|
125
|
+
- ✅ Element factories with `withDefaults`
|
|
126
|
+
- ✅ Router available as separate package (`@ktjs/router`)
|
|
185
127
|
|
|
186
|
-
|
|
187
|
-
<script src="https://unpkg.com/kt.js@0.3.0/dist/index.iife.js"></script>
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
Or when using module bundlers:
|
|
191
|
-
|
|
192
|
-
```js
|
|
193
|
-
import 'some promise polyfill'; // Will fallback to sync version if Promise is not available
|
|
194
|
-
import { h, div, createRouter } from 'kt.js';
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
**Note:** The Router will work without Promise support, but navigation guards (`beforeEach`) will run synchronously and cannot use async/await patterns.
|
|
198
|
-
|
|
199
|
-
## Notes
|
|
128
|
+
## Browser Compatibility
|
|
200
129
|
|
|
201
|
-
|
|
130
|
+
KT.js works in all modern browsers and legacy browsers including IE9+. For older browsers without Promise support, navigation guards will run synchronously.
|
|
202
131
|
|
|
203
132
|
## License
|
|
204
133
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,111 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* - We use `Object.create(null)` because it is guaranteed to be unique and no need for polyfill of `symbol`.
|
|
4
|
-
*/
|
|
5
|
-
declare const ktnull: any;
|
|
6
|
-
|
|
7
|
-
type otherstring = string & {};
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Normal HTML tags like `div`, `span`, `a`, etc.
|
|
11
|
-
*/
|
|
12
|
-
type HTMLTag = keyof HTMLElementTagNameMap;
|
|
13
|
-
|
|
14
|
-
type RawContent = (HTMLElement | string | undefined)[] | HTMLElement | string;
|
|
15
|
-
type RawAttr = KAttribute | string;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Used to create enhanced HTML elements
|
|
19
|
-
*/
|
|
20
|
-
interface KAttribute {
|
|
21
|
-
[k: string]: any;
|
|
22
|
-
|
|
23
|
-
id?: string;
|
|
24
|
-
|
|
25
|
-
type?: string;
|
|
26
|
-
for?: string;
|
|
27
|
-
name?: string;
|
|
28
|
-
value?: string;
|
|
29
|
-
valueAsDate?: Date;
|
|
30
|
-
valueAsNumber?: number;
|
|
31
|
-
label?: string;
|
|
32
|
-
disabled?: string;
|
|
33
|
-
min?: string;
|
|
34
|
-
max?: string;
|
|
35
|
-
selected?: boolean;
|
|
36
|
-
checked?: boolean;
|
|
37
|
-
class?: string;
|
|
38
|
-
style?: string | Partial<CSSStyleDeclaration>;
|
|
39
|
-
action?: string;
|
|
40
|
-
method?: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE' | otherstring;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
declare const div: (attr?: RawAttr, content?: RawContent) => HTMLDivElement;
|
|
44
|
-
declare const span: (attr?: RawAttr, content?: RawContent) => HTMLSpanElement;
|
|
45
|
-
declare const label: (attr?: RawAttr, content?: RawContent) => HTMLLabelElement;
|
|
46
|
-
declare const p: (attr?: RawAttr, content?: RawContent) => HTMLParagraphElement;
|
|
47
|
-
declare const h1: (attr?: RawAttr, content?: RawContent) => HTMLHeadingElement;
|
|
48
|
-
declare const h2: (attr?: RawAttr, content?: RawContent) => HTMLHeadingElement;
|
|
49
|
-
declare const h3: (attr?: RawAttr, content?: RawContent) => HTMLHeadingElement;
|
|
50
|
-
declare const h4: (attr?: RawAttr, content?: RawContent) => HTMLHeadingElement;
|
|
51
|
-
declare const h5: (attr?: RawAttr, content?: RawContent) => HTMLHeadingElement;
|
|
52
|
-
declare const h6: (attr?: RawAttr, content?: RawContent) => HTMLHeadingElement;
|
|
53
|
-
declare const ul: (attr?: RawAttr, content?: RawContent) => HTMLUListElement;
|
|
54
|
-
declare const ol: (attr?: RawAttr, content?: RawContent) => HTMLOListElement;
|
|
55
|
-
declare const li: (attr?: RawAttr, content?: RawContent) => HTMLLIElement;
|
|
56
|
-
declare const btn: (attr?: RawAttr, content?: RawContent) => HTMLButtonElement;
|
|
57
|
-
declare const form: (attr?: RawAttr, content?: RawContent) => HTMLFormElement;
|
|
58
|
-
declare const input: (attr?: RawAttr, content?: RawContent) => HTMLInputElement;
|
|
59
|
-
declare const select: (attr?: RawAttr, content?: RawContent) => HTMLSelectElement;
|
|
60
|
-
declare const option: (attr?: RawAttr, content?: RawContent) => HTMLOptionElement;
|
|
61
|
-
declare const table: (attr?: RawAttr, content?: RawContent) => HTMLTableElement;
|
|
62
|
-
declare const thead: (attr?: RawAttr, content?: RawContent) => HTMLTableSectionElement;
|
|
63
|
-
declare const tbody: (attr?: RawAttr, content?: RawContent) => HTMLTableSectionElement;
|
|
64
|
-
declare const tr: (attr?: RawAttr, content?: RawContent) => HTMLTableRowElement;
|
|
65
|
-
declare const th: (attr?: RawAttr, content?: RawContent) => HTMLTableCellElement;
|
|
66
|
-
declare const td: (attr?: RawAttr, content?: RawContent) => HTMLTableCellElement;
|
|
67
|
-
declare const a: (attr?: RawAttr, content?: RawContent) => HTMLAnchorElement;
|
|
68
|
-
declare const img: (attr?: RawAttr, content?: RawContent) => HTMLImageElement;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Create an enhanced HTMLElement.
|
|
72
|
-
* - Only supports HTMLElements, **NOT** SVGElements or other Elements.
|
|
73
|
-
* @param tag tag of an `HTMLElement`
|
|
74
|
-
* @param attr attribute object or className
|
|
75
|
-
* @param content a string or an array of HTMLEnhancedElement as child nodes
|
|
76
|
-
*/
|
|
77
|
-
declare function h<T extends HTMLTag>(tag: T, attr?: RawAttr, content?: RawContent): HTMLElementTagNameMap[T];
|
|
78
|
-
|
|
79
|
-
// Minimal router types
|
|
80
|
-
|
|
81
|
-
interface RouteContext {
|
|
82
|
-
params: Record<string, string>;
|
|
83
|
-
query: Record<string, string>;
|
|
84
|
-
path: string;
|
|
85
|
-
meta?: Record<string, any>;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
type RouteHandler = (ctx: RouteContext) => HTMLElement | void | Promise<HTMLElement | void>;
|
|
89
|
-
|
|
90
|
-
interface RouteConfig {
|
|
91
|
-
path: string;
|
|
92
|
-
handler: RouteHandler;
|
|
93
|
-
meta?: Record<string, any>;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
interface RouterConfig {
|
|
97
|
-
routes: RouteConfig[];
|
|
98
|
-
container?: HTMLElement;
|
|
99
|
-
beforeEach?: (to: RouteContext, from: RouteContext | null) => boolean | Promise<boolean>;
|
|
100
|
-
afterEach?: (to: RouteContext) => void;
|
|
101
|
-
onError?: (error: Error) => void;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
declare function createRouter(config: RouterConfig): {
|
|
105
|
-
start: () => void;
|
|
106
|
-
stop: () => void;
|
|
107
|
-
push: (path: string) => void;
|
|
108
|
-
current: () => RouteContext | null;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export { a, btn, createRouter, div, form, h, h1, h2, h3, h4, h5, h6, img, input, ktnull, label, li, ol, option, p, select, span, table, tbody, td, th, thead, tr, ul };
|
|
1
|
+
export * from '@ktjs/core';
|
|
2
|
+
export * from '@ktjs/shortcuts';
|
package/dist/index.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var kt=function(n){"use strict";
|
|
1
|
+
var kt=function(t,e,n){"use strict";return Object.keys(e).forEach(function(n){"default"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),Object.keys(n).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}),t}({},__ktjs_core__,__ktjs_shortcuts__);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var kt=function(t,e,n){"use strict";return Object.keys(e).forEach(function(n){"default"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),Object.keys(n).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}),t}({},__ktjs_core__,__ktjs_shortcuts__);
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export*from"@ktjs/core";export*from"@ktjs/shortcuts";
|
package/package.json
CHANGED
|
@@ -1,66 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"build": "tsx ./.scripts/rollup.ts"
|
|
42
|
-
},
|
|
43
|
-
"license": "MIT",
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"@rollup/plugin-alias": "^5.1.1",
|
|
46
|
-
"@rollup/plugin-commonjs": "^28.0.6",
|
|
47
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
48
|
-
"@rollup/plugin-replace": "^6.0.2",
|
|
49
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
50
|
-
"@rollup/plugin-typescript": "^12.1.4",
|
|
51
|
-
"@types/node": "^24.5.1",
|
|
52
|
-
"@vitest/coverage-v8": "^3.2.4",
|
|
53
|
-
"jsdom": "^27.0.0",
|
|
54
|
-
"oxlint": "^1.16.0",
|
|
55
|
-
"prettier": "^3.6.2",
|
|
56
|
-
"rimraf": "^6.0.1",
|
|
57
|
-
"rollup": "^4.50.2",
|
|
58
|
-
"rollup-plugin-conditional-compilation": "^1.0.6",
|
|
59
|
-
"rollup-plugin-const-enum": "^1.1.4",
|
|
60
|
-
"rollup-plugin-dts": "^6.2.3",
|
|
61
|
-
"rollup-plugin-func-macro": "^1.1.1",
|
|
62
|
-
"tslib": "^2.8.1",
|
|
63
|
-
"typescript": "^5.9.2",
|
|
64
|
-
"vitest": "^3.2.4"
|
|
65
|
-
}
|
|
2
|
+
"name": "kt.js",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"author": {
|
|
5
|
+
"name": "Kasukabe Tsumugi",
|
|
6
|
+
"email": "futami16237@gmail.com"
|
|
7
|
+
},
|
|
8
|
+
"description": "A simple and easy-to-use web framework, never re-render. Abbreviation of Kasukabe Tsumugi.",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"module": "./dist/index.mjs",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.mjs",
|
|
15
|
+
"default": "./dist/index.mjs"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"homepage": "https://github.com/baendlorel/kt.js#readme",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/baendlorel/kt.js",
|
|
24
|
+
"directory": "packages/kt.js"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"framework",
|
|
28
|
+
"web",
|
|
29
|
+
"typescript",
|
|
30
|
+
"javascript"
|
|
31
|
+
],
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@ktjs/core": "0.5.0",
|
|
35
|
+
"@ktjs/shortcuts": "0.5.0"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "rollup -c rollup.config.mjs",
|
|
39
|
+
"dev": "rollup -c rollup.config.mjs -w"
|
|
40
|
+
}
|
|
66
41
|
}
|