@pixelmatters/markup 1.0.2 → 1.1.0

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 CHANGED
@@ -131,7 +131,7 @@ The popup origin is validated against the project's `allowedDomains` before any
131
131
  1. Sign in to the Markup dashboard.
132
132
  2. Open your project → **Settings → API Keys**.
133
133
  3. Click **New key**, label it, and copy the raw key — it's shown once.
134
- 4. Open **Settings → Domains** and add the host domain (`app.example.com`, `*.staging.example.com`). `localhost` is auto-allowed in dev.
134
+ 4. Open **Settings → Domains** and add the host domain (`app.example.com`, `*.staging.example.com`). Production deployments do not auto-allow `localhost`; add it to the allowlist explicitly if you test against the deployment from `http://localhost`.
135
135
 
136
136
  ## AI prompt
137
137
 
@@ -141,14 +141,17 @@ Paste the block below into Claude, ChatGPT, Cursor, or any other LLM and it'll w
141
141
  You are helping me install the **`@pixelmatters/markup`** feedback widget into my web app.
142
142
 
143
143
  ## What it is
144
+
144
145
  A drop-in feedback widget published on npm as `@pixelmatters/markup`. It mounts a floating action button that lets users pin threaded comments (and optional annotated screenshots) anywhere on the page. It runs inside a shadow DOM so it doesn't affect host CSS.
145
146
 
146
147
  ## My credentials
147
- - `apiUrl`: `https://<MY_DEPLOYMENT>.convex.site` ← replace with the value from Markup dashboard → Settings → Install
148
- - `apiKey`: `markup_...` ← replace with a key from Markup dashboard → Settings → API Keys
149
- Store these in environment variables (e.g. `VITE_MARKUP_API_URL`, `VITE_MARKUP_API_KEY`, or the equivalent for my framework). Do not hardcode them.
148
+
149
+ - `apiUrl`: `https://<MY_DEPLOYMENT>.convex.site` ← replace with the value from Markup dashboard → Settings → Install
150
+ - `apiKey`: `markup_...` replace with a key from Markup dashboard Settings API Keys
151
+ Store these in environment variables (e.g. `VITE_MARKUP_API_URL`, `VITE_MARKUP_API_KEY`, or the equivalent for my framework). Do not hardcode them.
150
152
 
151
153
  ## API
154
+
152
155
  ```ts
153
156
  import { init, destroy } from '@pixelmatters/markup'
154
157
  // or:
@@ -163,6 +166,7 @@ init({
163
166
  ```
164
167
 
165
168
  For a `<script>` tag drop-in (no bundler), use:
169
+
166
170
  ```html
167
171
  <script
168
172
  type="module"
@@ -173,9 +177,11 @@ For a `<script>` tag drop-in (no bundler), use:
173
177
  data-position="bottom-right"
174
178
  ></script>
175
179
  ```
180
+
176
181
  The `data-markup-widget="true"` attribute is required.
177
182
 
178
183
  ## Your task
184
+
179
185
  1. Detect my framework (React, Vue, Svelte, Next.js, plain HTML, etc.) by inspecting the project.
180
186
  2. Install `@pixelmatters/markup` with the package manager already in use (pnpm/npm/yarn).
181
187
  3. Wire the widget into the **root layout / app shell** so it shows on every page.
@@ -184,6 +190,7 @@ The `data-markup-widget="true"` attribute is required.
184
190
  6. Show me a diff of the changes and a one-line note on how to verify (e.g. "run dev server, click the button in the bottom-right").
185
191
 
186
192
  Constraints:
193
+
187
194
  - Do **not** add CSS imports or provider components — the widget needs neither.
188
195
  - Do **not** hardcode the key.
189
196
  - If the project has a CSP, add `https://unpkg.com` to `script-src` only if I'm using the `<script>` tag path.