@imjp/writenex-astro 0.1.0 → 1.3.6
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 +13 -13
- package/dist/{chunk-CF2XXJFF.js → chunk-4H63L4YO.js} +436 -436
- package/dist/chunk-4H63L4YO.js.map +1 -0
- package/dist/{chunk-AAOQHQPU.js → chunk-GYAFIVVI.js} +6 -6
- package/dist/chunk-GYAFIVVI.js.map +1 -0
- package/dist/{chunk-XNTQTTJU.js → chunk-JFQQJPDF.js} +2 -2
- package/dist/{chunk-XNTQTTJU.js.map → chunk-JFQQJPDF.js.map} +1 -1
- package/dist/{chunk-CYLDJ3HZ.js → chunk-JMNCPNQX.js} +4 -4
- package/dist/{chunk-CYLDJ3HZ.js.map → chunk-JMNCPNQX.js.map} +1 -1
- package/dist/{chunk-5PM6EQE5.js → chunk-N37EPLKG.js} +13 -5
- package/dist/chunk-N37EPLKG.js.map +1 -0
- package/dist/{chunk-7XU5X6CW.js → chunk-NSW7AIVF.js} +12 -12
- package/dist/chunk-NSW7AIVF.js.map +1 -0
- package/dist/{chunk-CRPZUUDU.js → chunk-YBCPOLMY.js} +1 -1
- package/dist/{chunk-CRPZUUDU.js.map → chunk-YBCPOLMY.js.map} +1 -1
- package/dist/client/index.css +1 -1
- package/dist/client/index.css.map +1 -1
- package/dist/client/index.d.ts +19 -0
- package/dist/client/index.js +159 -147
- package/dist/client/index.js.map +1 -1
- package/dist/client/styles.css +2 -8
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +2 -2
- package/dist/{config-BmEdBDo_.d.ts → config-CliL0CoN.d.ts} +1 -1
- package/dist/{content-BWR52vD-.d.ts → content-TuL3GT66.d.ts} +1 -1
- package/dist/discovery/index.d.ts +2 -2
- package/dist/discovery/index.js +3 -3
- package/dist/filesystem/index.d.ts +703 -703
- package/dist/filesystem/index.js +4 -4
- package/dist/filesystem/index.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/{loader-55LWCXHA.js → loader-53VVP2IN.js} +3 -3
- package/dist/schema-DDJyoVkj.d.ts +189 -0
- package/dist/server/index.d.ts +37 -37
- package/dist/server/index.js +5 -5
- package/package.json +17 -18
- package/src/client/App.tsx +18 -18
- package/src/client/components/ConfigPanel/ConfigPanel.tsx +14 -13
- package/src/client/components/CreateContentModal/CreateContentModal.tsx +1 -1
- package/src/client/components/Editor/Editor.tsx +27 -27
- package/src/client/components/Editor/ImageDialog.tsx +4 -3
- package/src/client/components/Editor/LinkDialog.tsx +7 -6
- package/src/client/components/Editor/index.ts +1 -1
- package/src/client/components/FrontmatterForm/FrontmatterForm.css +1 -1
- package/src/client/components/FrontmatterForm/FrontmatterForm.tsx +1 -1
- package/src/client/components/Header/Header.tsx +8 -8
- package/src/client/components/KeyboardShortcuts/KeyboardShortcuts.tsx +1 -1
- package/src/client/components/LazyEditor.tsx +1 -1
- package/src/client/components/LiveRegion/index.ts +1 -1
- package/src/client/components/SearchReplace/SearchReplacePanel.tsx +5 -5
- package/src/client/components/SearchReplace/index.ts +1 -1
- package/src/client/components/SelectCollectionModal/SelectCollectionModal.tsx +2 -2
- package/src/client/components/Sidebar/Sidebar.tsx +6 -6
- package/src/client/components/SkipLink/index.ts +1 -1
- package/src/client/components/UnsavedChangesModal/UnsavedChangesModal.tsx +1 -1
- package/src/client/components/VersionHistory/DiffViewer.tsx +18 -11
- package/src/client/components/VersionHistory/VersionActions.tsx +6 -6
- package/src/client/components/VersionHistory/VersionHistoryPanel.tsx +10 -10
- package/src/client/components/VersionHistory/index.ts +2 -2
- package/src/client/context/ApiContext.tsx +2 -2
- package/src/client/context/ThemeContext.tsx +2 -2
- package/src/client/hooks/useApi.ts +1 -1
- package/src/client/hooks/useFocusTrap.ts +1 -1
- package/src/client/hooks/useSearch.ts +1 -1
- package/src/client/hooks/useVersionHistory.ts +2 -2
- package/src/client/index.tsx +1 -1
- package/src/client/styles.css +2 -8
- package/src/config/defaults.ts +4 -4
- package/src/config/index.ts +14 -16
- package/src/config/loader.ts +24 -4
- package/src/config/schema.ts +8 -4
- package/src/core/index.ts +1 -1
- package/src/discovery/collections.ts +3 -3
- package/src/discovery/index.ts +9 -11
- package/src/discovery/patterns.ts +2 -2
- package/src/discovery/schema.ts +1 -1
- package/src/filesystem/images.ts +3 -3
- package/src/filesystem/index.ts +74 -79
- package/src/filesystem/reader.ts +5 -3
- package/src/filesystem/version-config.ts +10 -10
- package/src/filesystem/versions.ts +9 -9
- package/src/filesystem/watcher.ts +1 -1
- package/src/filesystem/writer.ts +6 -6
- package/src/global.d.ts +39 -0
- package/src/index.ts +10 -10
- package/src/integration.ts +6 -3
- package/src/server/assets.ts +3 -3
- package/src/server/cache.ts +1 -1
- package/src/server/index.ts +12 -15
- package/src/server/middleware.ts +3 -3
- package/src/server/routes.ts +28 -28
- package/src/types/index.ts +24 -28
- package/dist/chunk-5PM6EQE5.js.map +0 -1
- package/dist/chunk-7XU5X6CW.js.map +0 -1
- package/dist/chunk-AAOQHQPU.js.map +0 -1
- package/dist/chunk-CF2XXJFF.js.map +0 -1
- package/dist/loader-CrdnaAWR.d.ts +0 -327
- /package/dist/{loader-55LWCXHA.js.map → loader-53VVP2IN.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# @writenex
|
|
1
|
+
# @imjp/writenex-astro
|
|
2
2
|
|
|
3
3
|
Visual editor for Astro content collections - WYSIWYG editing for your Astro site.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
**@writenex
|
|
7
|
+
**@imjp/writenex-astro** is an Astro integration that provides a WYSIWYG editor interface for managing your content collections. It runs alongside your Astro dev server and provides direct filesystem access to your content.
|
|
8
8
|
|
|
9
9
|
### Key Features
|
|
10
10
|
|
|
@@ -27,7 +27,7 @@ Visual editor for Astro content collections - WYSIWYG editing for your Astro sit
|
|
|
27
27
|
### 1. Install the integration
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
npx astro add @writenex
|
|
30
|
+
npx astro add @imjp/writenex-astro
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
This will install the package and automatically configure your `astro.config.mjs`.
|
|
@@ -50,13 +50,13 @@ If you prefer to install manually:
|
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
52
|
# npm
|
|
53
|
-
npm install @writenex
|
|
53
|
+
npm install @imjp/writenex-astro
|
|
54
54
|
|
|
55
55
|
# pnpm
|
|
56
|
-
pnpm add @writenex
|
|
56
|
+
pnpm add @imjp/writenex-astro
|
|
57
57
|
|
|
58
58
|
# yarn
|
|
59
|
-
yarn add @writenex
|
|
59
|
+
yarn add @imjp/writenex-astro
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Then add the integration to your config:
|
|
@@ -64,7 +64,7 @@ Then add the integration to your config:
|
|
|
64
64
|
```typescript
|
|
65
65
|
// astro.config.mjs
|
|
66
66
|
import { defineConfig } from "astro/config";
|
|
67
|
-
import writenex from "@writenex
|
|
67
|
+
import writenex from "@imjp/writenex-astro";
|
|
68
68
|
|
|
69
69
|
export default defineConfig({
|
|
70
70
|
integrations: [writenex()],
|
|
@@ -83,7 +83,7 @@ Create `writenex.config.ts` in your project root for full control:
|
|
|
83
83
|
|
|
84
84
|
```typescript
|
|
85
85
|
// writenex.config.ts
|
|
86
|
-
import { defineConfig } from "@writenex
|
|
86
|
+
import { defineConfig } from "@imjp/writenex-astro";
|
|
87
87
|
|
|
88
88
|
export default defineConfig({
|
|
89
89
|
// Define collections explicitly
|
|
@@ -240,7 +240,7 @@ Writenex automatically creates shadow copies of your content before each save, p
|
|
|
240
240
|
|
|
241
241
|
```typescript
|
|
242
242
|
// writenex.config.ts
|
|
243
|
-
import { defineConfig } from "@writenex
|
|
243
|
+
import { defineConfig } from "@imjp/writenex-astro";
|
|
244
244
|
|
|
245
245
|
export default defineConfig({
|
|
246
246
|
versionHistory: {
|
|
@@ -327,7 +327,7 @@ import {
|
|
|
327
327
|
saveVersionWithConfig,
|
|
328
328
|
getVersionsWithConfig,
|
|
329
329
|
restoreVersionWithConfig,
|
|
330
|
-
} from "@writenex
|
|
330
|
+
} from "@imjp/writenex-astro";
|
|
331
331
|
|
|
332
332
|
// Save a version with label
|
|
333
333
|
await saveVersionWithConfig(
|
|
@@ -518,14 +518,14 @@ writenex({
|
|
|
518
518
|
|
|
519
519
|
## Requirements
|
|
520
520
|
|
|
521
|
-
- Astro 4.x or
|
|
521
|
+
- Astro 4.x, 5.x, or 6.x
|
|
522
522
|
- React 18.x or 19.x
|
|
523
|
-
- Node.js 18
|
|
523
|
+
- Node.js 22.12.0+ (Node 18 and 20 are no longer supported)
|
|
524
524
|
|
|
525
525
|
### Future Plans
|
|
526
526
|
|
|
527
527
|
- MDX full support (components, imports)
|
|
528
|
-
- CLI wrapper (`npx @writenex
|
|
528
|
+
- CLI wrapper (`npx @imjp/writenex-astro`)
|
|
529
529
|
- Git integration (auto-commit on save)
|
|
530
530
|
- Media library management
|
|
531
531
|
|