ghostfill 0.2.0 → 0.2.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/README.md +62 -2
- package/dist/index.js +22 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,8 +1,56 @@
|
|
|
1
1
|
# GhostFill
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Stop demoing with test123. Generate realistic, domain-aware form data in one click.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## The Problem
|
|
6
|
+
|
|
7
|
+
Every team has this story. A PM is demoing to a client, and right there on the screen: "Cheeseburger" in the company name field, "asdf" for the email, and "John Doe" — the same John Doe — on every single record. QA tests with garbage. Designers screenshot forms full of "test123". There's no easy way to fill forms with realistic, context-appropriate data without writing seed scripts or maintaining test fixtures.
|
|
8
|
+
|
|
9
|
+
**Before GhostFill:**
|
|
10
|
+
```
|
|
11
|
+
First Name: test
|
|
12
|
+
Last Name: test
|
|
13
|
+
Email: test@test.com
|
|
14
|
+
Company: asdfasdf
|
|
15
|
+
Job Title: fjdksl
|
|
16
|
+
Phone: 1234567890
|
|
17
|
+
Address: 123 test street
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**After GhostFill:**
|
|
21
|
+
```
|
|
22
|
+
First Name: Sarah
|
|
23
|
+
Last Name: Mitchell
|
|
24
|
+
Email: s.mitchell@northwind.com
|
|
25
|
+
Company: Northwind Traders
|
|
26
|
+
Job Title: Senior Account Executive
|
|
27
|
+
Phone: +1 (312) 555-0187
|
|
28
|
+
Address: 401 N Michigan Ave, Chicago, IL 60611
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
One click. Any form. No seed scripts.
|
|
32
|
+
|
|
33
|
+
## Who It's For
|
|
34
|
+
|
|
35
|
+
**Developers** install it — `npm install ghostfill -D`, one import, done. But the whole team benefits:
|
|
36
|
+
|
|
37
|
+
- **QA Engineers** — fill forms with realistic edge cases instead of copy-pasting the same test data
|
|
38
|
+
- **Product Managers** — demo to clients with professional-looking data, not "test123"
|
|
39
|
+
- **Designers** — screenshot real-looking forms for decks and specs
|
|
40
|
+
- **Solution Architects** — show realistic D365, Salesforce, or ERP data during workshops
|
|
41
|
+
|
|
42
|
+
## Not Another Faker
|
|
43
|
+
|
|
44
|
+
faker.js fills your database. Browser autofill fills *your* data. GhostFill fills the form you're looking at — visually, with data that fits the context.
|
|
45
|
+
|
|
46
|
+
| | GhostFill | faker.js | Browser Autofill |
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| **Who uses it** | Anyone on the team | Developers only | Individual user |
|
|
49
|
+
| **How it works** | Visual in-page UI | Code library | Browser feature |
|
|
50
|
+
| **Data quality** | Domain-aware, contextual | Random but typed | Your personal data |
|
|
51
|
+
| **Form detection** | Reads labels, selects, custom dropdowns | N/A — you call it in code | Standard inputs only |
|
|
52
|
+
| **Domain presets** | D365, Healthcare, E-commerce, etc. | Generic schemas | N/A |
|
|
53
|
+
| **Setup** | One import, zero config | Write generation scripts | Already there |
|
|
6
54
|
|
|
7
55
|
## Install
|
|
8
56
|
|
|
@@ -60,6 +108,18 @@ await fill({ container: document.querySelector("form") });
|
|
|
60
108
|
4. By default, generates random sample data locally (no API needed)
|
|
61
109
|
5. Optionally enable AI mode in settings for context-aware data generation through your backend
|
|
62
110
|
|
|
111
|
+
## Presets
|
|
112
|
+
|
|
113
|
+
Save prompt templates for domain-specific data:
|
|
114
|
+
|
|
115
|
+
- **D365 CE** — Accounts, Contacts, Opportunities with CRM-realistic values
|
|
116
|
+
- **Healthcare** — Patient intake, insurance, clinical forms
|
|
117
|
+
- **E-commerce** — Products, orders, customer profiles
|
|
118
|
+
- **Automotive** — Vehicle specs, service records, dealer info
|
|
119
|
+
- **Custom** — Write your own prompt template for any domain
|
|
120
|
+
|
|
121
|
+
Presets are stored locally in the browser and sent as context to the AI provider.
|
|
122
|
+
|
|
63
123
|
## Secure AI Setup
|
|
64
124
|
|
|
65
125
|
GhostFill no longer accepts provider API keys in the browser. To use OpenAI, xAI, or Moonshot safely, expose a backend route and keep provider credentials server-side.
|
package/dist/index.js
CHANGED
|
@@ -682,7 +682,7 @@ var CSS2 = `
|
|
|
682
682
|
width: 36px;
|
|
683
683
|
height: 36px;
|
|
684
684
|
border: none;
|
|
685
|
-
border-radius:
|
|
685
|
+
border-radius: 50%;
|
|
686
686
|
background: transparent;
|
|
687
687
|
color: #a1a1aa;
|
|
688
688
|
cursor: pointer;
|
|
@@ -1192,7 +1192,7 @@ function createOverlay2(options) {
|
|
|
1192
1192
|
<div class="gf-pop-header">
|
|
1193
1193
|
<h3><span class="gf-slash">/</span>ghostfill</h3>
|
|
1194
1194
|
<div class="gf-header-right">
|
|
1195
|
-
<span class="gf-version">v0.1
|
|
1195
|
+
<span class="gf-version">v0.2.1</span>
|
|
1196
1196
|
<button class="gf-theme-btn" id="gf-s-theme" title="Toggle theme">
|
|
1197
1197
|
${saved.theme === "dark" ? ICONS.sun : ICONS.moon}
|
|
1198
1198
|
</button>
|
|
@@ -1234,17 +1234,17 @@ function createOverlay2(options) {
|
|
|
1234
1234
|
<label class="gf-label">API Key</label>
|
|
1235
1235
|
<input type="password" class="gf-input gf-input-mono" id="gf-s-key" placeholder="sk-..." autocomplete="off" spellcheck="false" />
|
|
1236
1236
|
</div>
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1237
|
+
<div class="gf-sep"></div>
|
|
1238
|
+
<div class="gf-field">
|
|
1239
|
+
<div style="display:flex;align-items:center;justify-content:space-between">
|
|
1240
|
+
<div style="display:flex;align-items:center;gap:4px">
|
|
1241
|
+
<label class="gf-label" style="margin:0">Presets</label>
|
|
1242
|
+
<span class="gf-help" id="gf-s-presets-help">?<span class="gf-help-tip">Saved prompt templates that add context when filling. Select a preset in the Fill panel to use it automatically.</span></span>
|
|
1243
|
+
</div>
|
|
1244
|
+
<button class="gf-preset-chip add" id="gf-s-preset-add" style="font-size:10px;padding:2px 6px">+ Add</button>
|
|
1244
1245
|
</div>
|
|
1245
|
-
<
|
|
1246
|
+
<div class="gf-preset-list" id="gf-s-preset-list"></div>
|
|
1246
1247
|
</div>
|
|
1247
|
-
<div class="gf-preset-list" id="gf-s-preset-list"></div>
|
|
1248
1248
|
</div>
|
|
1249
1249
|
<button class="gf-save-btn" id="gf-s-save">Save</button>
|
|
1250
1250
|
</div>
|
|
@@ -1799,6 +1799,10 @@ function createOverlay2(options) {
|
|
|
1799
1799
|
if (activePresetId === p.id) activePresetId = null;
|
|
1800
1800
|
renderPresetList();
|
|
1801
1801
|
updateFillPresetUI();
|
|
1802
|
+
const s = loadSettings(aiConfig?.provider || "openai");
|
|
1803
|
+
s.presets = presets;
|
|
1804
|
+
s.activePresetId = activePresetId;
|
|
1805
|
+
saveSettings(s);
|
|
1802
1806
|
});
|
|
1803
1807
|
pill.append(name, x);
|
|
1804
1808
|
sPresetList.appendChild(pill);
|
|
@@ -1984,9 +1988,15 @@ No specific instructions \u2014 generate realistic, contextually appropriate dat
|
|
|
1984
1988
|
}
|
|
1985
1989
|
document.addEventListener("keydown", handleShortcut);
|
|
1986
1990
|
document.addEventListener("keydown", (e) => {
|
|
1987
|
-
if (e.key
|
|
1991
|
+
if (e.key !== "Escape") return;
|
|
1992
|
+
if (currentPopover) {
|
|
1988
1993
|
e.preventDefault();
|
|
1989
1994
|
openPopover(null);
|
|
1995
|
+
return;
|
|
1996
|
+
}
|
|
1997
|
+
if (state.active) {
|
|
1998
|
+
e.preventDefault();
|
|
1999
|
+
btnMinimize.click();
|
|
1990
2000
|
}
|
|
1991
2001
|
});
|
|
1992
2002
|
function destroy() {
|