anentrypoint-design 0.0.107 → 0.0.108

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anentrypoint-design",
3
- "version": "0.0.107",
3
+ "version": "0.0.108",
4
4
  "description": "247420 design system SDK — webjsx + modified ripple-ui, single-file ESM bundle for reproducible use of the AnEntrypoint design.",
5
5
  "type": "module",
6
6
  "main": "./dist/247420.js",
package/src/page-html.js CHANGED
@@ -115,18 +115,19 @@ function heroNode(hero) {
115
115
  body: hero.body || hero.subheading || '',
116
116
  accent: hero.accent,
117
117
  badge: Array.isArray(hero.badges) && hero.badges[0] ? hero.badges[0].label : undefined,
118
- actions: Array.isArray(hero.ctas) ? hero.ctas.map(c => ({ label: c.label || c.cta || 'go', href: c.href || '#' })) : [],
118
+ actions: Array.isArray(hero.ctas) ? hero.ctas.map((c, i) => h('a', { key: i, class: i === 0 ? 'btn btn-accent' : 'btn btn-ghost', href: c.href || '#' }, c.label || c.cta || 'go')) : null,
119
119
  });
120
120
  }
121
121
 
122
122
  function sectionNode(sec, idx) {
123
123
  const rail = RAILS[idx % RAILS.length];
124
124
  const features = sec.features || sec.items || [];
125
- const rows = features.map((f, i) => h('div', { key: i, class: 'row ' + rail },
126
- h('span', { class: 'title' }, f.name),
127
- f.desc ? h('div', { class: 'sub', innerHTML: f.desc.replace(/\`([^\`]+)\`/g, '<code>$1</code>') }) : null,
128
- f.benefit ? h('div', { class: 'row-benefit' }, f.benefit) : null,
129
- ));
125
+ const rows = features.map((f, i) => {
126
+ const kids = [h('span', { key: 't', class: 'title' }, String(f.name || ''))];
127
+ if (f.desc) kids.push(h('div', { key: 'd', class: 'sub', innerHTML: String(f.desc).replace(/\`([^\`]+)\`/g, '<code>$1</code>') }));
128
+ if (f.benefit) kids.push(h('div', { key: 'b', class: 'row-benefit' }, String(f.benefit)));
129
+ return h('div', { key: i, class: 'row ' + rail }, ...kids);
130
+ });
130
131
  return C.Section({
131
132
  title: sec.name || sec.title || sec.id,
132
133
  children: [
@@ -143,12 +144,13 @@ function examplesNode(examples) {
143
144
  title: 'explore',
144
145
  children: examples.map((e, i) => {
145
146
  const rail = RAILS[(i + 1) % RAILS.length];
146
- return h('a', { key: i, class: 'row ' + rail, href: e.href || '#' },
147
- h('span', { class: 'code' }, String(i + 1).padStart(2, '0')),
148
- h('span', { class: 'title' }, e.label || e.name || e.href),
149
- e.desc ? h('span', { class: 'meta dim' }, ' — ' + e.desc) : null,
150
- h('span', { class: 'ds-row-arrow' }, ''),
151
- );
147
+ const kids = [
148
+ h('span', { key: 'c', class: 'code' }, String(i + 1).padStart(2, '0')),
149
+ h('span', { key: 't', class: 'title' }, String(e.label || e.name || e.href || '')),
150
+ ];
151
+ if (e.desc) kids.push(h('span', { key: 'm', class: 'meta dim' }, '' + e.desc));
152
+ kids.push(h('span', { key: 'a', class: 'ds-row-arrow' }, '↗'));
153
+ return h('a', { key: i, class: 'row ' + rail, href: e.href || '#' }, ...kids);
152
154
  }),
153
155
  });
154
156
  }