@mindfiredigital/ignix-lite-engine 1.1.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 (91) hide show
  1. package/.turbo/turbo-build.log +22 -0
  2. package/CHANGELOG.md +7 -0
  3. package/LICENSE +21 -0
  4. package/README.md +283 -0
  5. package/dist/index.d.ts +171 -0
  6. package/dist/index.js +2540 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/manifests/accordion.json +61 -0
  9. package/dist/manifests/alert.json +69 -0
  10. package/dist/manifests/avatar.json +75 -0
  11. package/dist/manifests/badge.json +74 -0
  12. package/dist/manifests/breadcrumb.json +87 -0
  13. package/dist/manifests/button.json +85 -0
  14. package/dist/manifests/card.json +91 -0
  15. package/dist/manifests/checkbox.json +122 -0
  16. package/dist/manifests/codeblock.json +63 -0
  17. package/dist/manifests/combobox.json +33 -0
  18. package/dist/manifests/dialog.json +64 -0
  19. package/dist/manifests/divider.json +47 -0
  20. package/dist/manifests/dropdown.json +105 -0
  21. package/dist/manifests/form.json +81 -0
  22. package/dist/manifests/grid.json +143 -0
  23. package/dist/manifests/input.json +99 -0
  24. package/dist/manifests/meter.json +103 -0
  25. package/dist/manifests/navigation.json +70 -0
  26. package/dist/manifests/progress.json +88 -0
  27. package/dist/manifests/radio.json +121 -0
  28. package/dist/manifests/select.json +109 -0
  29. package/dist/manifests/skeleton.json +101 -0
  30. package/dist/manifests/tab.json +88 -0
  31. package/dist/manifests/table.json +92 -0
  32. package/dist/manifests/textarea.json +117 -0
  33. package/dist/manifests/toast.json +157 -0
  34. package/dist/manifests/tooltip.json +115 -0
  35. package/dist/vector-index.json +14015 -0
  36. package/package.json +33 -0
  37. package/src/global.d.ts +3 -0
  38. package/src/index.ts +14 -0
  39. package/src/manifests/accordion.json +61 -0
  40. package/src/manifests/alert.json +69 -0
  41. package/src/manifests/avatar.json +75 -0
  42. package/src/manifests/badge.json +74 -0
  43. package/src/manifests/breadcrumb.json +87 -0
  44. package/src/manifests/button.json +85 -0
  45. package/src/manifests/card.json +91 -0
  46. package/src/manifests/checkbox.json +122 -0
  47. package/src/manifests/codeblock.json +63 -0
  48. package/src/manifests/combobox.json +33 -0
  49. package/src/manifests/dialog.json +64 -0
  50. package/src/manifests/divider.json +47 -0
  51. package/src/manifests/dropdown.json +105 -0
  52. package/src/manifests/form.json +81 -0
  53. package/src/manifests/grid.json +143 -0
  54. package/src/manifests/index.ts +49 -0
  55. package/src/manifests/input.json +99 -0
  56. package/src/manifests/meter.json +103 -0
  57. package/src/manifests/navigation.json +70 -0
  58. package/src/manifests/progress.json +88 -0
  59. package/src/manifests/radio.json +121 -0
  60. package/src/manifests/select.json +109 -0
  61. package/src/manifests/skeleton.json +101 -0
  62. package/src/manifests/tab.json +88 -0
  63. package/src/manifests/table.json +92 -0
  64. package/src/manifests/textarea.json +117 -0
  65. package/src/manifests/toast.json +157 -0
  66. package/src/manifests/tooltip.json +115 -0
  67. package/src/tools/build-index.ts +43 -0
  68. package/src/tools/check-a11y.ts +96 -0
  69. package/src/tools/embedder.ts +18 -0
  70. package/src/tools/generate-theme.ts +42 -0
  71. package/src/tools/get-emmet.ts +64 -0
  72. package/src/tools/get-manifests.ts +55 -0
  73. package/src/tools/handoff.ts +302 -0
  74. package/src/tools/intent-engine.ts +215 -0
  75. package/src/tools/list-components.ts +20 -0
  76. package/src/tools/preview.ts +186 -0
  77. package/src/tools/search-index.ts +82 -0
  78. package/src/tools/theme-palette.ts +65 -0
  79. package/src/tools/theme-tokens.ts +176 -0
  80. package/src/tools/token-counter.ts +59 -0
  81. package/src/tools/validator.ts +353 -0
  82. package/src/types.ts +63 -0
  83. package/src/utils/a11y-rules.ts +873 -0
  84. package/src/utils/a11y-types.ts +15 -0
  85. package/src/utils/cosine.ts +15 -0
  86. package/src/utils/emmet-helpers.ts +283 -0
  87. package/src/utils/intent-helpers.ts +66 -0
  88. package/src/utils/intent-parser.ts +175 -0
  89. package/src/utils/tokenizer.ts +7 -0
  90. package/tsconfig.json +17 -0
  91. package/tsup.config.ts +10 -0
