@jant/core 0.2.11 → 0.2.12
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/bin/jant.js +1 -3
- package/dist/app.d.ts.map +1 -1
- package/dist/lib/image.d.ts.map +1 -1
- package/dist/lib/schemas.d.ts.map +1 -1
- package/dist/lib/sse.d.ts.map +1 -1
- package/dist/routes/api/upload.js +10 -2
- package/dist/routes/dash/collections.d.ts.map +1 -1
- package/dist/routes/dash/index.js +2 -1
- package/dist/routes/dash/pages.d.ts.map +1 -1
- package/dist/routes/dash/redirects.d.ts.map +1 -1
- package/dist/services/collection.d.ts.map +1 -1
- package/dist/services/post.d.ts.map +1 -1
- package/dist/theme/components/ActionButtons.d.ts.map +1 -1
- package/dist/theme/components/CrudPageHeader.d.ts.map +1 -1
- package/dist/theme/components/EmptyState.d.ts.map +1 -1
- package/dist/theme/components/PageForm.d.ts.map +1 -1
- package/dist/theme/components/Pagination.d.ts.map +1 -1
- package/dist/theme/components/PostForm.d.ts.map +1 -1
- package/dist/theme/components/PostList.d.ts.map +1 -1
- package/dist/theme/components/ThreadView.d.ts.map +1 -1
- package/dist/theme/components/index.d.ts +1 -1
- package/dist/theme/components/index.d.ts.map +1 -1
- package/dist/theme/layouts/BaseLayout.d.ts.map +1 -1
- package/dist/theme/layouts/DashLayout.d.ts.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -14
- package/src/app.tsx +56 -12
- package/src/db/migrations/meta/0000_snapshot.json +16 -47
- package/src/db/migrations/meta/_journal.json +1 -1
- package/src/i18n/EXAMPLES.md +15 -13
- package/src/i18n/README.md +22 -18
- package/src/i18n/context.tsx +1 -1
- package/src/lib/image-processor.ts +2 -10
- package/src/lib/image.ts +1 -5
- package/src/lib/schemas.ts +6 -6
- package/src/lib/sse.ts +2 -8
- package/src/routes/api/posts.ts +4 -13
- package/src/routes/api/upload.ts +19 -8
- package/src/routes/dash/collections.tsx +102 -26
- package/src/routes/dash/index.tsx +5 -5
- package/src/routes/dash/media.tsx +51 -24
- package/src/routes/dash/pages.tsx +41 -21
- package/src/routes/dash/posts.tsx +12 -3
- package/src/routes/dash/redirects.tsx +53 -20
- package/src/routes/dash/settings.tsx +26 -6
- package/src/routes/pages/archive.tsx +19 -15
- package/src/routes/pages/collection.tsx +11 -2
- package/src/routes/pages/home.tsx +10 -3
- package/src/routes/pages/page.tsx +6 -5
- package/src/routes/pages/post.tsx +1 -4
- package/src/routes/pages/search.tsx +14 -8
- package/src/services/collection.ts +1 -5
- package/src/services/post.ts +1 -3
- package/src/theme/components/ActionButtons.tsx +6 -2
- package/src/theme/components/CrudPageHeader.tsx +4 -10
- package/src/theme/components/EmptyState.tsx +2 -11
- package/src/theme/components/PageForm.tsx +17 -9
- package/src/theme/components/Pagination.tsx +25 -40
- package/src/theme/components/PostForm.tsx +25 -8
- package/src/theme/components/PostList.tsx +17 -11
- package/src/theme/components/ThreadView.tsx +16 -19
- package/src/theme/components/index.ts +8 -1
- package/src/theme/layouts/BaseLayout.tsx +1 -3
- package/src/theme/layouts/DashLayout.tsx +32 -8
- package/src/types.ts +0 -2
- package/dist/plugin.d.ts +0 -3
- package/dist/plugin.d.ts.map +0 -1
- package/dist/plugin.js +0 -20
- package/dist/tailwind.d.ts +0 -12
- package/dist/tailwind.d.ts.map +0 -1
- package/dist/tailwind.js +0 -15
package/dist/plugin.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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/dist/tailwind.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tailwind CSS content path helper for @jant/core
|
|
3
|
-
*
|
|
4
|
-
* This helper resolves the absolute path to @jant/core source files,
|
|
5
|
-
* working correctly with pnpm symlinks and npm installations.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Returns the absolute glob path to scan @jant/core source files for Tailwind classes.
|
|
9
|
-
* Uses require.resolve to penetrate pnpm symlinks.
|
|
10
|
-
*/
|
|
11
|
-
export declare function jantContent(): string;
|
|
12
|
-
//# sourceMappingURL=tailwind.d.ts.map
|
package/dist/tailwind.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../src/tailwind.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;;GAGG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAGpC"}
|
package/dist/tailwind.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tailwind CSS content path helper for @jant/core
|
|
3
|
-
*
|
|
4
|
-
* This helper resolves the absolute path to @jant/core source files,
|
|
5
|
-
* working correctly with pnpm symlinks and npm installations.
|
|
6
|
-
*/ import path from "path";
|
|
7
|
-
import { createRequire } from "module";
|
|
8
|
-
const require = createRequire(import.meta.url);
|
|
9
|
-
/**
|
|
10
|
-
* Returns the absolute glob path to scan @jant/core source files for Tailwind classes.
|
|
11
|
-
* Uses require.resolve to penetrate pnpm symlinks.
|
|
12
|
-
*/ export function jantContent() {
|
|
13
|
-
const root = path.dirname(require.resolve("@jant/core/package.json"));
|
|
14
|
-
return path.join(root, "src/**/*.{ts,tsx}");
|
|
15
|
-
}
|