@shing.wong/sure-factor 0.1.1

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 (84) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +317 -0
  3. package/catalog/assets/audio/error-bell.js +34 -0
  4. package/catalog/assets/audio/success-chime.js +38 -0
  5. package/catalog/assets/audio/voice-help.js +48 -0
  6. package/catalog/assets/data/icd10-codes.json +22 -0
  7. package/catalog/assets/data/us-zip-codes.json +22 -0
  8. package/catalog/assets/i18n/en.json +236 -0
  9. package/catalog/assets/i18n/es.json +236 -0
  10. package/catalog/assets/i18n/fr.json +236 -0
  11. package/catalog/assets/themes/dracula.css +295 -0
  12. package/catalog/assets/themes/forest.css +295 -0
  13. package/catalog/assets/themes/nord.css +295 -0
  14. package/catalog/components/auth-login.yaml +49 -0
  15. package/catalog/components/auth-register.yaml +45 -0
  16. package/catalog/components/auth-reset-password.yaml +38 -0
  17. package/catalog/components/crud-resource.yaml +59 -0
  18. package/catalog/components/data-table.yaml +54 -0
  19. package/catalog/components/dialog.yaml +80 -0
  20. package/catalog/components/form-modal.yaml +51 -0
  21. package/catalog/components/form.yaml +47 -0
  22. package/catalog/components/horizontal-icon-menu.yaml +39 -0
  23. package/catalog/components/markdown.yaml +33 -0
  24. package/catalog/components/message-actions.yaml +23 -0
  25. package/catalog/components/preview-panel.yaml +24 -0
  26. package/catalog/components/search-filter.yaml +50 -0
  27. package/catalog/components/session-list.yaml +36 -0
  28. package/catalog/types/credit-card.yaml +55 -0
  29. package/catalog/types/date-iso.yaml +52 -0
  30. package/catalog/types/date-us.yaml +52 -0
  31. package/catalog/types/ein.yaml +54 -0
  32. package/catalog/types/email.yaml +56 -0
  33. package/catalog/types/full-name.yaml +55 -0
  34. package/catalog/types/icd10.yaml +57 -0
  35. package/catalog/types/intl-phone.yaml +52 -0
  36. package/catalog/types/password.yaml +57 -0
  37. package/catalog/types/ssn.yaml +56 -0
  38. package/catalog/types/text.yaml +55 -0
  39. package/catalog/types/url.yaml +56 -0
  40. package/catalog/types/us-address.yaml +54 -0
  41. package/catalog/types/us-phone.yaml +52 -0
  42. package/catalog/types/zip5.yaml +53 -0
  43. package/catalog/types/zip9.yaml +52 -0
  44. package/dist/format.d.ts +15 -0
  45. package/dist/format.d.ts.map +1 -0
  46. package/dist/format.js +46 -0
  47. package/dist/format.js.map +1 -0
  48. package/dist/generate-store.d.ts +20 -0
  49. package/dist/generate-store.d.ts.map +1 -0
  50. package/dist/generate-store.js +128 -0
  51. package/dist/generate-store.js.map +1 -0
  52. package/dist/generate.d.ts +19 -0
  53. package/dist/generate.d.ts.map +1 -0
  54. package/dist/generate.js +145 -0
  55. package/dist/generate.js.map +1 -0
  56. package/dist/index.d.ts +11 -0
  57. package/dist/index.d.ts.map +1 -0
  58. package/dist/index.js +17 -0
  59. package/dist/index.js.map +1 -0
  60. package/dist/introspect.d.ts +23 -0
  61. package/dist/introspect.d.ts.map +1 -0
  62. package/dist/introspect.js +40 -0
  63. package/dist/introspect.js.map +1 -0
  64. package/dist/match.d.ts +10 -0
  65. package/dist/match.d.ts.map +1 -0
  66. package/dist/match.js +136 -0
  67. package/dist/match.js.map +1 -0
  68. package/dist/parse-yaml.d.ts +2 -0
  69. package/dist/parse-yaml.d.ts.map +1 -0
  70. package/dist/parse-yaml.js +152 -0
  71. package/dist/parse-yaml.js.map +1 -0
  72. package/dist/sanitize.d.ts +15 -0
  73. package/dist/sanitize.d.ts.map +1 -0
  74. package/dist/sanitize.js +101 -0
  75. package/dist/sanitize.js.map +1 -0
  76. package/dist/serialize.d.ts +15 -0
  77. package/dist/serialize.d.ts.map +1 -0
  78. package/dist/serialize.js +256 -0
  79. package/dist/serialize.js.map +1 -0
  80. package/dist/types.d.ts +83 -0
  81. package/dist/types.d.ts.map +1 -0
  82. package/dist/types.js +2 -0
  83. package/dist/types.js.map +1 -0
  84. package/package.json +80 -0
