@mccaskie-labs/workbench-quotes 0.1.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @mccaskie-labs/workbench-quotes
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Every tool follows the project's look (docs/theming.md step 2, Robert, 24 November 2026). Each tool's colour, font and corner variables now default to the shared theme tokens with a Clean, light fallback (`--wb-booking-accent: var(--wb-accent, #2563eb)`), and tool colours with no token of their own (a recessed panel, a status mark, a tinted pill) are worked out from the tokens with `color-mix()`. So a page drawn with these tools takes the look in the project's workbench.css: light (Clean) by default, or whatever brand.json and project.css say. Breaking for a project page that relied on the old dark defaults: give brand.json the look you want, or set the tokens in project.css. Variable and class names are unchanged, so existing project.css overrides still win. workbench-ui: `styleProblems` refuses a tool's text, muted, surface, line, background, accent, focus, danger, success, warning, font or radius variable whose default doesn't read its token (email, PDF and image follow in step 3); the `wb-ui` class no longer forces dark, and Workbench's own pages (`STYLE`, `UI_CSS`) keep their dark values; `shell` with `stylesheets` (a project page) no longer says dark in its meta tag.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @mccaskie-labs/workbench-forms@0.11.0
13
+
3
14
  ## 0.1.0
4
15
 
5
16
  - First version. A price list per kind of quote (`workbench/quotes/<kind>.json`, `npx workbench-quotes init` with Australian defaults: AUD, GST included at 10%, 30 days) prices a workbench-forms form's answers in whole cents: a quantity from a whole or money field with a minimum, an item that applies when a choice is picked, discounts as negative prices, GST included (1/11 of the total) or added, and a deposit. `npx workbench-quotes generate [--check]` checks each kind against the form it reads and writes `src/quotes.generated.ts`; `migration` writes `quotesMigration` (service role only). `createQuotes` keeps quotes in the app's own database, numbered per business (Q-0001) under a lock: `create`, `update` (drafts only), `revise` (a new quote that withdraws the old when sent), `send` (an unguessable link on the project's own domain, only its SHA-256 stored), `withdraw`, `get`, `list`, `document` (for workbench-pdf) and a daily `cleanup` (quotes that weren't accepted, after the kind's `unaccepted_days`). `handle()` serves the accept page (`renderQuotePage`, plain HTML forms, no script; `wb-quote-*`, `QUOTE_STYLES`; words in English, Tagalog and Taglish): the customer accepts with their typed name and a tick, or declines with a reason from a list, never typed words and no IP address; an expired, withdrawn or answered quote says so. `onAccepted` runs once per quote with `toInvoice(quote)`, the payments and invoices tool's `InvoiceSource`. Money is shown to two decimal places.
package/dist/cli.js CHANGED
File without changes
package/dist/styles.js CHANGED
@@ -17,18 +17,18 @@ export const QUOTE_STYLES = {
17
17
  title: "Quotes and estimates",
18
18
  prefix: "wb-quote-",
19
19
  variables: [
20
- { name: "--wb-quote-text", value: "#1d1d22", about: "Text" },
21
- { name: "--wb-quote-muted", value: "#5d5d68", about: "Quieter text: labels, the quantity, the terms" },
20
+ { name: "--wb-quote-text", value: "var(--wb-text, #1f2937)", about: "Text" },
21
+ { name: "--wb-quote-muted", value: "var(--wb-muted, #5b6472)", about: "Quieter text: labels, the quantity, the terms" },
22
22
  { name: "--wb-quote-page", value: "#f4f4f6", about: "Background behind the quote" },
23
- { name: "--wb-quote-surface", value: "#ffffff", about: "Background of the quote and the forms" },
24
- { name: "--wb-quote-line", value: "#dcdce2", about: "Borders and rules between lines" },
25
- { name: "--wb-quote-accent", value: "#1b66d6", about: "The Accept button" },
26
- { name: "--wb-quote-on-accent", value: "#ffffff", about: "Text on the Accept button" },
27
- { name: "--wb-quote-good", value: "#1f7a3d", about: "The accepted notice" },
28
- { name: "--wb-quote-ended", value: "#8a5a00", about: "The withdrawn, expired and declined notices" },
29
- { name: "--wb-quote-error", value: "#b3261e", about: "A problem with what was typed" },
30
- { name: "--wb-quote-focus", value: "rgba(27,102,214,.35)", about: "The ring round a control with focus" },
31
- { name: "--wb-quote-radius", value: "8px", about: "Corner rounding" },
23
+ { name: "--wb-quote-surface", value: "var(--wb-surface, #f7f8f8)", about: "Background of the quote and the forms" },
24
+ { name: "--wb-quote-line", value: "var(--wb-line, #d7d8db)", about: "Borders and rules between lines" },
25
+ { name: "--wb-quote-accent", value: "var(--wb-accent, #2563eb)", about: "The Accept button" },
26
+ { name: "--wb-quote-on-accent", value: "var(--wb-on-accent, #ffffff)", about: "Text on the Accept button" },
27
+ { name: "--wb-quote-good", value: "var(--wb-success, #15803d)", about: "The accepted notice" },
28
+ { name: "--wb-quote-ended", value: "var(--wb-warning, #a15c07)", about: "The withdrawn, expired and declined notices" },
29
+ { name: "--wb-quote-error", value: "var(--wb-danger, #b42318)", about: "A problem with what was typed" },
30
+ { name: "--wb-quote-focus", value: "var(--wb-focus, rgba(37,99,235,0.4))", about: "The ring round a control with focus" },
31
+ { name: "--wb-quote-radius", value: "var(--wb-radius, 8px)", about: "Corner rounding" },
32
32
  { name: "--wb-quote-width", value: "44rem", about: "The page's widest" },
33
33
  ],
34
34
  classes: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mccaskie-labs/workbench-quotes",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Quotes and estimates for Workbench apps: a price list prices a form's answers in whole cents with GST, the quote is sent as a link and a branded PDF, and the customer accepts or declines online. An accepted quote hands over to the payments and invoices tool. Runs in the app's own Worker and database, with no Gateway call.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@mccaskie-labs/workbench-country": "^0.2.3",
47
- "@mccaskie-labs/workbench-forms": "^0.10.0"
47
+ "@mccaskie-labs/workbench-forms": "^0.11.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/node": "24.19.2",