@jant/core 0.2.7 → 0.2.9
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/dist/plugin.d.ts +3 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +20 -0
- package/package.json +4 -18
- package/src/plugin.ts +26 -0
- package/dist/assets/datastar.min.js +0 -1775
- package/dist/client/.vite/manifest.json +0 -17
- package/dist/client/assets/client-DKznU4dt.js +0 -3434
- package/dist/client/assets/style-D2PQnJEV.css +0 -2
- package/dist/client.d.ts +0 -12
- package/dist/client.d.ts.map +0 -1
- package/dist/jant/.dev.vars +0 -1
- package/dist/jant/.vite/manifest.json +0 -58
- package/dist/jant/assets/bun-sqlite-dialect-B0Ne_8k6.js +0 -155
- package/dist/jant/assets/index-Cg7EsRQZ.js +0 -212
- package/dist/jant/assets/index-RJeuizBo.js +0 -295
- package/dist/jant/assets/node-sqlite-dialect-bZ-6E1mH.js +0 -155
- package/dist/jant/assets/worker-entry-DWNZHBc4.js +0 -66717
- package/dist/jant/index.js +0 -2
- package/dist/jant/wrangler.json +0 -1
- package/dist/lib/assets.d.ts +0 -21
- package/dist/lib/assets.d.ts.map +0 -1
- package/dist/lib/assets.js +0 -29
- package/dist/lib/image-processor.d.ts +0 -30
- package/dist/lib/image-processor.d.ts.map +0 -1
- package/dist/theme/styles/main.css +0 -2
- package/src/style.css +0 -13
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAiB1C,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAO7D,CAAC"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import plugin from "tailwindcss/plugin";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { createRequire } from "module";
|
|
4
|
+
// Get require method (ESM compatible)
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
6
|
+
// ---------------------------------------------------------
|
|
7
|
+
// Core Logic: Dynamically resolve absolute path
|
|
8
|
+
// ---------------------------------------------------------
|
|
9
|
+
// 1. Penetrate pnpm symlinks, find the real physical location of package.json
|
|
10
|
+
const pathRoot = path.dirname(require.resolve("@jant/core/package.json"));
|
|
11
|
+
// 2. Construct the absolute path to the source directory
|
|
12
|
+
// Tailwind v4 scans absolute paths reliably, no extra config needed
|
|
13
|
+
const contentPath = path.join(pathRoot, "src/**/*.{ts,tsx}");
|
|
14
|
+
export const jantPlugin = plugin(// Plugin body: can add styles via addBase/addComponents here
|
|
15
|
+
()=>{}, {
|
|
16
|
+
// Key: Auto-inject core library source path into user's content config
|
|
17
|
+
content: [
|
|
18
|
+
contentPath
|
|
19
|
+
]
|
|
20
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jant/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "A modern, open-source microblogging platform built on Cloudflare Workers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
"types": "./dist/theme/index.d.ts",
|
|
16
16
|
"default": "./dist/theme/index.js"
|
|
17
17
|
},
|
|
18
|
+
"./plugin": "./src/plugin.ts",
|
|
18
19
|
"./preset.css": "./src/preset.css",
|
|
19
|
-
"./client": "./
|
|
20
|
+
"./client": "./dist/client.js",
|
|
20
21
|
"./*": "./*"
|
|
21
22
|
},
|
|
22
23
|
"files": [
|
|
@@ -44,7 +45,6 @@
|
|
|
44
45
|
"tailwindcss": "^4.0.0"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@cloudflare/vite-plugin": "^1.22.1",
|
|
48
48
|
"@cloudflare/workers-types": "^4.20260131.0",
|
|
49
49
|
"@eslint/js": "^9.39.2",
|
|
50
50
|
"@lingui/cli": "^5.9.0",
|
|
@@ -52,11 +52,9 @@
|
|
|
52
52
|
"@lingui/swc-plugin": "^5.10.1",
|
|
53
53
|
"@swc/cli": "^0.6.0",
|
|
54
54
|
"@swc/core": "^1.15.11",
|
|
55
|
-
"@tailwindcss/postcss": "^4.1.18",
|
|
56
55
|
"@types/node": "^25.1.0",
|
|
57
56
|
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
58
57
|
"@typescript-eslint/parser": "^8.54.0",
|
|
59
|
-
"autoprefixer": "^10.4.24",
|
|
60
58
|
"basecoat-css": "^0.3.10",
|
|
61
59
|
"drizzle-kit": "^0.31.8",
|
|
62
60
|
"eslint": "^9.39.2",
|
|
@@ -64,15 +62,10 @@
|
|
|
64
62
|
"glob": "^13.0.0",
|
|
65
63
|
"husky": "^9.1.7",
|
|
66
64
|
"lint-staged": "^16.2.7",
|
|
67
|
-
"postcss": "^8.5.6",
|
|
68
65
|
"prettier": "^3.8.1",
|
|
69
66
|
"tailwindcss": "^4.1.18",
|
|
70
67
|
"tsx": "^4.21.0",
|
|
71
|
-
"typescript": "^5.9.3"
|
|
72
|
-
"unplugin-swc": "^1.5.9",
|
|
73
|
-
"vite": "^7.3.1",
|
|
74
|
-
"vite-ssr-components": "^0.5.2",
|
|
75
|
-
"wrangler": "^4.61.1"
|
|
68
|
+
"typescript": "^5.9.3"
|
|
76
69
|
},
|
|
77
70
|
"repository": {
|
|
78
71
|
"type": "git",
|
|
@@ -98,20 +91,13 @@
|
|
|
98
91
|
"node": ">=24.0.0"
|
|
99
92
|
},
|
|
100
93
|
"scripts": {
|
|
101
|
-
"dev": "pnpm db:migrate:local && vite dev",
|
|
102
|
-
"dev:debug": "pnpm db:migrate:local && vite dev --port 19019",
|
|
103
|
-
"build": "vite build",
|
|
104
94
|
"build:lib": "swc src -d dist --strip-leading-paths && pnpm build:types",
|
|
105
95
|
"build:types": "tsc -p tsconfig.build.json",
|
|
106
|
-
"deploy": "pnpm build && wrangler deploy",
|
|
107
|
-
"preview": "vite preview",
|
|
108
96
|
"typecheck": "tsc --noEmit && tsc -p tsconfig.client.json",
|
|
109
97
|
"lint": "eslint src/",
|
|
110
98
|
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
|
|
111
99
|
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
|
|
112
100
|
"db:generate": "drizzle-kit generate",
|
|
113
|
-
"db:migrate:local": "wrangler d1 migrations apply DB --local",
|
|
114
|
-
"db:migrate:remote": "wrangler d1 migrations apply DB --remote",
|
|
115
101
|
"i18n:extract": "lingui extract",
|
|
116
102
|
"i18n:compile": "lingui compile --typescript",
|
|
117
103
|
"i18n:build": "pnpm i18n:extract && pnpm i18n:compile"
|
package/src/plugin.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import plugin from "tailwindcss/plugin";
|
|
2
|
+
import type { Config } from "tailwindcss";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { createRequire } from "module";
|
|
5
|
+
|
|
6
|
+
// Get require method (ESM compatible)
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ---------------------------------------------------------
|
|
10
|
+
// Core Logic: Dynamically resolve absolute path
|
|
11
|
+
// ---------------------------------------------------------
|
|
12
|
+
// 1. Penetrate pnpm symlinks, find the real physical location of package.json
|
|
13
|
+
const pathRoot = path.dirname(require.resolve("@jant/core/package.json"));
|
|
14
|
+
|
|
15
|
+
// 2. Construct the absolute path to the source directory
|
|
16
|
+
// Tailwind v4 scans absolute paths reliably, no extra config needed
|
|
17
|
+
const contentPath = path.join(pathRoot, "src/**/*.{ts,tsx}");
|
|
18
|
+
|
|
19
|
+
export const jantPlugin: NonNullable<Config["plugins"]>[number] = plugin(
|
|
20
|
+
// Plugin body: can add styles via addBase/addComponents here
|
|
21
|
+
() => {},
|
|
22
|
+
{
|
|
23
|
+
// Key: Auto-inject core library source path into user's content config
|
|
24
|
+
content: [contentPath],
|
|
25
|
+
}
|
|
26
|
+
);
|