@davixlabs/n8n-nodes-davix-h2i 2.2.0 → 2.3.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.
Files changed (44) hide show
  1. package/README.md +4 -2
  2. package/dist/core/config.d.ts +1 -1
  3. package/dist/core/config.js +1 -1
  4. package/dist/core/errors.js +13 -2
  5. package/dist/core/fields.js +44 -6
  6. package/dist/core/forms/binary.d.ts +5 -0
  7. package/dist/core/forms/binary.js +60 -0
  8. package/dist/core/forms/index.d.ts +1 -0
  9. package/dist/core/forms/index.js +4 -1
  10. package/dist/core/forms/props.js +4 -1
  11. package/dist/core/forms/read.js +5 -0
  12. package/dist/core/help.js +11 -0
  13. package/dist/core/hidden.js +2 -0
  14. package/dist/core/params.js +18 -1
  15. package/dist/core/primary.js +3 -0
  16. package/dist/core/results.js +1 -1
  17. package/dist/core/studio.d.ts +16 -0
  18. package/dist/core/studio.js +55 -0
  19. package/dist/nodes/DavixH2I.node.js +5 -7
  20. package/dist/nodes/resources/ai-content/index.js +8 -0
  21. package/dist/nodes/resources/ai-documents/index.js +18 -0
  22. package/dist/nodes/resources/ai-extraction/index.js +5 -0
  23. package/dist/nodes/resources/ai-generation/index.js +5 -0
  24. package/dist/nodes/resources/ai-ocr/index.js +2 -0
  25. package/dist/nodes/resources/ai-vision/index.js +2 -0
  26. package/dist/nodes/resources/data/index.js +21 -0
  27. package/dist/nodes/resources/documents/index.js +39 -0
  28. package/dist/nodes/resources/images/index.js +34 -0
  29. package/dist/nodes/resources/pdfs/index.js +23 -0
  30. package/dist/nodes/resources/render/index.js +16 -0
  31. package/dist/nodes/resources/usage/index.js +2 -1
  32. package/dist/vendor/davix-h2i-sdk/LICENSE +10 -0
  33. package/dist/vendor/davix-h2i-sdk/index.d.ts +16775 -4369
  34. package/dist/vendor/davix-h2i-sdk/package.json +3 -2
  35. package/dist/vendor/davix-h2i-sdk/src/generated/api.js +177 -0
  36. package/dist/vendor/davix-h2i-sdk/src/generated/contract.json +1 -1
  37. package/dist/vendor/davix-h2i-sdk/src/generated/enums.js +1938 -66
  38. package/dist/vendor/davix-h2i-sdk/src/generated/error-codes.js +4 -0
  39. package/dist/vendor/studio-specs/colors.js +78 -0
  40. package/dist/vendor/studio-specs/field-examples.js +406 -0
  41. package/dist/vendor/studio-specs/field-placeholders.js +43 -0
  42. package/dist/vendor/studio-specs/field-specs.js +284 -14
  43. package/dist/vendor/studio-specs/input-choice.js +49 -0
  44. package/package.json +1 -1
