@usefillo/dom 0.7.0 → 0.9.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
@@ -12,7 +12,7 @@ npm i @usefillo/dom
12
12
  import { renderForm } from "@usefillo/dom";
13
13
  import "@usefillo/dom/styles.css"; // optional default theme — or bring your own
14
14
 
15
- renderForm(document.querySelector("#fillo-form"), {
15
+ renderForm("#fillo-form", {
16
16
  formId: "cust-feedback",
17
17
  onSubmitted: (id) => console.log("response", id),
18
18
  });
@@ -32,7 +32,7 @@ const form = defineForm({
32
32
  ] }],
33
33
  });
34
34
 
35
- renderForm(document.querySelector("#fillo-form"), {
35
+ renderForm("#fillo-form", {
36
36
  form,
37
37
  client,
38
38
  onSubmitted: (id) => console.log("response", id),
@@ -47,7 +47,7 @@ Or drop it in with a single script tag — the bundle exposes a global `Fillo`:
47
47
  <script>
48
48
  const client = Fillo.createClient({ key: "pk_…" });
49
49
  const form = Fillo.defineForm({ id: "cust-feedback", pages: [/* … */] });
50
- Fillo.renderForm(document.querySelector("#fillo-form"), { form, client });
50
+ Fillo.renderForm("#fillo-form", { form, client });
51
51
  </script>
52
52
  ```
53
53
 
@@ -55,7 +55,10 @@ For tiny feedback widgets, set `settings.submitMode: "auto"` on a select/rating/
55
55
 
56
56
  The default stylesheet follows system dark mode for unthemed embeds. Pass `theme: { colorScheme: "dark" }` or `"light"` when the host surface is known.
57
57
 
58
- Re-exports the core embedding surface from [`@usefillo/core`](https://www.npmjs.com/package/@usefillo/core) (`createClient`, `FilloClient`, `FormSchema`, validation/logic helpers, …).
58
+ Re-exports the core pieces used by DOM integrations from
59
+ [`@usefillo/core`](https://www.npmjs.com/package/@usefillo/core), including
60
+ `createClient`, `defineForm`, `FilloClient`, `createFormController`, and the
61
+ schema/value types.
59
62
 
60
63
  ## Links
61
64