@@ -0,0 +1,59 @@
1
+ name: crud-resource
2
+ description: Full CRUD interface combining a data table with create, read, update, and delete operations via form modals
3
+ tier: prototype
4
+ parameters:
5
+ fields:
6
+ - name: resourceName
7
+ type: text
8
+ required: true
9
+ - name: columns
10
+ type: text
11
+ required: true
12
+ - name: createFields
13
+ type: text
14
+ required: true
15
+ - name: editFields
16
+ type: text
17
+ required: false
18
+ - name: pageSize
19
+ type: number
20
+ required: false
21
+ - name: exportable
22
+ type: boolean
23
+ required: false
24
+ - name: onDelete
25
+ type: text
26
+ required: false
27
+ submitLabel:
28
+ en: Save
29
+ es: Guardar
30
+ fr: Enregistrer
31
+ cancelLabel:
32
+ en: Cancel
33
+ es: Cancelar
34
+ fr: Annuler
35
+ behavior:
36
+ notificationModes:
37
+ - inline
38
+ - toast
39
+ - statusBar
40
+ - sidePanel
41
+ audio:
42
+ errorBell: true
43
+ successChime: true
44
+ voiceHelp: true
45
+ autoFocus: true
46
+ confirmBeforeCancel: true
47
+ scripts:
48
+ - audio-feedback.js
49
+ - voice-help.js
50
+ - notification-handler.js
51
+ cssClasses:
52
+ form: sure-crud
53
+ field: sure-crud__field
54
+ input: sure-crud__input
55
+ error: sure-crud__error
56
+ help: sure-crud__help
57
+ label: sure-crud__label
58
+ example:
59
+ usage: Generate a full CRUD interface for managing insurance claims with columns for claim ID, patient, amount, status, and date, plus create/edit modals and CSV export
@@ -0,0 +1,54 @@
1
+ name: data-table
2
+ description: Sortable, filterable data table with pagination and search for displaying record collections
3
+ tier: prototype
4
+ parameters:
5
+ fields:
6
+ - name: columns
7
+ type: text
8
+ required: true
9
+ - name: rows
10
+ type: text
11
+ required: true
12
+ - name: pageSize
13
+ type: number
14
+ required: false
15
+ - name: sortable
16
+ type: boolean
17
+ required: false
18
+ - name: searchable
19
+ type: boolean
20
+ required: false
21
+ - name: onRowClick
22
+ type: text
23
+ required: false
24
+ submitLabel:
25
+ en: Apply
26
+ es: Aplicar
27
+ fr: Appliquer
28
+ cancelLabel:
29
+ en: Reset
30
+ es: Restablecer
31
+ fr: Réinitialiser
32
+ behavior:
33
+ notificationModes:
34
+ - toast
35
+ - statusBar
36
+ audio:
37
+ errorBell: false
38
+ successChime: true
39
+ voiceHelp: false
40
+ autoFocus: false
41
+ confirmBeforeCancel: false
42
+ scripts:
43
+ - audio-feedback.js
44
+ - voice-help.js
45
+ - notification-handler.js
46
+ cssClasses:
47
+ form: sure-table
48
+ field: sure-table__cell
49
+ input: sure-table__input
50
+ error: sure-table__error
51
+ help: sure-table__help
52
+ label: sure-table__header
53
+ example:
54
+ usage: Generate a sortable patient list table with columns for name, DOB, last visit, status, and assigned provider
@@ -0,0 +1,80 @@
1
+ name: dialog
2
+ description: Draggable, resizable modal dialog for settings, editors, detail views, and agent content preview. Supports configurable resize edges and drag-by-header.
3
+ tier: prototype
4
+ parameters:
5
+ title:
6
+ type: text
7
+ required: true
8
+ content:
9
+ type: text
10
+ required: true
11
+ description: Inner HTML or component reference
12
+ width:
13
+ type: number
14
+ required: false
15
+ default: 480
16
+ resizeEdges:
17
+ type: text
18
+ required: false
19
+ default: e,s,se
20
+ description: Comma-separated edge codes (e, s, se, w, n, nw, ne, sw)
21
+ draggable:
22
+ type: boolean
23
+ required: false
24
+ default: true
25
+ showClose:
26
+ type: boolean
27
+ required: false
28
+ default: true
29
+ behavior:
30
+ notificationModes:
31
+ - inline
32
+ - toast
33
+ audio:
34
+ errorBell: false
35
+ successChime: false
36
+ voiceHelp: false
37
+ autoFocus: true
38
+ scripts:
39
+ - dialog-handler.js
40
+ cssClasses:
41
+ overlay: sure-dialog-overlay
42
+ dialog: sure-dialog
43
+ header: sure-dialog__header
44
+ title: sure-dialog__title
45
+ close: sure-dialog__close
46
+ body: sure-dialog__body
47
+ resizeHandle: sure-dialog__resize
48
+ resizeE: sure-dialog__resize--e
49
+ resizeS: sure-dialog__resize--s
50
+ resizeSE: sure-dialog__resize--se
51
+ generated:
52
+ html: |
53
+ <div class="sure-dialog-overlay" id="{{id}}-overlay">
54
+ <div class="sure-dialog" id="{{id}}">
55
+ <div class="sure-dialog__header">
56
+ <h2 class="sure-dialog__title">{{title}}</h2>
57
+ <button class="sure-dialog__close" onclick="closeModal()">✕</button>
58
+ </div>
59
+ <div class="sure-dialog__body">{{content}}</div>
60
+ <div class="sure-dialog__resize sure-dialog__resize--e"></div>
61
+ <div class="sure-dialog__resize sure-dialog__resize--s"></div>
62
+ <div class="sure-dialog__resize sure-dialog__resize--se"></div>
63
+ </div>
64
+ </div>
65
+ js: >
66
+ function open{{Name}}(opts) {
67
+ openModal({ title: opts.title, content: opts.content,
68
+ width: opts.width || 480,
69
+ resizeEdges: (opts.resizeEdges || "e,s,se").split(","),
70
+ draggable: opts.draggable !== false })
71
+ }
72
+ css: >
73
+ .sure-dialog-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.5);
74
+ z-index:200; display:flex; align-items:center; justify-content:center; }
75
+ .sure-dialog { background:var(--surface); border-radius:12px; display:flex;
76
+ flex-direction:column; box-shadow:0 8px 32px rgba(0,0,0,0.2); position:relative; }
77
+ example:
78
+ usage: Generate a settings dialog with provider select, model input, temperature slider, and theme picker. Resizable from right edge, bottom edge, and corner. Draggable by header.
79
+ code: |
80
+ openSettingsModal('settings')
@@ -0,0 +1,51 @@
1
+ name: form-modal
2
+ description: Modal dialog containing a form for focused data entry without navigating away from the current view
3
+ tier: prototype
4
+ parameters:
5
+ fields:
6
+ - name: title
7
+ type: text
8
+ required: true
9
+ - name: fields
10
+ type: text
11
+ required: true
12
+ - name: submitLabel
13
+ type: text
14
+ required: false
15
+ - name: cancelLabel
16
+ type: text
17
+ required: false
18
+ - name: width
19
+ type: text
20
+ required: false
21
+ submitLabel:
22
+ en: Save
23
+ es: Guardar
24
+ fr: Enregistrer
25
+ cancelLabel:
26
+ en: Cancel
27
+ es: Cancelar
28
+ fr: Annuler
29
+ behavior:
30
+ notificationModes:
31
+ - inline
32
+ - toast
33
+ audio:
34
+ errorBell: true
35
+ successChime: true
36
+ voiceHelp: true
37
+ autoFocus: true
38
+ confirmBeforeCancel: true
39
+ scripts:
40
+ - audio-feedback.js
41
+ - voice-help.js
42
+ - notification-handler.js
43
+ cssClasses:
44
+ form: sure-modal__form
45
+ field: sure-modal__field
46
+ input: sure-modal__input
47
+ error: sure-modal__error
48
+ help: sure-modal__help
49
+ label: sure-modal__label
50
+ example:
51
+ usage: Generate a modal dialog to add a new medication record with drug name, dosage, frequency, and prescriber fields
@@ -0,0 +1,47 @@
1
+ name: form
2
+ description: Basic single-record form with single-column layout for creating or editing an entity
3
+ tier: vibe
4
+ parameters:
5
+ fields:
6
+ - name: fields
7
+ type: text
8
+ required: true
9
+ - name: submitLabel
10
+ type: text
11
+ required: false
12
+ - name: cancelLabel
13
+ type: text
14
+ required: false
15
+ submitLabel:
16
+ en: Submit
17
+ es: Enviar
18
+ fr: Soumettre
19
+ cancelLabel:
20
+ en: Cancel
21
+ es: Cancelar
22
+ fr: Annuler
23
+ behavior:
24
+ notificationModes:
25
+ - inline
26
+ - toast
27
+ - statusBar
28
+ - sidePanel
29
+ audio:
30
+ errorBell: true
31
+ successChime: false
32
+ voiceHelp: false
33
+ autoFocus: true
34
+ confirmBeforeCancel: false
35
+ scripts:
36
+ - audio-feedback.js
37
+ - voice-help.js
38
+ - notification-handler.js
39
+ cssClasses:
40
+ form: sure-form
41
+ field: sure-form__field
42
+ input: sure-form__input
43
+ error: sure-form__error
44
+ help: sure-form__help
45
+ label: sure-form__label
46
+ example:
47
+ usage: Generate a patient intake form with name, email, diagnosis, and ZIP code fields
@@ -0,0 +1,39 @@
1
+ name: horizontal-icon-menu
2
+ description: Single-level horizontal icon menu bar for chat headers, toolbars, and navigation. Items show on hover with muted icons and accent active state. Theme-aware via sure-ui. Supports dividers and separator groups.
3
+ tier: prototype
4
+ parameters:
5
+ items:
6
+ type: array
7
+ required: true
8
+ description: Array of { icon, title, onclick, active? } objects
9
+ position:
10
+ type: text
11
+ required: false
12
+ default: right
13
+ description: left | right | center
14
+ behavior:
15
+ notificationModes: []
16
+ audio:
17
+ errorBell: false
18
+ successChime: false
19
+ cssClasses:
20
+ menu: sure-menu
21
+ item: sure-menu__item
22
+ active: active
23
+ divider: sure-menu__divider
24
+ example:
25
+ usage: |
26
+ Generate a horizontal menu for the chat header with items:
27
+ logout (🚪), help (❓), settings (⚙), keys (🔑), models (🤖),
28
+ preview toggle (▶), clear (🗑). Right-aligned with dividers
29
+ between logical groups.
30
+ code: |
31
+ <div class="sure-menu" style="justify-content:flex-end">
32
+ <button class="sure-menu__item" onclick="logout()" title="Logout">🚪</button>
33
+ <button class="sure-menu__item" onclick="help()" title="Help">❓</button>
34
+ <div class="sure-menu__divider"></div>
35
+ <button class="sure-menu__item" onclick="settings()" title="Settings">⚙</button>
36
+ <button class="sure-menu__item" onclick="keys()" title="Keys">🔑</button>
37
+ <div class="sure-menu__divider"></div>
38
+ <button class="sure-menu__item" onclick="preview()" title="Preview">▶</button>
39
+ </div>
@@ -0,0 +1,33 @@
1
+ name: markdown
2
+ description: Renders LLM-generated markdown content as formatted HTML with tables, code blocks, lists, headings, blockquotes, and links. Theme-aware via sure-ui CSS variables.
3
+ tier: prototype
4
+ parameters:
5
+ content:
6
+ type: text
7
+ required: true
8
+ description: Raw markdown text to render
9
+ sanitize:
10
+ type: boolean
11
+ required: false
12
+ default: true
13
+ description: Strip dangerous HTML tags
14
+ behavior:
15
+ notificationModes: []
16
+ audio:
17
+ errorBell: false
18
+ successChime: false
19
+ voiceHelp: false
20
+ scripts:
21
+ - markdown-renderer.js
22
+ cssClasses:
23
+ root: sure-markdown
24
+ code: sure-markdown code
25
+ pre: sure-markdown pre
26
+ table: sure-markdown table
27
+ blockquote: sure-markdown blockquote
28
+ list: sure-markdown ul
29
+ heading: sure-markdown h3
30
+ link: sure-markdown a
31
+ image: sure-markdown img
32
+ example:
33
+ usage: Render an LLM response containing markdown-formatted text with tables, code blocks, and lists
@@ -0,0 +1,23 @@
1
+ name: message-actions
2
+ description: Per-message action toolbar for chat UIs. User messages get edit/delete/copy/resend. Assistant messages get copy/preview/toggle-markdown. Appears on hover. Theme-aware via sure-ui.
3
+ tier: prototype
4
+ parameters:
5
+ role:
6
+ type: text
7
+ required: true
8
+ description: user | assistant
9
+ rawContent:
10
+ type: text
11
+ required: true
12
+ description: Original message text (before markdown rendering)
13
+ behavior:
14
+ notificationModes: []
15
+ audio:
16
+ errorBell: false
17
+ successChime: false
18
+ cssClasses:
19
+ actionsContainer: msg-actions
20
+ actionButton: msg-actions button
21
+ body: msg-body
22
+ example:
23
+ usage: Generate a message action toolbar for user messages with edit, delete, copy, and resend buttons
@@ -0,0 +1,24 @@
1
+ name: preview-panel
2
+ description: Right sidebar content preview for agent-generated output (SVG, HTML, markdown). Shows content in a styled message container with copy, toggle-markdown, and clear actions. Theme-aware via sure-ui.
3
+ tier: prototype
4
+ parameters:
5
+ contentType:
6
+ type: text
7
+ required: true
8
+ description: svg | html | text
9
+ content:
10
+ type: text
11
+ required: true
12
+ description: The content to render
13
+ behavior:
14
+ notificationModes: []
15
+ audio:
16
+ errorBell: false
17
+ successChime: false
18
+ cssClasses:
19
+ panel: preview-panel
20
+ header: preview-panel__header
21
+ body: preview-panel__body
22
+ title: preview-panel__title
23
+ example:
24
+ usage: Generate a preview panel showing agent-generated SVG with copy and clear actions
@@ -0,0 +1,50 @@
1
+ name: search-filter
2
+ description: Search bar with filter controls for incremental text search and faceted filtering of a dataset
3
+ tier: vibe
4
+ parameters:
5
+ fields:
6
+ - name: placeholder
7
+ type: text
8
+ required: false
9
+ - name: filters
10
+ type: text
11
+ required: true
12
+ - name: debounceMs
13
+ type: number
14
+ required: false
15
+ - name: onSearch
16
+ type: text
17
+ required: true
18
+ - name: onClear
19
+ type: text
20
+ required: false
21
+ submitLabel:
22
+ en: Search
23
+ es: Buscar
24
+ fr: Rechercher
25
+ cancelLabel:
26
+ en: Clear Filters
27
+ es: Limpiar Filtros
28
+ fr: Effacer les Filtres
29
+ behavior:
30
+ notificationModes:
31
+ - inline
32
+ audio:
33
+ errorBell: false
34
+ successChime: false
35
+ voiceHelp: false
36
+ autoFocus: true
37
+ confirmBeforeCancel: false
38
+ scripts:
39
+ - audio-feedback.js
40
+ - voice-help.js
41
+ - notification-handler.js
42
+ cssClasses:
43
+ form: sure-search
44
+ field: sure-search__input
45
+ input: sure-search__input
46
+ error: sure-search__error
47
+ help: sure-search__help
48
+ label: sure-search__label
49
+ example:
50
+ usage: Generate a search bar with dropdown filters for patient name, insurance provider, and claim status with 300ms debounce
@@ -0,0 +1,36 @@
1
+ name: session-list
2
+ description: Collapsible session/conversation list with rename and delete. Sessions stored client-side in cookies via sure-state. Theme-aware via sure-ui CSS variables.
3
+ tier: prototype
4
+ parameters:
5
+ items:
6
+ type: array
7
+ required: true
8
+ description: Array of { id, title } session objects
9
+ activeId:
10
+ type: string
11
+ required: false
12
+ description: Currently selected session ID
13
+ allowRename:
14
+ type: boolean
15
+ required: false
16
+ default: true
17
+ allowDelete:
18
+ type: boolean
19
+ required: false
20
+ default: true
21
+ behavior:
22
+ notificationModes: []
23
+ audio:
24
+ errorBell: false
25
+ successChime: false
26
+ scripts:
27
+ - session-handler.js
28
+ cssClasses:
29
+ list: sure-session-list
30
+ item: sure-session-item
31
+ title: sure-session-title
32
+ actions: sure-session-actions
33
+ example:
34
+ usage: |
35
+ Generate a session list sidebar with new-chat button and rename/delete on hover.
36
+ Wire to sure-state cookie store for persistence.
@@ -0,0 +1,55 @@
1
+ name: credit-card
2
+ description: Credit card number (stored as masked last 4 digits only)
3
+ match:
4
+ sql: column_name LIKE '%cc%' OR column_name LIKE '%card%' OR column_name LIKE '%credit%'
5
+ regex: ^\d{13,19}$
6
+ maxLength: 19
7
+ validation:
8
+ regex: ^\d{13,19}$
9
+ maxLength: 19
10
+ lookup: null
11
+ sanitize:
12
+ input:
13
+ - stripNonDigits
14
+ - luhnCheck
15
+ - trimToLast4
16
+ output:
17
+ - maskLast4
18
+ hints:
19
+ en:
20
+ placeholder: '•••• •••• •••• 4242'
21
+ help: Credit card number (we only store the last 4 digits)
22
+ error:
23
+ format: Must be a valid credit card number
24
+ required: Card number is required
25
+ es:
26
+ placeholder: '•••• •••• •••• 4242'
27
+ help: Número de tarjeta de crédito (solo almacenamos los últimos 4 dígitos)
28
+ error:
29
+ format: Debe ser un número de tarjeta de crédito válido
30
+ required: Número de tarjeta es obligatorio
31
+ fr:
32
+ placeholder: '•••• •••• •••• 4242'
33
+ help: Numéro de carte de crédit (nous ne stockons que les 4 derniers chiffres)
34
+ error:
35
+ format: Doit être un numéro de carte de crédit valide
36
+ required: Numéro de carte requis
37
+ tiers:
38
+ vibe:
39
+ validation: { regex: ^\d{13,19}$ }
40
+ sanitize: [stripNonDigits, trimToLast4]
41
+ hints: { en: { placeholder: '4242' } }
42
+ prototype:
43
+ validation: { regex: ^\d{13,19}$, maxLength: 19 }
44
+ sanitize: [stripNonDigits, luhnCheck, trimToLast4]
45
+ hints: { en: { placeholder: '4242', help: 'We only store the last 4 digits' }, es: { placeholder: '4242', help: 'Solo almacenamos los últimos 4 dígitos' } }
46
+ production:
47
+ validation: { regex: ^\d{13,19}$, maxLength: 19, lookup: null }
48
+ sanitize: [stripNonDigits, luhnCheck, trimToLast4]
49
+ hints: { en: { placeholder: '4242', help: 'We only store the last 4 digits' }, es: { placeholder: '4242', help: 'Solo almacenamos los últimos 4 dígitos' }, fr: { placeholder: '4242', help: 'Nous ne stockons que les 4 derniers chiffres' } }
50
+ security:
51
+ encrypt: true
52
+ notes:
53
+ - 'NEVER store full credit card number — only last 4 digits'
54
+ - 'PCI-DSS compliant storage required'
55
+ - 'Never log the card number at any stage'
@@ -0,0 +1,52 @@
1
+ name: date-iso
2
+ description: ISO 8601 date
3
+ match:
4
+ sql: data_type = 'date'
5
+ regex: ^\d{4}-\d{2}-\d{2}$
6
+ maxLength: 10
7
+ validation:
8
+ regex: ^\d{4}-\d{2}-\d{2}$
9
+ maxLength: 10
10
+ lookup: null
11
+ sanitize:
12
+ input:
13
+ - trim
14
+ - normalize: NFKC
15
+ - slice(0, 10)
16
+ output:
17
+ - htmlEscape
18
+ hints:
19
+ en:
20
+ placeholder: '2026-07-24'
21
+ help: Date in YYYY-MM-DD format
22
+ error:
23
+ format: Must be a valid date in YYYY-MM-DD format
24
+ required: Date is required
25
+ es:
26
+ placeholder: '2026-07-24'
27
+ help: Fecha en formato AAAA-MM-DD
28
+ error:
29
+ format: Debe ser una fecha válida en formato AAAA-MM-DD
30
+ required: Fecha es obligatoria
31
+ fr:
32
+ placeholder: '2026-07-24'
33
+ help: Date au format AAAA-MM-JJ
34
+ error:
35
+ format: Doit être une date valide au format AAAA-MM-JJ
36
+ required: Date requise
37
+ tiers:
38
+ vibe:
39
+ validation: { regex: ^\d{4}-\d{2}-\d{2}$ }
40
+ sanitize: [trim, slice(0, 10)]
41
+ hints: { en: { placeholder: '2026-07-24' } }
42
+ prototype:
43
+ validation: { regex: ^\d{4}-\d{2}-\d{2}$, maxLength: 10 }
44
+ sanitize: [trim, normalize: NFKC, slice(0, 10)]
45
+ hints: { en: { placeholder: '2026-07-24', help: 'Date in YYYY-MM-DD' }, es: { placeholder: '2026-07-24', help: 'Fecha en AAAA-MM-DD' } }
46
+ production:
47
+ validation: { regex: ^\d{4}-\d{2}-\d{2}$, maxLength: 10, lookup: null }
48
+ sanitize: [trim, normalize: NFKC, slice(0, 10)]
49
+ hints: { en: { placeholder: '2026-07-24', help: 'Date in YYYY-MM-DD' }, es: { placeholder: '2026-07-24', help: 'Fecha en AAAA-MM-DD' }, fr: { placeholder: '2026-07-24', help: 'Date au format AAAA-MM-JJ' } }
50
+ security:
51
+ encrypt: false
52
+ notes: []
@@ -0,0 +1,52 @@
1
+ name: date-us
2
+ description: US date format (MM/DD/YYYY)
3
+ match:
4
+ sql: column_name LIKE '%date%' AND data_type IN ('varchar(10)', 'varchar(12)')
5
+ regex: ^\d{2}/\d{2}/\d{4}$
6
+ maxLength: 10
7
+ validation:
8
+ regex: ^\d{2}/\d{2}/\d{4}$
9
+ maxLength: 10
10
+ lookup: null
11
+ sanitize:
12
+ input:
13
+ - trim
14
+ - normalize: NFKC
15
+ - slice(0, 10)
16
+ output:
17
+ - htmlEscape
18
+ hints:
19
+ en:
20
+ placeholder: '07/24/2026'
21
+ help: Date in MM/DD/YYYY format
22
+ error:
23
+ format: Must be a valid date in MM/DD/YYYY format
24
+ required: Date is required
25
+ es:
26
+ placeholder: '07/24/2026'
27
+ help: Fecha en formato MM/DD/AAAA
28
+ error:
29
+ format: Debe ser una fecha válida en formato MM/DD/AAAA
30
+ required: Fecha es obligatoria
31
+ fr:
32
+ placeholder: '07/24/2026'
33
+ help: Date au format MM/JJ/AAAA
34
+ error:
35
+ format: Doit être une date valide au format MM/JJ/AAAA
36
+ required: Date requise
37
+ tiers:
38
+ vibe:
39
+ validation: { regex: ^\d{2}/\d{2}/\d{4}$ }
40
+ sanitize: [trim, slice(0, 10)]
41
+ hints: { en: { placeholder: '07/24/2026' } }
42
+ prototype:
43
+ validation: { regex: ^\d{2}/\d{2}/\d{4}$, maxLength: 10 }
44
+ sanitize: [trim, normalize: NFKC, slice(0, 10)]
45
+ hints: { en: { placeholder: '07/24/2026', help: 'Date in MM/DD/YYYY' }, es: { placeholder: '07/24/2026', help: 'Fecha en MM/DD/AAAA' } }
46
+ production:
47
+ validation: { regex: ^\d{2}/\d{2}/\d{4}$, maxLength: 10, lookup: null }
48
+ sanitize: [trim, normalize: NFKC, slice(0, 10)]
49
+ hints: { en: { placeholder: '07/24/2026', help: 'Date in MM/DD/YYYY' }, es: { placeholder: '07/24/2026', help: 'Fecha en MM/DD/AAAA' }, fr: { placeholder: '07/24/2026', help: 'Date au format MM/JJ/AAAA' } }
50
+ security:
51
+ encrypt: false
52
+ notes: []