@@ -81,6 +81,10 @@ const ErrorCodes = Object.freeze({
81
81
  ROTATE_FAILED: "rotate_failed",
82
82
  SERVER_BUSY: "server_busy",
83
83
  STORAGE_FULL: "storage_full",
84
+ SUBSCRIPTION_CHARGEBACK: "subscription_chargeback",
85
+ SUBSCRIPTION_DISABLED: "subscription_disabled",
86
+ SUBSCRIPTION_PAUSED: "subscription_paused",
87
+ SUBSCRIPTION_REFUNDED: "subscription_refunded",
84
88
  TIMEOUT: "timeout",
85
89
  TOO_MANY_CHATS: "too_many_chats",
86
90
  TOO_MANY_FILES: "too_many_files",
@@ -0,0 +1,78 @@
1
+ const window = {};
2
+ /* StudioColors -- which parameters are colours.
3
+ *
4
+ * One list for the whole Studio, so every colour setting of every tool looks and works the same: in Advanced a round swatch (the colour in use) with a box for the
5
+ * code and the picker behind the swatch; in Simple a row of ready-made colours with "Custom" last, which opens the same picker. A parameter is a colour when it
6
+ * is text (not a list of choices) and its name says so ("... colour", "... background", fill, stroke, tint, accent, ink ...), or it is on the per-tool list below
7
+ * for the few that are named by what they do ("from" and "to" of Replace Colour).
8
+ * No DOM here: plain data and small functions, tested in Node.
9
+ */
10
+ (function (global) {
11
+ 'use strict';
12
+ const NAME = /colou?r\d*$|_?(background|backdrop)\d*$|^(bg|fill|stroke|tint|accent|ink|canvas|frame|duotoneShadow|duotoneHighlight)$/i;
13
+ const BY_OP = { 'images.replace-color': ['from', 'to'], 'images.filters': ['paper'], 'images.beautify': ['canvas'], 'images.mockup': ['frame'] };
14
+ // the ready-made colours of the Simple tab: [name, hex]; the names are also what a tool accepts in words
15
+ const PALETTE = [['Black', '#000000'], ['White', '#ffffff'], ['Red', '#e53935'], ['Orange', '#fb8c00'], ['Yellow', '#fdd835'], ['Green', '#43a047'], ['Blue', '#1e88e5'], ['Purple', '#8e24aa'], ['Pink', '#ec407a'], ['Grey', '#757575']];
16
+
17
+ /** Is this parameter a colour? `def` is the contract's parameter (may be null when only a name is known). */
18
+ function is(opId, name, def) {
19
+ if (opId === undefined) opId = global.StudioColors && global.StudioColors.current; // (the form says which tool it is drawing once, with setOperation)
20
+ if (def) {
21
+ if (def.type && def.type !== 'string') return false;
22
+ if (def.enum && def.enum.length) return false;
23
+ if (def.format === 'hex-color' || def.format === 'color') return true;
24
+ }
25
+ return NAME.test(String(name || '')) || ((BY_OP[opId] || []).includes(name));
26
+ }
27
+ /** Which ready-made colour (index) a value is, or -1: by hex, or by its name (blue, black ...). */
28
+ function paletteIndex(value) {
29
+ const v = String(value == null ? '' : value).trim().toLowerCase();
30
+ if (!v) return -1;
31
+ return PALETTE.findIndex(([n, h]) => h === v || n.toLowerCase() === v || (v.length === 4 && /^#[0-9a-f]{3}$/.test(v) && h === '#' + v[1] + v[1] + v[2] + v[2] + v[3] + v[3]));
32
+ }
33
+
34
+ // ---- the ready-made colours of the Simple tab: a short list chosen for what the setting does; the FIRST one is what the tool uses when nothing is chosen ----
35
+ const K = (n, v, col) => ({ n, v, c: col || v });
36
+ const BLACK = K('Black', '#000000'), WHITE = K('White', '#ffffff'), RED = K('Red', '#e53935'), BLUE = K('Blue', '#1e88e5'), GREEN = K('Green', '#43a047'), GREY = K('Grey', '#757575'), ORANGE = K('Orange', '#fb8c00'), PURPLE = K('Purple', '#8e24aa'), PINK = K('Pink', '#ec407a');
37
+ const TEXT = [BLACK, WHITE, K('Dark grey', '#333333'), BLUE, RED, GREEN];
38
+ const ACCENT = [PINK, BLUE, GREEN, ORANGE, PURPLE, BLACK];
39
+ const BACKDROP = [WHITE, BLACK, K('Light grey', '#f3f4f6'), K('Dark', '#111827'), K('Soft blue', '#e0f2fe'), K('Cream', '#fdfcf6')];
40
+ const FILL = [BLACK, WHITE, GREY, RED, BLUE];
41
+ const ANY = [BLACK, WHITE, RED, BLUE, GREEN, GREY];
42
+ const KEYWORD = n => ({ n, v: n.toLowerCase(), keyword: true });
43
+ // by tool and setting; the order is the order shown
44
+ const BY_PARAM = {
45
+ 'render.handwriting.ink': { list: [K('Blue', 'blue', '#1d4ed8'), K('Black', 'black', '#111111'), K('Red', 'red', '#dc2626'), K('Green', 'green', '#15803d'), K('Pencil', 'pencil', '#555b66')] },
46
+ 'render.handwriting.paper_color': { list: [K('Cream', '#fdfcf6'), WHITE, K('Yellow', '#fff6bf'), K('Soft blue', '#eaf2ff'), K('Grey', '#eeeeee')] },
47
+ 'render.handwriting.line_color': { list: [K('Light blue', '#b9c6e6'), K('Grey', '#cccccc'), K('Blue', '#7aa2e3'), K('Red', '#e6a1a1'), BLACK] },
48
+ 'images.mockup.frame': { list: [K('Black', 'black', '#111111'), K('Space grey', 'space-gray', '#4b4f56'), K('Silver', 'silver', '#c9ccd1'), K('White', 'white', '#ffffff')] },
49
+ 'render.math.background': { list: [WHITE, K('Dark', '#111827')], extras: [{ n: 'Transparent', v: 'transparent', clear: true }] },
50
+ 'images.remove-background.background_color': { first: [{ n: 'Auto', v: 'auto', keyword: true, label: 'Detect it' }], list: [WHITE, BLACK, K('Green screen', '#00ff00')] },
51
+ };
52
+ // the choices of a hand-made Simple control that are really colours (their words are kept: a keyword is a cell with its label)
53
+ const CHOICE_COLORS = new Set(['render.handwriting.ink', 'images.mockup.frame', 'render.math.background', 'images.remove-background.background_color']);
54
+ function presetsFor(opId, name, def) {
55
+ const exact = BY_PARAM[opId + '.' + name];
56
+ let out;
57
+ if (exact) out = { first: exact.first || [], list: exact.list.slice(), extras: exact.extras || [] };
58
+ else {
59
+ let list = ANY;
60
+ if (/text_?colou?r$|^label_?colou?r$|caption_?colou?r$|header_text|bar_text|link_?colou?r/i.test(name)) list = TEXT;
61
+ else if (/background|backdrop|canvas|paper|zebra|gap_?colou?r|^bg$/i.test(name)) list = BACKDROP;
62
+ else if (/^(fill|fill_?colou?r|outer_?colou?r)$/i.test(name)) list = FILL;
63
+ else if (/accent|ring|stroke|border|frame|dot|eye|bar_?colou?r|highlight|header_?colou?r|tint|diff|theme|colou?r2$|^colou?r$/i.test(name)) list = /^colou?r$|^tint$/i.test(name) ? ANY : ACCENT;
64
+ out = { first: [], list: list.slice(), extras: [] };
65
+ if (def && /transparent/i.test(String(def.description || '') + String(def.default || ''))) out.extras.push({ n: 'Transparent', v: 'transparent', clear: true });
66
+ }
67
+ // the tool's own default leads (it is what is used when nothing is chosen): the matching preset moves first, or the default joins as the first colour
68
+ const d = def && def.default !== undefined && def.default !== null && def.default !== '' ? String(def.default) : '';
69
+ if (d && !exact && !/^(transparent|none|auto)$/i.test(d)) {
70
+ const at = out.list.findIndex(p => String(p.v).toLowerCase() === d.toLowerCase());
71
+ if (at > 0) out.list.unshift(out.list.splice(at, 1)[0]);
72
+ else if (at < 0) out.list.unshift(K('Default', d));
73
+ }
74
+ return out;
75
+ }
76
+ global.StudioColors = { current: null, is, presetsFor, CHOICE_COLORS, paletteIndex, PALETTE, NAME, BY_OP };
77
+ })(window);
78
+ module.exports = window.StudioColors;
@@ -0,0 +1,406 @@
1
+ /* StudioExamples -- the examples (placeholders) of the forms that are written by hand (an invoice, an e-invoice, header and footer text, areas to blur ...).
2
+ * Those forms have no properties in the contract, so the examples live here: "<parameter>.<path>". Example data (names, codes, amounts) is not translated,
3
+ * which is why this file is not part of the sentence catalog (scripts/i18n-catalog.js skips it). Forms built from the contract take theirs from the contract
4
+ * (src/contract/placeholders.js). */
5
+ (function (global) {
6
+ 'use strict';
7
+ const NL = String.fromCharCode(10);
8
+ const partyPh = n => ({ name: n.name, trade_name: n.trade, address: n.street + NL + n.city, email: n.email, phone: '+44 20 7946 0958', tax_id: n.vat, website: n.site, logo: 'data:image/png;base64,iVBORw0KGgo…',
9
+ street: n.street, address_line2: 'Floor 2', city: n.city, postal_code: n.zip, region: n.region, country: n.country, vat_id: n.vat, registration_id: '12345678', endpoint: n.email, endpoint_scheme: 'EM',
10
+ contact_name: 'Ada Lovelace', contact_phone: '+44 20 7946 0958', contact_email: n.email });
11
+ const SELLER = { name: 'Acme Ltd', trade: 'Acme', street: '1 High Street', city: 'London', zip: 'SW1A 1AA', region: 'England', country: 'GB', vat: 'GB123456789', email: 'billing@acme.example', site: 'https://acme.example' };
12
+ const BUYER = { name: 'Globex GmbH', trade: 'Globex', street: '5 Hauptstrasse', city: 'Berlin', zip: '10115', region: 'Berlin', country: 'DE', vat: 'DE811234567', email: 'ap@globex.example', site: 'https://globex.example' };
13
+ const WPH = { "points.lat": "48.8584", "points.lon": "2.2945", "resume.name": "Ada Lovelace", "resume.title": "Software engineer", "resume.summary": "Engineer with ten years of experience building reliable systems.", "resume.contact.email": "ada@example.com", "resume.contact.phone": "+44 20 7946 0958", "resume.contact.location": "London, United Kingdom", "resume.contact.website": "https://example.com", "resume.contact.linkedin": "https://linkedin.com/in/ada", "resume.contact.github": "https://github.com/ada", "resume.experience.role": "Lead engineer", "resume.experience.company": "Acme Ltd", "resume.experience.location": "London, United Kingdom", "resume.experience.start": "2020-03", "resume.experience.end": "present", "resume.experience.description": "Led a team of five building the payments platform.", "resume.experience.bullets": "Built a compiler", "resume.education.school": "University of London", "resume.education.degree": "BSc", "resume.education.field": "Mathematics", "resume.education.start": "2012", "resume.education.end": "2015", "resume.education.details": "First class honours", "resume.skills.category": "Languages", "resume.skills.items": "Python", "resume.projects.name": "Open-source compiler", "resume.projects.link": "https://github.com/ada/compiler", "resume.projects.description": "A small compiler written for teaching.", "resume.projects.bullets": "Used in two university courses", "resume.languages.name": "English", "resume.languages.level": "Native", "resume.certifications.name": "AWS Solutions Architect", "resume.certifications.issuer": "Amazon Web Services", "resume.certifications.year": "2022", "resume.awards": "Engineer of the year 2023", "resume.interests": "Chess", "resume.custom.title": "Volunteering", "resume.custom.items": "Mentor at a coding club",
14
+
15
+ 'invoice.number': 'INV-2026-001', 'invoice.date': '2026-11-16', 'invoice.due_date': '2026-12-16', 'invoice.currency': 'EUR', 'invoice.reference': 'PO-4711',
16
+ 'invoice.buyer_reference': '04011000-12345-34', 'invoice.order_reference': 'PO-4711', 'invoice.contract_reference': 'CT-2026-07', 'invoice.project_reference': 'PRJ-12',
17
+ 'invoice.items.description': 'Consulting', 'invoice.items.detail': 'March 2026', 'invoice.items.quantity': '10', 'invoice.items.unit': 'hour', 'invoice.items.unit_code': 'HUR',
18
+ 'invoice.items.unit_price': '95', 'invoice.items.tax_rate': '20', 'invoice.items.tax_category': 'S', 'invoice.items.exemption_reason': 'Reverse charge', 'invoice.items.discount': '0',
19
+ 'invoice.items.item_id': 'SKU-100', 'invoice.items.buyer_item_id': 'B-77', 'invoice.items.note': 'Includes travel',
20
+ 'invoice.tax_rate': '20', 'invoice.discount_percent': '5', 'invoice.discount_amount': '10', 'invoice.shipping': '12.50', 'invoice.amount_paid': '0', 'invoice.rounding': '0.01',
21
+ 'invoice.payment': 'IBAN DE89 3704 0044 0532 0130 00', 'invoice.terms': 'Payment due within 30 days', 'invoice.notes': 'Thank you for your business',
22
+ 'invoice.delivery_date': '2026-11-15', 'invoice.tax_point_date': '2026-11-15', 'invoice.tax_exemption_reason': 'Reverse charge',
23
+ 'invoice.payment.means_code': '58', 'invoice.payment.iban': 'DE89370400440532013000', 'invoice.payment.bic': 'COBADEFFXXX', 'invoice.payment.account_name': 'Acme Ltd',
24
+ 'invoice.payment.bank_name': 'Example Bank', 'invoice.payment.reference': 'INV-2026-001', 'invoice.payment.terms': 'Net 30 days',
25
+ 'invoice.allowances.amount': '10', 'invoice.allowances.reason': 'Volume discount', 'invoice.allowances.tax_category': 'S', 'invoice.allowances.tax_rate': '20',
26
+ 'invoice.charges.amount': '12.50', 'invoice.charges.reason': 'Shipping', 'invoice.charges.tax_category': 'S', 'invoice.charges.tax_rate': '20',
27
+ 'invoice.period.start': '2026-03-01', 'invoice.period.end': '2026-03-31', 'invoice.notes.0': 'Thank you for your business',
28
+ 'header.left': 'Acme Ltd', 'header.center': '{title}', 'header.right': '{date}', 'footer.left': 'Confidential', 'footer.center': 'Page {n} of {total}', 'footer.right': 'Acme Ltd',
29
+ 'region.x': '0', 'region.y': '0', 'region.width': '200', 'region.height': '100',
30
+ 'regions.x': '40', 'regions.y': '30', 'regions.width': '120', 'regions.height': '80', 'regions.strength': '20',
31
+ 'aggregations.column': 'amount', 'aggregations.as': 'total_amount', 'rules.column': 'email', 'rules.text': '***', 'rules.keep_last': '4', 'rules.step': '10', 'columns.name': 'full_name',
32
+ 'queries': '$..title', 'sources': '[{"type": "article", "title": "A study of examples", "authors": ["Lovelace, Ada"], "year": 2026}]',
33
+ };
34
+ for (const [who, n] of [['seller', SELLER], ['buyer', BUYER]]) for (const [k, v] of Object.entries(partyPh(n))) WPH['invoice.' + who + '.' + k] = v;
35
+ // the "?" hints of the hand-made forms (the contract has no properties for them): "<parameter>.<path>"
36
+ const WHINT = {
37
+ "resume": "Your details. Only the name is required; everything else is optional and left out of the resume when empty.",
38
+ "resume.name": "Your full name, shown at the top.",
39
+ "resume.title": "The job title you want to be known by, shown under your name.",
40
+ "resume.summary": "Two or three sentences about you: who you are and what you do best.",
41
+ "resume.contact": "How to reach you.",
42
+ "resume.contact.email": "Your e-mail address.",
43
+ "resume.contact.phone": "Your phone number, with the country code.",
44
+ "resume.contact.location": "Where you live or work, for example city and country.",
45
+ "resume.contact.website": "The address of your own web page.",
46
+ "resume.contact.linkedin": "The address of your LinkedIn page.",
47
+ "resume.contact.github": "The address of your GitHub page.",
48
+ "resume.experience": "Your jobs, newest first. One row for each job.",
49
+ "resume.experience.role": "Your job title in this job.",
50
+ "resume.experience.company": "The name of the employer.",
51
+ "resume.experience.location": "Where the job was, for example city and country.",
52
+ "resume.experience.start": "When you started: a year (2020) or a year and month (2020-03).",
53
+ "resume.experience.end": "When you left: a year, a year and month, or the word present.",
54
+ "resume.experience.current": "Switch on if you still work here. The end date then shows as present.",
55
+ "resume.experience.description": "A short text about the job.",
56
+ "resume.experience.bullets": "The main things you did or achieved. One per row.",
57
+ "resume.education": "Your schools and studies, newest first. One row for each.",
58
+ "resume.education.school": "The name of the school or university.",
59
+ "resume.education.degree": "The degree or certificate, for example BSc or MBA.",
60
+ "resume.education.field": "What you studied.",
61
+ "resume.education.start": "When you started: a year or a year and month.",
62
+ "resume.education.end": "When you finished: a year, a year and month, or the word present.",
63
+ "resume.education.details": "Anything else worth mentioning, such as grades or a thesis.",
64
+ "resume.skills": "Your skills in groups, for example Languages or Tools. One row for each group.",
65
+ "resume.skills.category": "The name of the group.",
66
+ "resume.skills.items": "The skills in this group. One per row.",
67
+ "resume.projects": "Projects you want to show. One row for each.",
68
+ "resume.projects.name": "The name of the project.",
69
+ "resume.projects.link": "The web address of the project.",
70
+ "resume.projects.description": "A short text about the project.",
71
+ "resume.projects.bullets": "The main points about the project. One per row.",
72
+ "resume.languages": "The languages you speak. One row for each.",
73
+ "resume.languages.name": "The language, for example English.",
74
+ "resume.languages.level": "How well you speak it, for example native or fluent.",
75
+ "resume.certifications": "Certificates and licences. One row for each.",
76
+ "resume.certifications.name": "The name of the certificate.",
77
+ "resume.certifications.issuer": "Who gave it.",
78
+ "resume.certifications.year": "The year you got it.",
79
+ "resume.awards": "Prizes and honours. One per row.",
80
+ "resume.interests": "Your interests, shown at the end. One per row.",
81
+ "resume.custom": "Sections of your own, for example Volunteering. One row for each section.",
82
+ "resume.custom.title": "The heading of the section.",
83
+ "resume.custom.items": "The lines of the section. One per row.",
84
+ "generation.top_p": "Nucleus sampling, 0 to 1. The model only picks from the most likely words that together make up this share. Lower is safer and more predictable; leave empty to use the model's default.",
85
+ "generation.top_k": "Only the K most likely next words are considered. Lower is more predictable. Leave empty to use the model's default (not every model supports it).",
86
+ "generation.max_tokens": "The longest answer the model may write, counted in tokens (a token is about 4 letters). The answer is cut when it reaches this size; the plan's own cap always applies.",
87
+ "generation.seed": "A whole number that makes the answer repeatable: the same request with the same seed gives the same answer (as far as the model allows). Leave empty for a different answer each time.",
88
+ "generation.frequency_penalty": "From -2 to 2. A positive number makes the model repeat the same words less often; a negative one allows more repeats. 0 means no change.",
89
+ "generation.presence_penalty": "From -2 to 2. A positive number pushes the model to bring up new topics instead of staying on the same ones. 0 means no change.",
90
+ "generation.stop": "Words or marks where the model must stop writing. One per line. The stop text itself is not part of the answer.",
91
+ "messages.role": "Who says this message: system (the instructions), user (the person) or assistant (an earlier answer of the model).",
92
+ "messages.content": "The text of this message.",
93
+ "invoice": "The invoice: who sells, who buys, the lines, the totals and the payment details.",
94
+ "invoice.number": "The invoice number. It must be unique for the seller, for example INV-2026-001.",
95
+ "invoice.date": "The issue date, written year-month-day, for example 2026-11-16.",
96
+ "invoice.due_date": "The date the payment is due, written year-month-day. Leave empty when there is none.",
97
+ "invoice.currency": "The currency as a three-letter code, for example EUR, USD or GBP.",
98
+ "invoice.reference": "Your own reference for this invoice or the order it belongs to, shown on the invoice.",
99
+ "invoice.buyer_reference": "The reference the buyer asked you to use so the invoice reaches the right person. German public buyers give a routing code (Leitweg-ID) for it.",
100
+ "invoice.order_reference": "The number of the buyer's purchase order.",
101
+ "invoice.contract_reference": "The number of the contract this invoice belongs to.",
102
+ "invoice.project_reference": "The project number this invoice belongs to.",
103
+ "invoice.seller": "The company or person that sends the invoice and receives the money.",
104
+ "invoice.seller.name": "The legal name of the seller.",
105
+ "invoice.seller.trade_name": "The name the seller trades under, if it differs from the legal name.",
106
+ "invoice.seller.address": "The postal address of the seller. One line per row of the address.",
107
+ "invoice.seller.street": "The street and house number of the seller.",
108
+ "invoice.seller.address_line2": "A second address line, for example a floor or a building.",
109
+ "invoice.seller.city": "The city of the seller.",
110
+ "invoice.seller.postal_code": "The postal code of the seller.",
111
+ "invoice.seller.region": "The state, county or region of the seller.",
112
+ "invoice.seller.country": "The country as a two-letter code, for example GB, DE or US.",
113
+ "invoice.seller.email": "The e-mail address of the seller.",
114
+ "invoice.seller.phone": "The phone number of the seller, with the country code.",
115
+ "invoice.seller.tax_id": "The tax number of the seller.",
116
+ "invoice.seller.vat_id": "The VAT number of the seller, starting with the country code, for example GB123456789.",
117
+ "invoice.seller.registration_id": "The company registration number of the seller.",
118
+ "invoice.seller.website": "The web address of the seller.",
119
+ "invoice.seller.logo": "A small logo shown at the top: a picture address, or the picture itself written as data (data:image/png;base64,...).",
120
+ "invoice.seller.endpoint": "The electronic address where the seller can receive documents, usually an e-mail address.",
121
+ "invoice.seller.endpoint_scheme": "The kind of electronic address above as a short code: EM for e-mail, 0088 for a GLN number, 0204 for a German routing code.",
122
+ "invoice.seller.contact_name": "The person at the seller to contact about the invoice.",
123
+ "invoice.seller.contact_phone": "The phone number of that contact.",
124
+ "invoice.seller.contact_email": "The e-mail address of that contact.",
125
+ "invoice.buyer": "The company or person that receives the invoice and pays.",
126
+ "invoice.buyer.name": "The legal name of the buyer.",
127
+ "invoice.buyer.trade_name": "The name the buyer trades under, if it differs from the legal name.",
128
+ "invoice.buyer.address": "The postal address of the buyer. One line per row of the address.",
129
+ "invoice.buyer.street": "The street and house number of the buyer.",
130
+ "invoice.buyer.address_line2": "A second address line, for example a floor or a building.",
131
+ "invoice.buyer.city": "The city of the buyer.",
132
+ "invoice.buyer.postal_code": "The postal code of the buyer.",
133
+ "invoice.buyer.region": "The state, county or region of the buyer.",
134
+ "invoice.buyer.country": "The country as a two-letter code, for example GB, DE or US.",
135
+ "invoice.buyer.email": "The e-mail address of the buyer.",
136
+ "invoice.buyer.phone": "The phone number of the buyer, with the country code.",
137
+ "invoice.buyer.tax_id": "The tax number of the buyer.",
138
+ "invoice.buyer.vat_id": "The VAT number of the buyer, starting with the country code, for example DE811234567.",
139
+ "invoice.buyer.registration_id": "The company registration number of the buyer.",
140
+ "invoice.buyer.website": "The web address of the buyer.",
141
+ "invoice.buyer.logo": "A small logo of the buyer: a picture address, or the picture written as data.",
142
+ "invoice.buyer.endpoint": "The electronic address where the buyer receives documents, usually an e-mail address.",
143
+ "invoice.buyer.endpoint_scheme": "The kind of electronic address above as a short code: EM for e-mail, 0088 for a GLN number, 0204 for a German routing code.",
144
+ "invoice.buyer.contact_name": "The person at the buyer who handles the invoice.",
145
+ "invoice.buyer.contact_phone": "The phone number of that contact.",
146
+ "invoice.buyer.contact_email": "The e-mail address of that contact.",
147
+ "invoice.items": "The lines of the invoice: one row for each product or service.",
148
+ "invoice.items.description": "What is sold, for example Consulting.",
149
+ "invoice.items.detail": "An extra line under the description, for example the month or the project.",
150
+ "invoice.items.quantity": "How many units. A decimal number is fine, for example 7.5 hours.",
151
+ "invoice.items.unit": "The unit written out, for example hour, piece or kg.",
152
+ "invoice.items.unit_code": "The unit as an international code: C62 piece, HUR hour, DAY day, KGM kilogram, MTR metre, LTR litre.",
153
+ "invoice.items.unit_price": "The price of one unit, without tax.",
154
+ "invoice.items.tax_rate": "The tax rate of this line in percent, for example 20.",
155
+ "invoice.items.tax_category": "The kind of tax: S standard rate, Z zero rate, E exempt, AE reverse charge, K supply inside the EU, G export, O outside the tax scope.",
156
+ "invoice.items.exemption_reason": "Why no tax is charged on this line. Needed for the exempt and reverse charge kinds.",
157
+ "invoice.items.discount": "A discount on this line, in percent.",
158
+ "invoice.items.item_id": "Your own product number (SKU) for this line.",
159
+ "invoice.items.buyer_item_id": "The product number the buyer uses for this line.",
160
+ "invoice.items.note": "A short note about this line.",
161
+ "invoice.allowances": "Reductions on the whole invoice, such as a volume discount. One row for each.",
162
+ "invoice.allowances.amount": "The amount taken off, without tax.",
163
+ "invoice.allowances.reason": "Why the amount is taken off, for example Volume discount.",
164
+ "invoice.allowances.tax_category": "The kind of tax of this reduction (S standard, Z zero, E exempt, AE reverse charge ...).",
165
+ "invoice.allowances.tax_rate": "The tax rate of this reduction in percent.",
166
+ "invoice.charges": "Extra costs on the whole invoice, such as shipping. One row for each.",
167
+ "invoice.charges.amount": "The amount added, without tax.",
168
+ "invoice.charges.reason": "What the extra cost is for, for example Shipping.",
169
+ "invoice.charges.tax_category": "The kind of tax of this cost (S standard, Z zero, E exempt, AE reverse charge ...).",
170
+ "invoice.charges.tax_rate": "The tax rate of this cost in percent.",
171
+ "invoice.payment": "How the buyer pays: the bank details and the terms.",
172
+ "invoice.payment.means_code": "How the payment is made, as a code: 30 bank transfer, 58 SEPA transfer, 48 bank card, 49 direct debit, 10 cash.",
173
+ "invoice.payment.iban": "The IBAN of the account that receives the money, without spaces.",
174
+ "invoice.payment.bic": "The BIC (SWIFT code) of the bank.",
175
+ "invoice.payment.account_name": "The name of the account holder.",
176
+ "invoice.payment.bank_name": "The name of the bank.",
177
+ "invoice.payment.reference": "The text the buyer must write on the transfer so you can match it, usually the invoice number.",
178
+ "invoice.payment.terms": "The payment terms in words, for example Net 30 days.",
179
+ "invoice.period": "The period the invoice covers, for example a month of work.",
180
+ "invoice.period.start": "The first day of the period, written year-month-day.",
181
+ "invoice.period.end": "The last day of the period, written year-month-day.",
182
+ "invoice.delivery_date": "The day the goods or services were delivered, written year-month-day.",
183
+ "invoice.tax_point_date": "The day the tax becomes due, written year-month-day. Leave empty when it is the invoice date.",
184
+ "invoice.tax_exemption_reason": "Why the whole invoice carries no tax, for example Reverse charge.",
185
+ "invoice.tax_rate": "One tax rate in percent for every line that has none of its own.",
186
+ "invoice.tax_included": "Switch on when the prices already include tax.",
187
+ "invoice.discount_percent": "A discount on the whole invoice, in percent.",
188
+ "invoice.discount_amount": "A discount on the whole invoice, as an amount.",
189
+ "invoice.shipping": "The shipping cost, without tax.",
190
+ "invoice.amount_paid": "What the buyer has already paid. It is taken off the amount due.",
191
+ "invoice.rounding": "A small amount that rounds the total, for example 0.01 or -0.02.",
192
+ "invoice.terms": "The terms of the sale, shown under the totals.",
193
+ "invoice.notes": "A note shown at the bottom of the invoice, for example Thank you for your business.",
194
+ "invoice.payment.0": "The payment details as text.",
195
+ "header.left": "The text at the left of the header. You can use {n} for the page number, {total} for the number of pages, {date} for today and {title} for the document title.",
196
+ "header.center": "The text in the middle of the header. You can use {n}, {total}, {date} and {title}.",
197
+ "header.right": "The text at the right of the header. You can use {n}, {total}, {date} and {title}.",
198
+ "footer.left": "The text at the left of the footer. You can use {n} for the page number, {total} for the number of pages, {date} for today and {title} for the document title.",
199
+ "footer.center": "The text in the middle of the footer. You can use {n}, {total}, {date} and {title}.",
200
+ "footer.right": "The text at the right of the footer. You can use {n}, {total}, {date} and {title}.",
201
+ "aggregations": "What to calculate for each group: one row for each result column.",
202
+ "aggregations.function": "The calculation: count, sum, avg (average), min, max, median, count_distinct, first, last or list.",
203
+ "aggregations.column": "The column the calculation uses. Leave empty for count.",
204
+ "aggregations.as": "The name of the new result column. Leave empty to let the tool name it.",
205
+ "rules": "The changes to make: one row for each rule. They are applied in the order shown.",
206
+ "rules.column": "The column the rule applies to.",
207
+ "rules.method": "How the value is changed: redact, mask, hash, pseudonym, email, blank, drop, round, year or shuffle.",
208
+ "rules.text": "The text that replaces the value (for redact).",
209
+ "rules.keep_last": "How many characters at the end stay visible (for mask).",
210
+ "rules.step": "The step to round to, for example 10 (for round).",
211
+ "rules.find": "The text to look for.",
212
+ "rules.replace": "The text that replaces it. Leave empty to delete what was found.",
213
+ "columns": "The columns of the table that is made: one row for each column.",
214
+ "columns.name": "The name of the column.",
215
+ "columns.type": "What kind of value is made: a name, an e-mail address, a date, a number and so on.",
216
+ "columns.min": "The lowest value (for number columns).",
217
+ "columns.max": "The highest value (for number columns).",
218
+ "highlight_rules": "Rules that colour cells: one row for each rule.",
219
+ "highlight_rules.column": "The column the rule looks at.",
220
+ "highlight_rules.operator": "How the cell is compared with the value: >, >=, <, <=, =, !=, between or contains.",
221
+ "highlight_rules.value": "The value the cell is compared with.",
222
+ "highlight_rules.value2": "A second value, only for the between operator.",
223
+ "bubbles": "The speech bubbles of the comic: one row for each bubble.",
224
+ "bubbles.panel": "The number of the panel the bubble goes in, counted from 1.",
225
+ "bubbles.text": "What the bubble says.",
226
+ "bubbles.x": "How far from the left of the panel the centre of the bubble is, in percent.",
227
+ "bubbles.y": "How far from the top of the panel the centre of the bubble is, in percent.",
228
+ "bubbles.width": "How wide the bubble is, in percent of the panel.",
229
+ "bubbles.shape": "The shape of the bubble: speech, thought, shout or box.",
230
+ "bubbles.tail": "Where the tail of the bubble points: down-left, down-right, up-left, up-right or none.",
231
+ "region": "The part of the picture to compare. Leave empty to compare the whole picture.",
232
+ "region.x": "How far from the left edge the part starts, in pixels.",
233
+ "region.y": "How far from the top edge the part starts, in pixels.",
234
+ "region.width": "The width of the part, in pixels.",
235
+ "region.height": "The height of the part, in pixels.",
236
+ "ignore_regions": "Areas that are left out of the comparison, for example a clock or an advert. One row for each.",
237
+ "ignore_regions.x": "How far from the left edge the area starts, in pixels.",
238
+ "ignore_regions.y": "How far from the top edge the area starts, in pixels.",
239
+ "ignore_regions.width": "The width of the area, in pixels.",
240
+ "ignore_regions.height": "The height of the area, in pixels.",
241
+ "imageOptions": "Settings for one picture: the first row is for the first picture, the second row for the second one, and so on.",
242
+ "imageOptions.pageSize": "The page size for this picture.",
243
+ "imageOptions.orientation": "Portrait (tall) or landscape (wide) page for this picture.",
244
+ "imageOptions.embedFormat": "How the picture is stored in the PDF: as JPEG (smaller) or PNG (sharper).",
245
+ "imageOptions.embedQuality": "The JPEG quality, 1 to 100. Higher is sharper and bigger.",
246
+ "imageOptions.margin": "The white space around the picture on the page, in points.",
247
+ "sharedPreprocessing": "Changes made to the picture once, before every size or format is made.",
248
+ "sharedPreprocessing.crop": "Cut out a part of the picture first.",
249
+ "sharedPreprocessing.crop.x": "How far from the left edge the cut starts, in pixels.",
250
+ "sharedPreprocessing.crop.y": "How far from the top edge the cut starts, in pixels.",
251
+ "sharedPreprocessing.crop.width": "The width of the cut, in pixels.",
252
+ "sharedPreprocessing.crop.height": "The height of the cut, in pixels.",
253
+ "sharedPreprocessing.rotate": "Turn the picture first.",
254
+ "sharedPreprocessing.rotate.angle": "The angle in degrees, for example 90 to turn a quarter clockwise.",
255
+ "sharedPreprocessing.flip": "Mirror the picture first.",
256
+ "sharedPreprocessing.flip.axis": "Which way to mirror it: horizontal or vertical.",
257
+ "bookmarks": "The bookmarks (the table of contents) of the PDF: one row for each entry.",
258
+ "bookmarks.title": "The text of the bookmark.",
259
+ "bookmarks.page": "The page the bookmark opens, counted from 1.",
260
+ "bookmarks.children": "Smaller bookmarks that sit under this one.",
261
+ "bookmarks.children.title": "The text of the smaller bookmark.",
262
+ "bookmarks.children.page": "The page the smaller bookmark opens, counted from 1.",
263
+ "bookmarks.children.children": "Even smaller bookmarks under this one.",
264
+ "bookmarks.children.children.title": "The text of the bookmark.",
265
+ "bookmarks.children.children.page": "The page it opens, counted from 1.",
266
+ "labels.from": "The first page that gets this label, counted from 1.",
267
+ "events": "The events of the calendar: one row for each.",
268
+ "events.date": "The day of the event, written year-month-day.",
269
+ "events.title": "The name of the event.",
270
+ "events.end": "The last day of the event, written year-month-day. Leave empty for a one-day event.",
271
+ "cookies": "Cookies to send with the page, for example to look like a signed-in visitor. A cookie needs a domain or an address.",
272
+ "cookies.name": "The name of the cookie.",
273
+ "cookies.value": "The value of the cookie.",
274
+ "cookies.sameSite": "When the browser sends the cookie to other sites: Strict, Lax or None.",
275
+ "cookies.path": "The path the cookie belongs to. / means the whole site.",
276
+ "cookies.secure": "Switch on to send the cookie only over a secure (https) connection.",
277
+ "cookies.httpOnly": "Switch on to hide the cookie from the scripts on the page.",
278
+ "fonts": "Fonts to load for the page: one row for each.",
279
+ "fonts.family": "The name of the font family, as the page's styles use it.",
280
+ "fonts.weight": "How bold the font is, 100 to 900 (400 is normal, 700 is bold).",
281
+ "fonts.style": "normal or italic.",
282
+ "points": "The places on the map: one row for each.",
283
+ "points.lat": "The latitude of the place, from -90 to 90.",
284
+ "points.lon": "The longitude of the place, from -180 to 180.",
285
+ "points.label": "The name shown next to the place.",
286
+ "points.value": "A number that sets the size of the marker, for example a population.",
287
+ "points.group": "A group name. Places in the same group get the same colour.",
288
+ "items.label": "The name of the task or event.",
289
+ "items.start": "The first day, written year-month-day.",
290
+ "items.end": "The last day, written year-month-day. Leave empty for a single day or a milestone.",
291
+ "items.group": "A group name. Tasks in the same group are drawn together.",
292
+ "items.progress": "How much is done, from 0 to 100.",
293
+ "items.milestone": "Switch on to draw a single point in time instead of a bar.",
294
+ "items.id": "A short name other tasks can point to.",
295
+ "items.depends_on": "The ids of the tasks that must finish first, separated by commas.",
296
+ "items.note": "A short note shown with the task.",
297
+ "words": "The words of the cloud: one row for each word.",
298
+ "words.text": "The word or short phrase.",
299
+ "words.weight": "How important the word is. A bigger number makes it bigger in the cloud.",
300
+ "operations.select.columns": "The columns to keep. All other columns are removed.",
301
+ "operations.drop.columns": "The columns to remove.",
302
+ "operations.dedupe.columns": "The columns that must be the same for two rows to count as duplicates. Leave empty to compare the whole row.",
303
+ "operations.rename.map": "The new name for each column: the old name on the left, the new name on the right.",
304
+ "operations.filter.where": "The rows to keep: those that match these conditions.",
305
+ "operations.sort.by": "What to sort by, in order of importance.",
306
+ "operations.sort.by.column": "The column to sort by.",
307
+ "operations.sort.by.order": "asc for smallest first, desc for largest first.",
308
+ "operations.limit.count": "The number of rows to keep from the top.",
309
+ "operations.offset.count": "The number of rows to skip from the top.",
310
+ "operations.cast.column": "The column to change the kind of value of.",
311
+ "operations.cast.to": "The new kind of value: for example number, text, date or true/false.",
312
+ "operations.set.column": "The column to fill or change. A new name makes a new column.",
313
+ "operations.set.value": "One value that is put in every row.",
314
+ "operations.set.template": "A text with other columns in curly braces, for example {first} {last}.",
315
+ "operations.set.concat": "The columns to join together, in order.",
316
+ "operations.set.separator": "The text put between joined columns.",
317
+ "operations.set.from": "The column to copy or calculate from.",
318
+ "operations.set.fn": "A calculation on that column: upper, lower, trim, string, number, boolean, length, abs, round, floor, ceil or date.",
319
+ "operations.set.digits": "How many decimal places to keep (for round).",
320
+ "operations.set.add": "The columns to add together.",
321
+ "operations.set.multiply": "The columns to multiply together.",
322
+ "operations.crop.x": "How far from the left edge the cut starts, in pixels.",
323
+ "operations.crop.y": "How far from the top edge the cut starts, in pixels.",
324
+ "operations.crop.width": "The width of the cut, in pixels.",
325
+ "operations.crop.height": "The height of the cut, in pixels.",
326
+ "operations.rotate.angle": "The angle in degrees. 90 turns a quarter clockwise, -90 anticlockwise.",
327
+ "operations.flip.axis": "Which way to mirror the picture: horizontal or vertical.",
328
+ "operations.enhance.blur": "How much to blur. Higher is blurrier.",
329
+ "operations.enhance.sharpen": "How much to sharpen. Higher is sharper.",
330
+ "operations.enhance.grayscale": "Switch on for a black and white picture.",
331
+ "operations.enhance.sepia": "Switch on for a warm brown, old-photo look.",
332
+ "operations.enhance.brightness": "1 keeps it as it is; below 1 is darker, above 1 is brighter.",
333
+ "operations.enhance.saturation": "1 keeps it as it is; 0 is grey, above 1 is more vivid.",
334
+ "operations.enhance.contrast": "1 keeps it as it is; above 1 makes lights lighter and darks darker.",
335
+ "operations.enhance.hue": "Turns all colours around the colour wheel, in degrees from -360 to 360.",
336
+ "operations.enhance.gamma": "Changes the middle tones, from 1.0 to 3.0. 1 keeps it as it is; higher lifts the dark and middle tones.",
337
+ "operations.enhance.threshold": "Turns the picture into pure black and white. Pixels brighter than this whole number (0 to 255) become white.",
338
+ "operations.enhance.tint": "A colour that is laid over the picture.",
339
+ "operations.enhance.negate": "Switch on to invert all colours.",
340
+ "operations.enhance.median": "The size of a smoothing filter that removes small spots, a whole number from 1 to 49.",
341
+ "operations.enhance.clahe": "Local contrast: lifts details in dark and bright areas without washing out the picture.",
342
+ "operations.enhance.clahe.width": "The width of the area it works on at a time, in pixels (a whole number, up to 8192).",
343
+ "operations.enhance.clahe.height": "The height of the area it works on at a time, in pixels (a whole number, up to 8192).",
344
+ "operations.enhance.clahe.maxSlope": "How strong the effect is, a whole number from 0 to 100. Higher is stronger.",
345
+ "operations.enhance.exposure": "Makes the picture lighter or darker, in stops from -3 to 3. Each stop doubles or halves the light; 0 keeps it as it is.",
346
+ "operations.background.color": "The colour that fills transparent parts of the picture.",
347
+ "operations.background.blur": "Blurs the background behind the picture. Higher is blurrier.",
348
+ "operations.padding.top": "White space added above the picture, in pixels.",
349
+ "operations.padding.right": "White space added to the right, in pixels.",
350
+ "operations.padding.bottom": "White space added below the picture, in pixels.",
351
+ "operations.padding.left": "White space added to the left, in pixels.",
352
+ "operations.padding.all": "White space added on all four sides, in pixels.",
353
+ "operations.padding.color": "The colour of the added space.",
354
+ "operations.border.width": "The thickness of the border, in pixels.",
355
+ "operations.border.color": "The colour of the border.",
356
+ "operations.border.radius": "How round the corners are, in pixels.",
357
+ "operations.watermark.text": "The text printed on the picture.",
358
+ "operations.watermark.position": "Where the watermark sits, for example center or bottom-right.",
359
+ "operations.watermark.opacity": "How see-through it is: 0 is invisible, 1 is solid.",
360
+ "operations.watermark.margin": "The distance from the edge, in pixels.",
361
+ "operations.watermark.scale": "The size of a watermark picture as a fraction of the base picture.",
362
+ "operations.watermark.fontSize": "The size of the text, in pixels.",
363
+ "operations.watermark.color": "The colour of the text.",
364
+ "operations.watermark.tile": "Switch on to repeat the watermark over the whole picture.",
365
+ "operations.watermark.tileSpacing": "The space between repeated watermarks, in pixels.",
366
+ "operations.trim.trim": "Switch on to cut away the empty border around the picture.",
367
+ "operations.trim.trimThreshold": "How different a pixel must be from the border colour to count as picture, 0 to 255.",
368
+ "operations.colorSpace.value": "The colour system of the result: srgb (the usual one for screens), grayscale or cmyk (for print).",
369
+ "operations.convolve.convolve": "A custom filter: a small grid of numbers that is moved over the picture.",
370
+ "operations.convolve.convolve.width": "The width of the grid: an odd whole number from 3 to 21.",
371
+ "operations.convolve.convolve.height": "The height of the grid: an odd whole number from 3 to 21.",
372
+ "operations.convolve.convolve.kernel": "The numbers of the grid, one per line, row by row. There must be width times height of them.",
373
+ "operations.convolve.convolve.scale": "A number the result is divided by. It cannot be 0. Leave empty to use the sum of the grid.",
374
+ "operations.convolve.convolve.offset": "A number added to the result.",
375
+ "operations.affine.affine": "A custom transform of the picture written as a 2 by 2 matrix.",
376
+ "operations.affine.affine.matrix": "The four numbers of the matrix, one per line (a, b, c, d).",
377
+ "operations.affine.affine.background": "The colour of the new empty areas.",
378
+ "operations.affine.affine.interpolator": "How new pixels are calculated: nearest, bilinear, bicubic, locallyBoundedBicubic, nohalo or vertexSplitQuadraticBasisSpline.",
379
+ "operations.channelExtract.channelExtract": "The one colour channel to keep: red, green, blue or alpha (or 0 to 3).",
380
+ "operations.noise.amount": "How much grain to add, above 0 up to 100.",
381
+ "operations.vignette.intensity": "How dark the corners get, above 0 up to 1.",
382
+ "operations.vignette.color": "The colour of the corners.",
383
+ "operations.pixelate.pixelSize": "The size of the big squares, a whole number from 2 to 500 pixels. Higher is blockier.",
384
+ "operations.posterize.levels": "How many shades each colour keeps, a whole number from 2 to 32. Lower is flatter.",
385
+ "operations.duotone.shadowColor": "The colour used for the dark parts.",
386
+ "operations.duotone.highlightColor": "The colour used for the light parts.",
387
+ "operations.tile.cols": "How many times the picture repeats across. The total of columns times rows has a limit.",
388
+ "operations.tile.rows": "How many times the picture repeats down. The total of columns times rows has a limit.",
389
+ "operations.setViewerPreferences.pageLayout": "How pages are laid out when the PDF opens (for example one page, one column, or two columns).",
390
+ "operations.setViewerPreferences.pageMode": "What shows beside the pages when the PDF opens (for example nothing, the bookmarks, or the page thumbnails).",
391
+ "operations.setViewerPreferences.hideToolbar": "Switch on to hide the toolbar of the PDF viewer.",
392
+ "operations.setViewerPreferences.openToPage": "The page the PDF opens on, counted from 1.",
393
+ "operations.nUp.pagesPerSheet": "How many pages are printed on one sheet.",
394
+ "operations.splitPage.direction": "How each page is cut in two: vertical (left and right halves) or horizontal (top and bottom halves)."
395
+ };
396
+ // boxes of a list item that belong to one kind only: "<tool>.<parameter>" -> the box that names the kind, and per box the kinds it belongs to
397
+ const WWHEN = {
398
+ 'images.composite.layers': { by: 'type', props: { imageIndex: ['image'], scale: ['image'], text: ['text'], fontSize: ['text'], fontFamily: ['text'], fontWeight: ['text'], italic: ['text'], align: ['text'], direction: ['text'], lang: ['text'], letterSpacing: ['text'], lineSpacing: ['text'], color: ['text', 'color'], width: ['color'], height: ['color'], gradient: ['gradient'], stops: ['gradient'], angle: ['gradient'] } },
399
+ 'pdfs.forms.newFields': { by: 'type', props: { options: ['radio', 'dropdown', 'optionList'] } },
400
+ };
401
+ // what one row of a list is called ("Place 1", not "Item 1"): "<tool>.<parameter>"
402
+ const WITEM = { 'render.map.points': 'place', 'render.timeline.items': 'task', 'render.calendar.events': 'event', 'render.designs.fields': 'field', 'images.variants.variants': 'version', 'images.composite.layers': 'layer', 'render.word-cloud.words': 'word' };
403
+ const api = { WPH, NL, WHINT, WWHEN, WITEM };
404
+ global.StudioExamples = api;
405
+ if (typeof module !== 'undefined' && module.exports) module.exports = api;
406
+ })(typeof window !== 'undefined' ? window : globalThis);
@@ -0,0 +1,43 @@
1
+ /* StudioPlaceholders -- the example shown in an empty box of a form, for the boxes that have no example of their own in the contract (src/contract/placeholders.js)
2
+ * or in field-examples.js. Two tables:
3
+ * BY_PATH "<parameter>.<path>" -> example (the same dotted path field-examples.js uses; a list of single values ends in ".0"; "{key}" / "{value}" name the two boxes of a name -> value list)
4
+ * BY_NAME the last name of the path -> example (x, width, opacity, page ... mean the same in every tool)
5
+ * A box that has an example of its own never reaches these tables. tests/unit/studio-fields.test.js fails when a box of any form has no example at all.
6
+ */
7
+ (function (global) {
8
+ 'use strict';
9
+ const BY_NAME = {
10
+ // positions and sizes (PDF points, picture pixels)
11
+ x: '72', y: '72', x1: '72', y1: '72', x2: '300', y2: '72', width: '200', height: '100', top: '10', right: '10', bottom: '10', left: '10', all: '10',
12
+ level: '2', thickness: '1', spacing: '16', angle: '90', page: '1', pages: '1-3', atPage: '1', openToPage: '1', imageIndex: '0', order: '2', points: '10,10 50,50 90,10',
13
+ // looks
14
+ opacity: '0.5', margin: '10', scale: '0.5', fontSize: '24', tileSpacing: '40', radius: '8', blur: '3', sharpen: '1', brightness: '1.2', saturation: '1.2', contrast: '1.1', hue: '30', gamma: '2.2',
15
+ threshold: '128', median: '3', exposure: '0.5', trimThreshold: '10', amount: '20', intensity: '0.5', pixelSize: '8', levels: '4', cols: '3', rows: '3', maxSlope: '3', offset: '0', kernel: '0', matrix: '1',
16
+ quality: '80', targetSizeKB: '200', effort: '4', digits: '2', count: '10',
17
+ // choices written as text
18
+ fit: 'cover', gravity: 'center', position: 'bottom-right', axis: 'horizontal', format: 'webp', colorSpace: 'srgb', chromaSubsampling: '4:2:0', channelExtract: 'red', interpolator: 'bicubic', value: 'Hello',
19
+ // words
20
+ text: 'Confidential', title: 'Chapter 1', url: 'https://example.com', link_url: 'https://example.com/page', alt: 'A team photo', author: 'Ada Lovelace', color: '#ff6600', text_color: '#ffffff', html: '<p>Hello</p>',
21
+ contents: 'Please check this', template: '{first} {last}', separator: ' ', from: 'first_name', column: 'country', concat: 'first_name', add: 'price', multiply: 'quantity', columns: 'country',
22
+ // the AI settings
23
+ temperature: '0.7', top_p: '0.9', top_k: '40', max_tokens: '500', seed: '42', frequency_penalty: '0', presence_penalty: '0', stop: '###',
24
+ // lists of single values
25
+ bullets: 'Led a team of five engineers', items: 'Free shipping', awards: 'Employee of the year', interests: 'Chess', attendees: 'ada@example.com', categories: 'Meeting',
26
+ };
27
+ const BY_PATH = {
28
+ 'points.lat': '48.8584', 'points.lon': '2.2945',
29
+ 'resume.skills.items.0': 'Python', 'resume.projects.bullets.0': 'Built a tool used by 2,000 people', 'resume.custom.items.0': 'Volunteer at the local library',
30
+ 'blocks.links.name': 'LinkedIn', 'blocks.links.url': 'https://linkedin.com/in/ada',
31
+ // name -> value lists
32
+ 'replace_colors{key}': '#ff0000', 'replace_colors{value}': '#0000ff', 'set_attributes{key}': 'circle', 'set_attributes{value}': '{"fill":"red"}',
33
+ 'variables{key}': 'title', 'variables{value}': 'Annual report', 'section_titles{key}': 'experience', 'section_titles{value}': 'Work history',
34
+ 'mapping{key}': 'summary', 'mapping{value}': 'Title', 'headers{key}': 'Authorization', 'headers{value}': 'Bearer abc123',
35
+ 'number_formats{key}': 'price', 'number_formats{value}': '#,##0.00', 'labels{key}': 'Invoice', 'labels{value}': 'Rechnung',
36
+ 'data{key}': 'name', 'data{value}': 'Ada Lovelace', 'set{key}': 'Title', 'set{value}': 'Annual report', 'exif{value}': 'Ada Lovelace',
37
+ 'fields{key}': 'title', 'fields{value}': 'h2.title', 'data.validate-fields.fields{key}': 'email', 'documents.scrape.fields{key}': 'title',
38
+ 'map{key}': 'old_name', 'map{value}': 'new_name',
39
+ };
40
+ const api = { BY_NAME, BY_PATH };
41
+ global.StudioPlaceholders = api;
42
+ if (typeof module !== 'undefined' && module.exports) module.exports = api;
43
+ })(typeof window !== 'undefined' ? window : globalThis);