@@ -0,0 +1,122 @@
1
+ {
2
+ "component": "checkbox",
3
+ "version": "2.0",
4
+ "description": "Checkbox for boolean selection. Must be wrapped inside a label element.",
5
+
6
+ "element": "input",
7
+
8
+ "emmet": "label[data-intent=? data-size=?]>(input[type=checkbox]+{Label})",
9
+
10
+
11
+ "props": {
12
+ "type": {
13
+ "type": "enum",
14
+ "values": ["checkbox"],
15
+ "default": "checkbox",
16
+ "native": true,
17
+ "agent_hint": "Always use type=checkbox"
18
+ },
19
+
20
+ "checked": {
21
+ "type": "boolean",
22
+ "native": true,
23
+ "agent_hint": "Marks checkbox as checked"
24
+ },
25
+
26
+ "disabled": {
27
+ "type": "boolean",
28
+ "native": true,
29
+ "agent_hint": "Disables checkbox"
30
+ },
31
+
32
+ "required": {
33
+ "type": "boolean",
34
+ "native": true,
35
+ "agent_hint": "Marks checkbox as required"
36
+ },
37
+
38
+ "name": {
39
+ "type": "string",
40
+ "native": true,
41
+ "agent_hint": "Used for grouping checkboxes"
42
+ },
43
+
44
+ "value": {
45
+ "type": "string",
46
+ "native": true,
47
+ "agent_hint": "Submitted value in forms"
48
+ },
49
+
50
+ "data-intent": {
51
+ "type": "enum",
52
+ "values": ["success", "danger", "warning", "neutral"],
53
+ "default": "neutral",
54
+ "native": false,
55
+ "agent_hint": "Controls checkbox color (applied on label)"
56
+ },
57
+
58
+ "data-size": {
59
+ "type": "enum",
60
+ "values": ["sm", "md", "lg"],
61
+ "default": "md",
62
+ "native": false,
63
+ "agent_hint": "Controls checkbox size (applied on label)"
64
+ }
65
+ },
66
+
67
+ "states": ["checked", "disabled"],
68
+
69
+ "required_props": ["type"],
70
+
71
+ "required_wrapper": "label",
72
+
73
+ "forbidden_props": ["class", "variant", "color", "style", "onclick"],
74
+
75
+ "do": [
76
+ "Wrap checkbox inside label",
77
+ "Use checked for default state",
78
+ "Use name and value for grouping",
79
+ "Use data-intent for styling",
80
+ "Use data-size for scaling"
81
+ ],
82
+
83
+ "dont": [
84
+ "Do not use class attribute",
85
+ "Do not use variant or color props",
86
+ "Do not use inline JS handlers",
87
+ "Do not place checkbox outside label"
88
+ ],
89
+
90
+ "examples": [
91
+ {
92
+ "label": "Basic checkbox",
93
+ "emmet": "label>(input[type=checkbox]+{Accept terms})",
94
+ "html": "<label><input type=\"checkbox\" />Accept terms</label>"
95
+ },
96
+ {
97
+ "label": "Checked checkbox",
98
+ "emmet": "label>(input[type=checkbox checked]+{Checked})",
99
+ "html": "<label><input type=\"checkbox\" checked />Checked</label>"
100
+ },
101
+ {
102
+ "label": "Disabled checkbox",
103
+ "emmet": "label>(input[type=checkbox disabled]+{Disabled})",
104
+ "html": "<label><input type=\"checkbox\" disabled />Disabled</label>"
105
+ },
106
+ {
107
+ "label": "Intent variant",
108
+ "emmet": "label[data-intent=success]>(input[type=checkbox checked]+{Success})",
109
+ "html": "<label data-intent=\"success\"><input type=\"checkbox\" checked />Success</label>"
110
+ },
111
+ {
112
+ "label": "Size variant",
113
+ "emmet": "label[data-size=lg]>(input[type=checkbox]+{Large})",
114
+ "html": "<label data-size=\"lg\"><input type=\"checkbox\" />Large</label>"
115
+ },
116
+ {
117
+ "label": "Checkbox group",
118
+ "emmet": "label>(input[type=checkbox name=lang value=js]+{JavaScript})",
119
+ "html": "<label><input type=\"checkbox\" name=\"lang\" value=\"js\" />JavaScript</label>"
120
+ }
121
+ ]
122
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "component": "code",
3
+ "version": "2.0",
4
+
5
+ "description": "Displays formatted code snippets using native pre and code elements with language metadata support and horizontal scrolling.",
6
+
7
+ "element": "pre > code",
8
+
9
+ "emmet": "pre>code[data-lang=?]{content}",
10
+
11
+
12
+ "props": {
13
+ "data-lang": {
14
+ "type": "string",
15
+ "values": ["js", "ts", "python", "bash", "html", "css", "json"],
16
+ "default": "text",
17
+ "native": false,
18
+ "agent_hint": "Specify language metadata for code examples."
19
+ }
20
+ },
21
+
22
+ "states": [],
23
+
24
+ "forbidden_props": ["language", "variant", "theme", "class"],
25
+
26
+ "required_props": [],
27
+
28
+ "required_slots": [],
29
+
30
+ "required_children": ["code"],
31
+
32
+ "do": [
33
+ "Wrap code inside pre element",
34
+ "Use data-lang to indicate language",
35
+ "Use code element for code content"
36
+ ],
37
+
38
+ "dont": [
39
+ "Do not use div instead of pre",
40
+ "Do not use language prop",
41
+ "Do not use class attribute"
42
+ ],
43
+
44
+ "examples": [
45
+ {
46
+ "label": "JavaScript code",
47
+ "emmet": "pre>code[data-lang=js]{function greet(){}}",
48
+ "html": "<pre><code data-lang=\"js\">function greet(){}</code></pre>"
49
+ },
50
+
51
+ {
52
+ "label": "Python code",
53
+ "emmet": "pre>code[data-lang=python]{print('Hello')}",
54
+ "html": "<pre><code data-lang=\"python\">print('Hello')</code></pre>"
55
+ },
56
+
57
+ {
58
+ "label": "Bash command",
59
+ "emmet": "pre>code[data-lang=bash]{npm install ignix-lite}",
60
+ "html": "<pre><code data-lang=\"bash\">npm install ignix-lite</code></pre>"
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "component": "ix-combobox",
3
+ "element": "ix-combobox",
4
+
5
+ "emmet": "ix-combobox>(label>(span[data-chips])+input[placeholder=?]+button[data-clear]{Clear})+ul>(li{Option})*",
6
+
7
+ "required_children": ["label", "input", "ul", "li"],
8
+
9
+ "optional_children": ["[data-chips]", "button[data-clear]"],
10
+
11
+ "props": {
12
+ "multiple": {
13
+ "type": "boolean",
14
+ "native": true,
15
+ "agent_hint": "Enables chip rendering and multi-select mode."
16
+ },
17
+
18
+ "data-intent": {
19
+ "type": "enum",
20
+ "values": ["primary", "success", "warning", "danger", "gradient"]
21
+ },
22
+
23
+ "data-clear": {
24
+ "type": "boolean",
25
+ "native": false
26
+ },
27
+
28
+ "data-chips": {
29
+ "type": "boolean",
30
+ "native": false
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "component": "dialog",
3
+ "version": "2.0",
4
+ "description": "Modal dialog used for confirmations, warnings, and information display.",
5
+
6
+ "element": "dialog",
7
+
8
+ "emmet": "dialog#id[data-intent=?]>(h2{Title}+p{Message}+button{Cancel}+button{Confirm})",
9
+
10
+ "props": {
11
+ "id": {
12
+ "type": "string",
13
+ "native": true,
14
+ "agent_hint": "Unique identifier used to control dialog"
15
+ },
16
+
17
+ "data-intent": {
18
+ "type": "enum",
19
+ "values": ["danger", "warning", "info"],
20
+ "default": "info",
21
+ "native": false,
22
+ "agent_hint": "Controls dialog style (danger for destructive, warning for caution)"
23
+ }
24
+ },
25
+
26
+ "states": [],
27
+
28
+ "required_props": ["id"],
29
+
30
+ "required_slots": [],
31
+
32
+ "forbidden_props": ["class", "variant", "color", "style"],
33
+
34
+ "do": [
35
+ "Always include a heading (h2)",
36
+ "Include descriptive text using p tags",
37
+ "Provide at least one action button",
38
+ "Use data-intent for styling"
39
+ ],
40
+
41
+ "dont": [
42
+ "Do not use class attribute",
43
+ "Do not attach JS handlers like onclick",
44
+ "Do not leave dialog empty"
45
+ ],
46
+
47
+ "examples": [
48
+ {
49
+ "label": "Confirm dialog",
50
+ "emmet": "dialog#confirm[data-intent=danger]>(h2{Confirm}+p{Are you sure?}+button{Cancel}+button{Delete})",
51
+ "html": "<dialog id=\"confirm\" data-intent=\"danger\"><h2>Confirm</h2><p>Are you sure?</p><button>Cancel</button><button>Delete</button></dialog>"
52
+ },
53
+ {
54
+ "label": "Warning dialog",
55
+ "emmet": "dialog#warn[data-intent=warning]>(h2{Warning}+p{Unsaved changes}+button{Close})",
56
+ "html": "<dialog id=\"warn\" data-intent=\"warning\"><h2>Warning</h2><p>Unsaved changes</p><button>Close</button></dialog>"
57
+ },
58
+ {
59
+ "label": "Info dialog",
60
+ "emmet": "dialog#info[data-intent=info]>(h2{Info}+p{Session expiring}+button{Close})",
61
+ "html": "<dialog id=\"info\" data-intent=\"info\"><h2>Info</h2><p>Session expiring</p><button>Close</button></dialog>"
62
+ }
63
+ ]
64
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "component": "divider",
3
+ "version": "2.0",
4
+ "description": "Visual separator using semantic hr element with orientation support.",
5
+
6
+ "element": "hr",
7
+
8
+ "emmet": "hr",
9
+
10
+ "props": {
11
+ "data-orientation": {
12
+ "type": "string",
13
+
14
+ "values": ["horizontal", "vertical"],
15
+
16
+ "default": "horizontal",
17
+
18
+ "agent_hint": "Controls divider direction."
19
+ }
20
+ },
21
+
22
+ "states": [],
23
+
24
+ "forbidden_props": ["class"],
25
+
26
+ "required_props": [],
27
+
28
+ "required_slots": [],
29
+
30
+ "do": ["Use hr element", "Use data-orientation for vertical mode"],
31
+
32
+ "dont": ["Do not use div wrappers", "Do not use class attribute"],
33
+
34
+ "examples": [
35
+ {
36
+ "label": "Horizontal",
37
+ "emmet": "hr",
38
+ "html": "<hr>"
39
+ },
40
+
41
+ {
42
+ "label": "Vertical",
43
+ "emmet": "hr[data-orientation=vertical]",
44
+ "html": "<hr data-orientation=\"vertical\">"
45
+ }
46
+ ]
47
+ }
@@ -0,0 +1,105 @@
1
+ {
2
+ "component": "dropdown",
3
+ "version": "2.0",
4
+ "description": "Accessible dropdown component using ix-dropdown custom element with trigger and menu slots, keyboard navigation and semantic intents.",
5
+
6
+ "element": "ix-dropdown",
7
+
8
+ "emmet": "ix-dropdown>button[slot=trigger]+ul[slot=menu]",
9
+
10
+ "props": {
11
+ "data-intent": {
12
+ "type": "enum",
13
+ "values": [
14
+ "primary",
15
+ "success",
16
+ "warning",
17
+ "danger",
18
+ "ghost",
19
+ "gradient",
20
+ "neutral"
21
+ ],
22
+ "default": "neutral",
23
+ "native": false,
24
+ "agent_hint": "Applies dropdown styling."
25
+ },
26
+
27
+ "slot": {
28
+ "type": "enum",
29
+ "values": ["trigger", "menu"],
30
+ "native": true,
31
+ "agent_hint": "Defines dropdown trigger and menu."
32
+ },
33
+
34
+ "aria-haspopup": {
35
+ "type": "string",
36
+ "values": ["menu"],
37
+ "default": "menu",
38
+ "native": true,
39
+ "agent_hint": "Indicates menu popup."
40
+ },
41
+
42
+ "aria-expanded": {
43
+ "type": "boolean",
44
+ "default": false,
45
+ "native": true,
46
+ "agent_hint": "Open state of dropdown."
47
+ }
48
+ },
49
+
50
+ "states": ["closed", "open", "focused"],
51
+
52
+ "forbidden_props": ["variant", "theme", "size", "class"],
53
+
54
+ "required_props": [],
55
+
56
+ "required_slots": ["trigger", "menu"],
57
+
58
+ "methods": ["open()", "close()", "toggle()"],
59
+
60
+ "do": [
61
+ "Provide trigger slot",
62
+ "Provide menu slot",
63
+ "Use button items inside menu",
64
+ "Keep menu inside ul"
65
+ ],
66
+
67
+ "dont": [
68
+ "Do not omit trigger",
69
+ "Do not omit menu",
70
+ "Do not use div instead of menu list",
71
+ "Do not place plain text inside menu"
72
+ ],
73
+
74
+ "examples": [
75
+ {
76
+ "label": "Default dropdown",
77
+ "emmet": "ix-dropdown",
78
+ "html": "<ix-dropdown><button slot=\"trigger\">Options ▾</button><ul slot=\"menu\"><li><button>Profile</button></li><li><button>Settings</button></li></ul></ix-dropdown>"
79
+ },
80
+
81
+ {
82
+ "label": "Primary dropdown",
83
+ "emmet": "ix-dropdown[data-intent=primary]",
84
+ "html": "<ix-dropdown data-intent=\"primary\"><button slot=\"trigger\">Primary ▾</button><ul slot=\"menu\"><li><button>Dashboard</button></li><li><button>Profile</button></li></ul></ix-dropdown>"
85
+ },
86
+
87
+ {
88
+ "label": "Ghost dropdown",
89
+ "emmet": "ix-dropdown[data-intent=ghost]",
90
+ "html": "<ix-dropdown data-intent=\"ghost\"><button slot=\"trigger\">Ghost ▾</button><ul slot=\"menu\"><li><button>Item 1</button></li><li><button>Item 2</button></li></ul></ix-dropdown>"
91
+ },
92
+
93
+ {
94
+ "label": "Gradient dropdown",
95
+ "emmet": "ix-dropdown[data-intent=gradient]",
96
+ "html": "<ix-dropdown data-intent=\"gradient\"><button slot=\"trigger\">Gradient ▾</button><ul slot=\"menu\"><li><button>Modern</button></li><li><button>Premium</button></li></ul></ix-dropdown>"
97
+ },
98
+
99
+ {
100
+ "label": "Workspace menu",
101
+ "emmet": "ix-dropdown[data-intent=primary]",
102
+ "html": "<ix-dropdown data-intent=\"primary\"><button slot=\"trigger\">Workspace ▾</button><ul slot=\"menu\"><li><button>Settings</button></li><li><button>Invite Members</button></li><li><button>Billing</button></li><li><button>Logout</button></li></ul></ix-dropdown>"
103
+ }
104
+ ]
105
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "component": "form",
3
+ "version": "2.0",
4
+ "description": "Form container used to collect user input. Contains labels, inputs, and submit button.",
5
+
6
+ "element": "form",
7
+
8
+ "emmet": "form#id>(label>{Label}+input[type=? name=?])+button[type=submit]{Submit}",
9
+
10
+ "props": {
11
+ "id": {
12
+ "type": "string",
13
+ "native": true,
14
+ "agent_hint": "Unique identifier for the form"
15
+ },
16
+
17
+ "action": {
18
+ "type": "string",
19
+ "native": true,
20
+ "agent_hint": "URL where form is submitted"
21
+ },
22
+
23
+ "method": {
24
+ "type": "enum",
25
+ "values": ["get", "post"],
26
+ "default": "post",
27
+ "native": true,
28
+ "agent_hint": "HTTP method for submission"
29
+ },
30
+
31
+ "aria-busy": {
32
+ "type": "boolean",
33
+ "native": true,
34
+ "agent_hint": "Indicates loading/submitting state"
35
+ },
36
+
37
+ "data-loading": {
38
+ "type": "boolean",
39
+ "native": false,
40
+ "agent_hint": "Triggers loading UI styles"
41
+ }
42
+ },
43
+
44
+ "states": ["aria-busy", "data-loading"],
45
+
46
+ "required_props": [],
47
+
48
+ "required_slots": [],
49
+
50
+ "forbidden_props": ["class", "variant", "color", "style"],
51
+
52
+ "do": [
53
+ "Always include a submit button inside form",
54
+ "Wrap inputs inside label elements",
55
+ "Use aria-busy for loading state"
56
+ ],
57
+
58
+ "dont": [
59
+ "Do not use class attribute",
60
+ "Do not attach JS handlers like onsubmit",
61
+ "Do not leave form without submit button"
62
+ ],
63
+
64
+ "examples": [
65
+ {
66
+ "label": "Basic form",
67
+ "emmet": "form#signup>(label>{Email}+input[type=email name=email])+button[type=submit]{Submit}",
68
+ "html": "<form id=\"signup\"><label>Email <input type=\"email\" name=\"email\" /></label><button type=\"submit\">Submit</button></form>"
69
+ },
70
+ {
71
+ "label": "Form loading",
72
+ "emmet": "form[aria-busy=true data-loading]>(label>{Email}+input[type=email])+button{Submitting...}",
73
+ "html": "<form aria-busy=\"true\" data-loading><label>Email <input type=\"email\" /></label><button>Submitting...</button></form>"
74
+ },
75
+ {
76
+ "label": "Validation state",
77
+ "emmet": "form>(label[data-state=error]>(input[type=email aria-invalid=true])+small{Error})",
78
+ "html": "<form><label data-state=\"error\"><input type=\"email\" aria-invalid=\"true\" /><small>Error</small></label></form>"
79
+ }
80
+ ]
81
+ }
@@ -0,0 +1,143 @@
1
+ {
2
+ "component": "grid",
3
+ "version": "2.0",
4
+ "description": "Responsive semantic grid layout using section container with column spans, gaps, alignment and auto layouts.",
5
+
6
+ "element": "section",
7
+
8
+ "emmet": "section[data-grid=3]>article*3",
9
+
10
+ "props": {
11
+ "data-grid": {
12
+ "type": "string",
13
+
14
+ "values": ["1", "2", "3", "4", "5", "6", "auto", "fill"],
15
+
16
+ "default": "3",
17
+
18
+ "agent_hint": "Controls column count or auto layout."
19
+ },
20
+
21
+ "data-gap": {
22
+ "type": "string",
23
+
24
+ "values": ["xs", "sm", "md", "lg", "xl"],
25
+
26
+ "default": "md",
27
+
28
+ "agent_hint": "Controls spacing between items."
29
+ },
30
+
31
+ "data-align": {
32
+ "type": "string",
33
+
34
+ "values": ["start", "center", "end", "stretch", "baseline"],
35
+
36
+ "agent_hint": "Controls vertical alignment."
37
+ },
38
+
39
+ "data-justify": {
40
+ "type": "string",
41
+
42
+ "values": ["start", "center", "end", "stretch"],
43
+
44
+ "agent_hint": "Controls horizontal alignment."
45
+ },
46
+
47
+ "data-dense": {
48
+ "type": "boolean",
49
+
50
+ "agent_hint": "Enables dense auto flow packing."
51
+ }
52
+ },
53
+
54
+ "states": [],
55
+
56
+ "slots": {
57
+ "item": {
58
+ "required": false,
59
+
60
+ "element": ["article", "section", "span", "p", "button"],
61
+
62
+ "agent_hint": "Grid content item."
63
+ }
64
+ },
65
+
66
+ "child_props": {
67
+ "data-col": {
68
+ "type": "string",
69
+
70
+ "values": ["1", "2", "3", "4", "5", "6", "full"],
71
+
72
+ "agent_hint": "Column span for item."
73
+ },
74
+
75
+ "data-row": {
76
+ "type": "string",
77
+
78
+ "values": ["2", "3"],
79
+
80
+ "agent_hint": "Row span for item."
81
+ }
82
+ },
83
+
84
+ "forbidden_props": ["class"],
85
+
86
+ "required_props": ["data-grid"],
87
+
88
+ "required_slots": [],
89
+
90
+ "required_wrapper": null,
91
+
92
+ "do": [
93
+ "Use section as grid container",
94
+ "Use semantic children",
95
+ "Use data-col for spans",
96
+ "Use data-row for row spans",
97
+ "Use data-gap for spacing"
98
+ ],
99
+
100
+ "dont": [
101
+ "Do not use div wrappers",
102
+ "Do not use class attribute",
103
+ "Do not replace grid config with inline styles"
104
+ ],
105
+
106
+ "examples": [
107
+ {
108
+ "label": "Two columns",
109
+ "emmet": "section[data-grid=2]>article*2",
110
+ "html": "<section data-grid=\"2\"><article>Column 1</article><article>Column 2</article></section>"
111
+ },
112
+
113
+ {
114
+ "label": "Three columns",
115
+ "emmet": "section[data-grid=3]>article*3",
116
+ "html": "<section data-grid=\"3\"><article>A</article><article>B</article><article>C</article></section>"
117
+ },
118
+
119
+ {
120
+ "label": "Auto fit",
121
+ "emmet": "section[data-grid=auto]>article*5",
122
+ "html": "<section data-grid=\"auto\"><article>1</article><article>2</article><article>3</article></section>"
123
+ },
124
+
125
+ {
126
+ "label": "Column span",
127
+ "emmet": "section[data-grid=4]>(article[data-col=2])+(article*4)",
128
+ "html": "<section data-grid=\"4\"><article data-col=\"2\">Wide</article><article>A</article><article>B</article></section>"
129
+ },
130
+
131
+ {
132
+ "label": "Full width",
133
+ "emmet": "section[data-grid=3]>(article*3)+(article[data-col=full])",
134
+ "html": "<section data-grid=\"3\"><article>1</article><article>2</article><article>3</article><article data-col=\"full\">Full</article></section>"
135
+ },
136
+
137
+ {
138
+ "label": "Dense layout",
139
+ "emmet": "section[data-grid=4][data-dense]>article*6",
140
+ "html": "<section data-grid=\"4\" data-dense><article data-col=\"2\">Wide</article><article>A</article><article>B</article></section>"
141
+ }
142
+ ]
143
+ }