@forgedevstack/ink 1.0.0 → 1.0.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.1 — 2026-08-01
4
+
5
+ ### Added
6
+ - Theme helper classes: `.ink-theme-snow`, `.ink-theme-bubble`, `.ink-theme-dark`, `.ink-theme-minimal`
7
+ - Expanded README: full prop table, `ToolbarOption` list, CSS variables, Quill positioning, portal links, asset screenshots
8
+
9
+ ### Docs
10
+ - Companion light Quill-inspired portal (docs + Format/Modules/Theme playground)
11
+
3
12
  ## 1.0.0 — 2026-08-01
4
13
 
5
14
  ### Added
package/README.md CHANGED
@@ -1,9 +1,16 @@
1
1
  # Ink — `@forgedevstack/ink`
2
2
 
3
- **ForgeStack rich text editor** for React. WYSIWYG toolbar, heading styles, colors, lists, links, image paste, built-in typo auto-fix MVP, Angular usage stub, and a WordPress plugin stub.
3
+ [![npm version](https://img.shields.io/npm/v/@forgedevstack/ink.svg)](https://www.npmjs.com/package/@forgedevstack/ink)
4
+ [![license](https://img.shields.io/npm/l/@forgedevstack/ink.svg)](./LICENSE)
4
5
 
5
- > **Domain:** [inkforgejs.com](https://inkforgejs.com) placeholder until registered at your registrar.
6
- > Avoid conflating with unrelated brands (e.g. proseforge / forgequill).
6
+ **ForgeStack rich text editor** for React. WYSIWYG toolbar, heading styles, colors, lists, links, image paste, built-in typo auto-fix MVP, CSS themes, Angular usage stub, and a WordPress plugin stub.
7
+
8
+ <p align="center">
9
+ <img src="./assets/ink-logo.png" alt="Ink logo" width="120" />
10
+ </p>
11
+
12
+ > **Domain:** [inkforgejs.com](https://inkforgejs.com) — docs + playground.
13
+ > **Inspired by Quill** in UX (light paper UI, docs sidebar, Format/Modules/Theme playground) — not a Quill fork. Ink is a contenteditable React component with ForgeStack integrations.
7
14
 
8
15
  ## Install
9
16
 
@@ -29,21 +36,110 @@ export function App() {
29
36
  }
30
37
  ```
31
38
 
32
- ## Features (1.0.0)
39
+ ## Playground & docs
33
40
 
34
- - Controlled `value` / `onChange` (HTML string)
35
- - Toolbar: bold / italic / underline / strike, headings, text + highlight colors, lists, links, image insert/paste
36
- - **Typo auto-fix MVP** small bundled dictionary + heuristics (`applyTypoAutoFix`), runs on blur; no heavy proprietary spell engine
37
- - **AI agent stub**`@forgedevstack/ink/plugins/ai` register/run interface; full agents coming in **1.x**
38
- - **Angular** `@forgedevstack/ink/angular` thin usage helpers / docs entry
39
- - **WordPress** `wordpress/ink-editor` classic meta box stub
41
+ | | |
42
+ |---|---|
43
+ | Docs portal | [ink-portal](https://github.com/yaghobieh/ink-portal) · [inkforgejs.com](https://inkforgejs.com) |
44
+ | Live playground | `/playground` Formats, Modules, Theme + code export |
45
+ | npm | https://www.npmjs.com/package/@forgedevstack/ink |
46
+ | Repo | https://github.com/yaghobieh/ink |
47
+
48
+ <p align="center">
49
+ <img src="./assets/ink-hero.png" alt="Ink hero" width="640" />
50
+ </p>
51
+
52
+ ## Props (`InkEditorProps`)
53
+
54
+ | Prop | Type | Default | Description |
55
+ |------|------|---------|-------------|
56
+ | `value` | `string` | — | Controlled HTML |
57
+ | `defaultValue` | `string` | — | Uncontrolled initial HTML |
58
+ | `onChange` | `(html: string) => void` | — | Fires when content changes |
59
+ | `placeholder` | `string` | `"Start typing..."` | Empty-state placeholder |
60
+ | `disabled` | `boolean` | `false` | Disables interaction |
61
+ | `readOnly` | `boolean` | `false` | View-only content |
62
+ | `minHeight` | `string \| number` | — | Content min height |
63
+ | `maxHeight` | `string \| number` | — | Content max height |
64
+ | `toolbar` | `ToolbarOption[]` | `INK_DEFAULT_TOOLBAR` | Toolbar buttons / controls |
65
+ | `testId` | `string` | — | Testing id |
66
+ | `allowImagePaste` | `boolean` | `true` | Paste images into the editor |
67
+ | `showCharCount` | `boolean` | `false` | Footer character count |
68
+ | `charCountMax` | `number` | — | Optional max for counter UI |
69
+ | `typoAutoFix` | `boolean` | `false` | Blur-time typo MVP fixes |
70
+
71
+ Also accepts standard `div` HTML attributes except `onChange`.
72
+
73
+ ## Toolbar options (`ToolbarOption`)
74
+
75
+ ```
76
+ bold | italic | underline | strikethrough
77
+ heading1 | heading2 | heading3 | heading4 | heading5 | heading6
78
+ paragraph | headingDropdown
79
+ bulletList | orderedList | blockquote | code
80
+ link | image | textColor | highlightColor
81
+ alignLeft | alignCenter | alignRight | alignJustify
82
+ indent | outdent | clearFormat | divider
83
+ ```
84
+
85
+ Presets exported from the package:
86
+
87
+ - `INK_DEFAULT_TOOLBAR` — full editing set
88
+ - `INK_SIMPLE_TOOLBAR` — bold / italic / underline + lists
89
+
90
+ ```tsx
91
+ import { InkEditor, INK_SIMPLE_TOOLBAR } from '@forgedevstack/ink';
92
+
93
+ <InkEditor toolbar={INK_SIMPLE_TOOLBAR} />
94
+ ```
95
+
96
+ ## CSS variables & themes
97
+
98
+ Root class: `.Ink-Editor`. Override variables on a wrapper or the editor:
99
+
100
+ | Variable | Role |
101
+ |----------|------|
102
+ | `--ink-border` | Borders |
103
+ | `--ink-bg` | Editor background |
104
+ | `--ink-toolbar` | Toolbar background |
105
+ | `--ink-text` | Body text |
106
+ | `--ink-muted` | Placeholder / footer |
107
+ | `--ink-accent` | Active / accent |
108
+ | `--ink-accent-soft` | Active button soft fill |
109
+
110
+ Theme helper classes (wrap the editor or add to the root):
111
+
112
+ | Class | Look |
113
+ |-------|------|
114
+ | `.ink-theme-snow` | Clean Quill-like paper toolbar |
115
+ | `.ink-theme-bubble` | Soft floating card |
116
+ | `.ink-theme-dark` | Dark zinc surfaces |
117
+ | `.ink-theme-minimal` | Flat, dashed toolbar edge |
118
+
119
+ ```tsx
120
+ <div className="ink-theme-snow">
121
+ <InkEditor value={html} onChange={setHtml} />
122
+ </div>
123
+ ```
124
+
125
+ ## Modules
126
+
127
+ - **Typo auto-fix** — `typoAutoFix` runs `applyTypoAutoFix` on blur (small bundled dictionary; not a full spell engine)
128
+ - **Image paste** — `allowImagePaste`
129
+ - **Char count** — `showCharCount` / `charCountMax`
130
+ - **Read only** — `readOnly`
131
+
132
+ ```ts
133
+ import { applyTypoAutoFix } from '@forgedevstack/ink';
134
+
135
+ const { html, fixedCount } = applyTypoAutoFix(rawHtml);
136
+ ```
40
137
 
41
138
  ## AI plugin (stub)
42
139
 
43
140
  ```ts
44
141
  import { inkAi } from '@forgedevstack/ink/plugins/ai';
45
142
 
46
- // Register a real agent in 1.x — interface is stable now:
47
143
  inkAi.register({
48
144
  id: 'my-agent',
49
145
  name: 'My Agent',
@@ -54,6 +150,8 @@ inkAi.register({
54
150
  });
55
151
  ```
56
152
 
153
+ Full agents land in **1.x**.
154
+
57
155
  ## Angular
58
156
 
59
157
  ```ts
@@ -69,14 +167,25 @@ Mount `InkEditor` via your preferred React↔Angular bridge. A dedicated Angular
69
167
 
70
168
  See [`wordpress/README.md`](./wordpress/README.md).
71
169
 
72
- ## Links
170
+ ## Positioning vs Quill
73
171
 
74
- | | |
75
- |---|---|
76
- | npm | https://www.npmjs.com/package/@forgedevstack/ink |
77
- | Repo | https://github.com/yaghobieh/ink |
78
- | Portal | https://inkforgejs.com (register domain) |
79
- | Companion | https://github.com/yaghobieh/ink-portal |
172
+ | | Quill | Ink |
173
+ |---|---|---|
174
+ | Core | Delta document model + Parchment | HTML string + contenteditable |
175
+ | Framework | Framework-agnostic | React-first (ForgeStack) |
176
+ | Themes | Snow / Bubble built-in | CSS variables + `ink-theme-*` classes |
177
+ | Typo / AI | Ecosystem plugins | Built-in typo MVP + AI register stub |
178
+ | License / lineage | Quill open source | Independent MIT package — **inspired by**, not a fork |
179
+
180
+ ## Features (1.0.1)
181
+
182
+ - Controlled `value` / `onChange` (HTML string)
183
+ - Toolbar: bold / italic / underline / strike, headings, text + highlight colors, lists, links, image insert/paste
184
+ - **Typo auto-fix MVP** — bundled dictionary + heuristics
185
+ - **Theme classes** — snow / bubble / dark / minimal
186
+ - **AI agent stub** — `@forgedevstack/ink/plugins/ai`
187
+ - **Angular** — `@forgedevstack/ink/angular` helpers
188
+ - **WordPress** — `wordpress/ink-editor` stub
80
189
 
81
190
  ## License
82
191
 
package/dist/styles.css CHANGED
@@ -147,3 +147,57 @@
147
147
  --ink-accent-soft: rgb(45 212 191 / 0.15);
148
148
  }
149
149
  }
150
+
151
+ .ink-theme-snow .Ink-Editor,
152
+ .Ink-Editor.ink-theme-snow {
153
+ --ink-border: #e5e7eb;
154
+ --ink-bg: #ffffff;
155
+ --ink-toolbar: #f9fafb;
156
+ --ink-text: #111827;
157
+ --ink-muted: #6b7280;
158
+ --ink-accent: #0f766e;
159
+ --ink-accent-soft: #ccfbf1;
160
+ border-radius: 0.25rem;
161
+ }
162
+
163
+ .ink-theme-bubble .Ink-Editor,
164
+ .Ink-Editor.ink-theme-bubble {
165
+ --ink-border: transparent;
166
+ --ink-bg: #ffffff;
167
+ --ink-toolbar: #ffffff;
168
+ --ink-text: #111827;
169
+ --ink-muted: #6b7280;
170
+ --ink-accent: #0f766e;
171
+ --ink-accent-soft: #ccfbf1;
172
+ box-shadow: 0 4px 24px rgb(15 23 42 / 0.1);
173
+ border-radius: 1rem;
174
+ }
175
+
176
+ .ink-theme-dark .Ink-Editor,
177
+ .Ink-Editor.ink-theme-dark {
178
+ --ink-border: #3f3f46;
179
+ --ink-bg: #18181b;
180
+ --ink-toolbar: #27272a;
181
+ --ink-text: #f4f4f5;
182
+ --ink-muted: #a1a1aa;
183
+ --ink-accent: #2dd4bf;
184
+ --ink-accent-soft: rgb(45 212 191 / 0.15);
185
+ }
186
+
187
+ .ink-theme-minimal .Ink-Editor,
188
+ .Ink-Editor.ink-theme-minimal {
189
+ --ink-border: #e7e5e4;
190
+ --ink-bg: #ffffff;
191
+ --ink-toolbar: #ffffff;
192
+ --ink-text: #1c1917;
193
+ --ink-muted: #78716c;
194
+ --ink-accent: #0f766e;
195
+ --ink-accent-soft: #f0fdfa;
196
+ box-shadow: none;
197
+ border-radius: 0;
198
+ }
199
+
200
+ .ink-theme-minimal .Ink-Editor__toolbar,
201
+ .Ink-Editor.ink-theme-minimal .Ink-Editor__toolbar {
202
+ border-bottom-style: dashed;
203
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgedevstack/ink",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "ForgeStack rich text editor for React — WYSIWYG toolbar, typo auto-fix, Angular adapter, and WordPress stub. The writing layer of ForgeStack.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",