@forinda/kickjs-view 0.0.0-stage → 0.1.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/package.json CHANGED
@@ -1,6 +1,92 @@
1
1
  {
2
2
  "name": "@forinda/kickjs-view",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "KickJS views — .kick templates rendered on every runtime and the edge",
5
+ "keywords": [
6
+ "kickjs",
7
+ "views",
8
+ "templates",
9
+ "html",
10
+ "ssr"
11
+ ],
12
+ "type": "module",
13
+ "main": "dist/index.js",
14
+ "types": "dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "workerd": "./dist/edge.js",
19
+ "worker": "./dist/edge.js",
20
+ "browser": "./dist/edge.js",
21
+ "import": "./dist/index.js"
22
+ },
23
+ "./file-loader": {
24
+ "import": "./dist/file-loader.js",
25
+ "types": "./dist/file-loader.d.ts"
26
+ },
27
+ "./virtual": {
28
+ "types": "./virtual.d.ts"
29
+ },
30
+ "./cli": {
31
+ "import": "./dist/cli.js",
32
+ "types": "./dist/cli.d.ts"
33
+ }
34
+ },
35
+ "files": [
36
+ "dist",
37
+ "virtual.d.ts"
38
+ ],
39
+ "dependencies": {},
40
+ "peerDependencies": {
41
+ "@forinda/kickjs": "^10.11.0"
42
+ },
43
+ "peerDependenciesMeta": {
44
+ "@forinda/kickjs": {
45
+ "optional": true
46
+ }
47
+ },
48
+ "devDependencies": {
49
+ "@fastify/middie": "^9.3.5",
50
+ "@swc/core": "^1.16.18",
51
+ "@types/ejs": "^3.1.5",
52
+ "@types/node": "^26.6.5",
53
+ "@types/supertest": "^7.2.1",
54
+ "commander": "^15.0.0",
55
+ "ejs": "^3.1.10",
56
+ "express": "^5.3.0",
57
+ "fastify": "^5.12.7",
58
+ "h3": "2.0.2",
59
+ "reflect-metadata": "^0.2.2",
60
+ "supertest": "^7.3.1",
61
+ "typescript": "^7.0.2",
62
+ "vitest": "^5.0.5",
63
+ "@forinda/kickjs-cli-kit": "0.1.3",
64
+ "@forinda/kickjs": "10.11.0"
65
+ },
66
+ "publishConfig": {
67
+ "access": "public"
68
+ },
69
+ "license": "MIT",
70
+ "author": "Felix Orinda",
71
+ "engines": {
72
+ "node": ">=20.0"
73
+ },
74
+ "homepage": "https://kickjs.app/",
75
+ "repository": {
76
+ "type": "git",
77
+ "url": "https://github.com/forinda/kick-js.git",
78
+ "directory": "packages/view"
79
+ },
80
+ "bugs": {
81
+ "url": "https://github.com/forinda/kick-js/issues"
82
+ },
83
+ "scripts": {
84
+ "build": "tsdown",
85
+ "dev": "tsdown --watch",
86
+ "test": "vitest run --passWithNoTests",
87
+ "test:watch": "vitest",
88
+ "typecheck": "tsc --noEmit",
89
+ "clean": "rm -rf dist .wireit",
90
+ "bench": "vitest run --config vitest.bench.config.ts"
91
+ }
6
92
  }
package/virtual.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * `virtual:kick-views`, from `@forinda/kickjs-vite`: the build's checked
3
+ * templates (`null` in dev, where the file loader reads them) and the app's
4
+ * pipes. Pass both to `createViews`:
5
+ *
6
+ * ```ts
7
+ * /// <reference types="@forinda/kickjs-view/virtual" />
8
+ * import kickViews from 'virtual:kick-views'
9
+ * const views = createViews({ ...kickViews, layout: 'layouts/main' })
10
+ * ```
11
+ */
12
+ declare module 'virtual:kick-views' {
13
+ import type { EnvPipe, Pipe, ViewsBundle } from '@forinda/kickjs-view'
14
+ export const bundle: ViewsBundle | null
15
+ export const pipes: Record<string, Pipe | EnvPipe>
16
+ const views: { bundle: ViewsBundle | null; pipes: Record<string, Pipe | EnvPipe> }
17
+ export default views
18
+ }