@pithyjs/pidl-catalog 0.1.0-beta.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/LICENSE +21 -0
- package/dist/specs/atoms/actions/button.pidl.json +289 -0
- package/dist/specs/atoms/actions/icon-group.pidl.json +141 -0
- package/dist/specs/atoms/actions/segmented-control.pidl.json +137 -0
- package/dist/specs/atoms/content/action-tile.pidl.json +135 -0
- package/dist/specs/atoms/content/badge.pidl.json +189 -0
- package/dist/specs/atoms/content/callout.pidl.json +170 -0
- package/dist/specs/atoms/content/code-block.pidl.json +170 -0
- package/dist/specs/atoms/content/heading.pidl.json +175 -0
- package/dist/specs/atoms/content/icon.pidl.json +127 -0
- package/dist/specs/atoms/content/image.pidl.json +227 -0
- package/dist/specs/atoms/content/prose.pidl.json +183 -0
- package/dist/specs/atoms/content/stat.pidl.json +158 -0
- package/dist/specs/atoms/content/tabs.pidl.json +207 -0
- package/dist/specs/atoms/content/text.pidl.json +212 -0
- package/dist/specs/atoms/content/tile.pidl.json +156 -0
- package/dist/specs/atoms/data/donut.pidl.json +352 -0
- package/dist/specs/atoms/data/gauge.pidl.json +274 -0
- package/dist/specs/atoms/forms/checkbox-group.pidl.json +170 -0
- package/dist/specs/atoms/forms/checkbox.pidl.json +323 -0
- package/dist/specs/atoms/forms/file-picker.pidl.json +161 -0
- package/dist/specs/atoms/forms/form-field.pidl.json +106 -0
- package/dist/specs/atoms/forms/input.pidl.json +466 -0
- package/dist/specs/atoms/forms/radio-group.pidl.json +174 -0
- package/dist/specs/atoms/forms/radio.pidl.json +312 -0
- package/dist/specs/atoms/forms/search-input.pidl.json +265 -0
- package/dist/specs/atoms/forms/select.pidl.json +420 -0
- package/dist/specs/atoms/forms/textarea.pidl.json +422 -0
- package/dist/specs/atoms/forms/toggle.pidl.json +314 -0
- package/dist/specs/layout/grid-item.pidl.json +120 -0
- package/dist/specs/layout/grid.pidl.json +157 -0
- package/dist/specs/layout/page-section.pidl.json +105 -0
- package/dist/specs/layout/smart-container.pidl.json +148 -0
- package/dist/specs/layout/stack.pidl.json +144 -0
- package/dist/specs/organisms/content/accordion.pidl.json +196 -0
- package/dist/specs/organisms/content/card.pidl.json +283 -0
- package/dist/specs/organisms/feedback/alert-dialog.pidl.json +158 -0
- package/dist/specs/organisms/feedback/modal.pidl.json +133 -0
- package/dist/specs/organisms/feedback/toast.pidl.json +150 -0
- package/dist/specs/organisms/forms/dynamic-form.pidl.json +314 -0
- package/dist/specs/organisms/forms/form.pidl.json +135 -0
- package/dist/specs/organisms/forms/subscribe-form.pidl.json +188 -0
- package/dist/specs/organisms/navigation/command-palette.pidl.json +263 -0
- package/dist/specs/organisms/navigation/docs-sidebar.pidl.json +264 -0
- package/dist/specs/organisms/navigation/navbar.pidl.json +356 -0
- package/dist/specs/organisms/navigation/table-of-contents.pidl.json +197 -0
- package/dist/specs/sections/contact-section.pidl.json +183 -0
- package/dist/specs/sections/cta-section.pidl.json +168 -0
- package/dist/specs/sections/faq-section.pidl.json +202 -0
- package/dist/specs/sections/features-section.pidl.json +214 -0
- package/dist/specs/sections/footer-section.pidl.json +187 -0
- package/dist/specs/sections/hero-section.pidl.json +202 -0
- package/dist/src/borders-psychology.d.ts +17 -0
- package/dist/src/borders-psychology.d.ts.map +1 -0
- package/dist/src/borders-psychology.js +42 -0
- package/dist/src/borders-psychology.js.map +1 -0
- package/dist/src/color-psychology.d.ts +20 -0
- package/dist/src/color-psychology.d.ts.map +1 -0
- package/dist/src/color-psychology.js +57 -0
- package/dist/src/color-psychology.js.map +1 -0
- package/dist/src/design-intelligence.d.ts +13 -0
- package/dist/src/design-intelligence.d.ts.map +1 -0
- package/dist/src/design-intelligence.js +36 -0
- package/dist/src/design-intelligence.js.map +1 -0
- package/dist/src/index.d.ts +6238 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +105 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/motion-psychology.d.ts +19 -0
- package/dist/src/motion-psychology.d.ts.map +1 -0
- package/dist/src/motion-psychology.js +47 -0
- package/dist/src/motion-psychology.js.map +1 -0
- package/dist/src/mutation-vocabulary.d.ts +13 -0
- package/dist/src/mutation-vocabulary.d.ts.map +1 -0
- package/dist/src/mutation-vocabulary.js +67 -0
- package/dist/src/mutation-vocabulary.js.map +1 -0
- package/dist/src/radius-psychology.d.ts +17 -0
- package/dist/src/radius-psychology.d.ts.map +1 -0
- package/dist/src/radius-psychology.js +42 -0
- package/dist/src/radius-psychology.js.map +1 -0
- package/dist/src/shadows-psychology.d.ts +17 -0
- package/dist/src/shadows-psychology.d.ts.map +1 -0
- package/dist/src/shadows-psychology.js +44 -0
- package/dist/src/shadows-psychology.js.map +1 -0
- package/dist/src/spacing-psychology.d.ts +22 -0
- package/dist/src/spacing-psychology.d.ts.map +1 -0
- package/dist/src/spacing-psychology.js +59 -0
- package/dist/src/spacing-psychology.js.map +1 -0
- package/dist/src/typography-psychology.d.ts +22 -0
- package/dist/src/typography-psychology.d.ts.map +1 -0
- package/dist/src/typography-psychology.js +68 -0
- package/dist/src/typography-psychology.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** @codex { "id": "pithy.pidl-catalog.borders-psychology", "title": "Borders Psychology Guidance", "category": "feature" } */
|
|
2
|
+
/**
|
|
3
|
+
* Borders Psychology guidance — proprietary research-backed border-weight rules,
|
|
4
|
+
* injected into the AI system prompt so generated sites use a border style that
|
|
5
|
+
* fits the user's industry / use-case / mood.
|
|
6
|
+
*
|
|
7
|
+
* Border weight signals structure and definition: minimal/none reads airy,
|
|
8
|
+
* modern, content-first; subtle reads gently defined; standard reads clear and
|
|
9
|
+
* structured; strong reads bold, utilitarian, data-dense. Maps onto the design
|
|
10
|
+
* system's border presets (minimal / subtle / standard / strong). Intentionally
|
|
11
|
+
* compact for the 0.1 release.
|
|
12
|
+
*
|
|
13
|
+
* This file lives in the private @pithyjs/pidl-catalog package and is NEVER
|
|
14
|
+
* published to npm — it is IP and must stay server-side.
|
|
15
|
+
*/
|
|
16
|
+
export const BORDERS_PSYCHOLOGY_GUIDANCE = `
|
|
17
|
+
## Border Psychology (structure & definition)
|
|
18
|
+
|
|
19
|
+
Border weight signals how structured vs. airy a UI feels. Minimal/none reads
|
|
20
|
+
modern, open, content-first; subtle reads gently defined and calm; standard reads
|
|
21
|
+
clear, organized, professional; strong reads bold, utilitarian, information-dense.
|
|
22
|
+
Pick the weight that matches the brand and how much structure the content needs.
|
|
23
|
+
|
|
24
|
+
### Border preset → use-case
|
|
25
|
+
- minimal → editorial, luxury, photography, minimalist & high-design brands —
|
|
26
|
+
rely on whitespace, not lines
|
|
27
|
+
- subtle → most consumer & marketing sites, wellness, calm brands — light
|
|
28
|
+
definition
|
|
29
|
+
- standard (default) → SaaS, business, forms-heavy or app-like products — clear,
|
|
30
|
+
organized structure
|
|
31
|
+
- strong → dashboards, data tables, enterprise & admin tools — maximum
|
|
32
|
+
delineation for dense information
|
|
33
|
+
|
|
34
|
+
### Applying it
|
|
35
|
+
For a NEW page or site built from scratch, emit ONE \`theme.setPreset\` mutation
|
|
36
|
+
to set the border weight — exact shape:
|
|
37
|
+
\`{ "op": "theme.setPreset", "module": "borders", "value": "subtle" }\`
|
|
38
|
+
\`value\` MUST be one of: minimal, subtle, standard, strong. Do this only for new
|
|
39
|
+
builds, not for small content edits, and never when the user asks to keep the
|
|
40
|
+
current style.
|
|
41
|
+
`.trim();
|
|
42
|
+
//# sourceMappingURL=borders-psychology.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"borders-psychology.js","sourceRoot":"","sources":["../../src/borders-psychology.ts"],"names":[],"mappings":"AAAA,8HAA8H;AAE9H;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyB1C,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @codex { "id": "pithy.pidl-catalog.color-psychology", "title": "Color Psychology Guidance", "category": "feature" } */
|
|
2
|
+
/**
|
|
3
|
+
* Color Psychology guidance — proprietary research-backed color selection rules.
|
|
4
|
+
*
|
|
5
|
+
* Injected into the AI system prompt so the model chooses a brand `--color-primary`
|
|
6
|
+
* (OKLCH) suited to the user's industry / use-case / mood, instead of defaulting
|
|
7
|
+
* to blue. The design system re-derives the ENTIRE palette (surfaces, text,
|
|
8
|
+
* borders, statuses, tints) from that single seed, so a well-chosen primary is
|
|
9
|
+
* the highest-leverage decision the AI makes about a site's look.
|
|
10
|
+
*
|
|
11
|
+
* Hue values are OKLCH degrees; lightness/chroma ranges are tuned so the derived
|
|
12
|
+
* palette stays accessible in BOTH light and dark mode. This is intentionally
|
|
13
|
+
* compact for the 0.1 release — a heuristic the model applies, not an exhaustive
|
|
14
|
+
* taxonomy.
|
|
15
|
+
*
|
|
16
|
+
* This file lives in the private @pithyjs/pidl-catalog package and is NEVER
|
|
17
|
+
* published to npm — it is part of our IP and must stay server-side.
|
|
18
|
+
*/
|
|
19
|
+
export declare const COLOR_PSYCHOLOGY_GUIDANCE: string;
|
|
20
|
+
//# sourceMappingURL=color-psychology.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-psychology.d.ts","sourceRoot":"","sources":["../../src/color-psychology.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAE1H;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,yBAAyB,QAqC9B,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** @codex { "id": "pithy.pidl-catalog.color-psychology", "title": "Color Psychology Guidance", "category": "feature" } */
|
|
2
|
+
/**
|
|
3
|
+
* Color Psychology guidance — proprietary research-backed color selection rules.
|
|
4
|
+
*
|
|
5
|
+
* Injected into the AI system prompt so the model chooses a brand `--color-primary`
|
|
6
|
+
* (OKLCH) suited to the user's industry / use-case / mood, instead of defaulting
|
|
7
|
+
* to blue. The design system re-derives the ENTIRE palette (surfaces, text,
|
|
8
|
+
* borders, statuses, tints) from that single seed, so a well-chosen primary is
|
|
9
|
+
* the highest-leverage decision the AI makes about a site's look.
|
|
10
|
+
*
|
|
11
|
+
* Hue values are OKLCH degrees; lightness/chroma ranges are tuned so the derived
|
|
12
|
+
* palette stays accessible in BOTH light and dark mode. This is intentionally
|
|
13
|
+
* compact for the 0.1 release — a heuristic the model applies, not an exhaustive
|
|
14
|
+
* taxonomy.
|
|
15
|
+
*
|
|
16
|
+
* This file lives in the private @pithyjs/pidl-catalog package and is NEVER
|
|
17
|
+
* published to npm — it is part of our IP and must stay server-side.
|
|
18
|
+
*/
|
|
19
|
+
export const COLOR_PSYCHOLOGY_GUIDANCE = `
|
|
20
|
+
## Color Psychology (choosing the brand primary)
|
|
21
|
+
|
|
22
|
+
When building a site from scratch, choose \`--color-primary\` deliberately from the
|
|
23
|
+
psychology of the user's industry and mood — never leave it on the default blue.
|
|
24
|
+
Colors carry consistent emotional associations: blue = trust/calm, green =
|
|
25
|
+
growth/health, red = energy/appetite, purple = creativity/luxury, orange/yellow =
|
|
26
|
+
warmth/optimism, pink = warmth/approachability, near-neutral = premium/minimal.
|
|
27
|
+
|
|
28
|
+
### Industry → hue (OKLCH degrees)
|
|
29
|
+
- Healthcare / wellness / medical → calm blue (250), healing teal (195), or balanced green (150)
|
|
30
|
+
- Finance / banking / legal / insurance → deep trust blue (255–265), or low-chroma slate
|
|
31
|
+
- Tech / SaaS / startup → confident blue (255) or electric indigo/violet (280)
|
|
32
|
+
- Food / restaurant / coffee → appetite red (28), warm orange (55), or earthy brown (low-chroma 60)
|
|
33
|
+
- Eco / sustainability / outdoors / agriculture → natural green (145) or earthy olive (110)
|
|
34
|
+
- Beauty / fashion / lifestyle → magenta-pink (350) or soft violet (300)
|
|
35
|
+
- Education / nonprofit / community → friendly blue (250), optimistic teal (190), or warm orange (60)
|
|
36
|
+
- Luxury / premium → very low-chroma near-neutral, deep violet (300), with optional gold accent (85)
|
|
37
|
+
- Creative / entertainment / media → vivid violet (290) or energetic magenta (330)
|
|
38
|
+
- Real estate / construction / industrial → dependable blue (250) or strong slate, optional amber (70)
|
|
39
|
+
- Playful / kids → cheerful yellow (95) or friendly coral (30)
|
|
40
|
+
|
|
41
|
+
### Tuning lightness & chroma to personality
|
|
42
|
+
- Bold / energetic / youthful → higher chroma (0.16–0.22), lightness 60–70%
|
|
43
|
+
- Professional / trustworthy / calm → moderate chroma (0.08–0.14), lightness 50–60%
|
|
44
|
+
- Luxury / premium / minimal → low chroma (0.02–0.06), lightness 38–52%
|
|
45
|
+
- Friendly / approachable → warm hue, lightness 64–72%
|
|
46
|
+
|
|
47
|
+
### Selection strategy
|
|
48
|
+
1. Infer the industry AND the mood from the user's prompt (e.g. "modern coffee shop" → food + warm/inviting).
|
|
49
|
+
2. Pick a hue from the matching industry band above.
|
|
50
|
+
3. Set lightness & chroma from the brand personality.
|
|
51
|
+
4. Keep lightness roughly 45–70% so the design system can derive accessible contrast in BOTH light and dark mode.
|
|
52
|
+
5. Pick blue ONLY when it genuinely fits (trust-critical finance/health/tech) — otherwise differentiate.
|
|
53
|
+
|
|
54
|
+
Apply your choice as the single \`theme.setColor\` \`--color-primary\` mutation
|
|
55
|
+
described in the Output Envelope; the whole palette is derived from it.
|
|
56
|
+
`.trim();
|
|
57
|
+
//# sourceMappingURL=color-psychology.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-psychology.js","sourceRoot":"","sources":["../../src/color-psychology.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAE1H;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCxC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @codex { "id": "pithy.pidl-catalog.design-intelligence", "title": "Design Intelligence Rules", "category": "feature" } */
|
|
2
|
+
/**
|
|
3
|
+
* Design Intelligence rules — proprietary psychology-backed composition rules.
|
|
4
|
+
*
|
|
5
|
+
* These rules are injected into the AI system prompt to guide page generation.
|
|
6
|
+
* They encode design psychology research (Halo Effect, Cognitive Fluency,
|
|
7
|
+
* Peak-End Rule) and section composition constraints.
|
|
8
|
+
*
|
|
9
|
+
* This file lives in the private @pithyjs/pidl-catalog package and is NEVER
|
|
10
|
+
* published to npm.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DESIGN_INTELLIGENCE_RULES: string;
|
|
13
|
+
//# sourceMappingURL=design-intelligence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-intelligence.d.ts","sourceRoot":"","sources":["../../src/design-intelligence.ts"],"names":[],"mappings":"AAAA,6HAA6H;AAE7H;;;;;;;;;GASG;AAEH,eAAO,MAAM,yBAAyB,QAuB9B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** @codex { "id": "pithy.pidl-catalog.design-intelligence", "title": "Design Intelligence Rules", "category": "feature" } */
|
|
2
|
+
/**
|
|
3
|
+
* Design Intelligence rules — proprietary psychology-backed composition rules.
|
|
4
|
+
*
|
|
5
|
+
* These rules are injected into the AI system prompt to guide page generation.
|
|
6
|
+
* They encode design psychology research (Halo Effect, Cognitive Fluency,
|
|
7
|
+
* Peak-End Rule) and section composition constraints.
|
|
8
|
+
*
|
|
9
|
+
* This file lives in the private @pithyjs/pidl-catalog package and is NEVER
|
|
10
|
+
* published to npm.
|
|
11
|
+
*/
|
|
12
|
+
export const DESIGN_INTELLIGENCE_RULES = `
|
|
13
|
+
## Design Intelligence Rules
|
|
14
|
+
|
|
15
|
+
### Halo Effect
|
|
16
|
+
- Use high-quality hero imagery and typography to create positive first impressions
|
|
17
|
+
- The first section sets the perceived quality for the entire page
|
|
18
|
+
- Pair professional imagery with clean, spacious layouts
|
|
19
|
+
|
|
20
|
+
### Cognitive Fluency
|
|
21
|
+
- Prefer familiar layouts (centered hero, grid features, closing CTA)
|
|
22
|
+
- Use clear visual hierarchy with consistent heading levels
|
|
23
|
+
- Limit choices: 3-5 feature cards, 2-3 pricing tiers, 1-2 CTAs per section
|
|
24
|
+
|
|
25
|
+
### Peak-End Rule
|
|
26
|
+
- End every page with a strong CTA section or compelling closing message
|
|
27
|
+
- The last section the user sees disproportionately affects their memory of the page
|
|
28
|
+
- Footer should reinforce trust (links, contact info, social proof)
|
|
29
|
+
|
|
30
|
+
### Section Composition Guidelines
|
|
31
|
+
- Hero: max 1 primary CTA + 1 secondary CTA. No more.
|
|
32
|
+
- Features grid: 3 or 6 items for visual balance. Avoid 4 (awkward 2x2).
|
|
33
|
+
- CTA sections: single focused action. Multiple CTAs dilute effectiveness.
|
|
34
|
+
- Contact: label + value pairs. Validate all URLs with isSafeHref().
|
|
35
|
+
`.trim();
|
|
36
|
+
//# sourceMappingURL=design-intelligence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-intelligence.js","sourceRoot":"","sources":["../../src/design-intelligence.ts"],"names":[],"mappings":"AAAA,6HAA6H;AAE7H;;;;;;;;;GASG;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBxC,CAAC,IAAI,EAAE,CAAC"}
|