@bettercms-ai/kit 2.0.9 → 2.0.11
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/dist/engine/array.js +12 -3
- package/dist/engine/array.js.map +1 -1
- package/dist/engine/bits.d.ts +2 -1
- package/dist/engine/bits.js +2 -1
- package/dist/engine/bits.js.map +1 -1
- package/dist/lib/icons.d.ts +4 -1
- package/dist/lib/icons.js +17 -2
- package/dist/lib/icons.js.map +1 -1
- package/dist/library/entries/advanced.entries.js +2 -2
- package/dist/library/entries/advanced.entries.js.map +1 -1
- package/dist/library/entries/commerce.entries.js +1 -1
- package/dist/library/entries/commerce.entries.js.map +1 -1
- package/dist/library/entries/company.entries.js +1 -1
- package/dist/library/entries/company.entries.js.map +1 -1
- package/dist/library/entries/features.entries.js +2 -2
- package/dist/library/entries/features.entries.js.map +1 -1
- package/dist/library/entries/heroes.entries.js +1 -1
- package/dist/library/entries/heroes.entries.js.map +1 -1
- package/dist/library/entries/listings.entries.js +1 -1
- package/dist/library/entries/listings.entries.js.map +1 -1
- package/dist/library/entries/media.entries.js +5 -5
- package/dist/library/entries/media.entries.js.map +1 -1
- package/dist/library/entries/navigation.entries.js +4 -4
- package/dist/library/entries/navigation.entries.js.map +1 -1
- package/dist/library/entry-icons.d.ts +3 -0
- package/dist/library/entry-icons.js +157 -0
- package/dist/library/entry-icons.js.map +1 -0
- package/dist/library/export.d.ts +3 -0
- package/dist/library/export.js +16 -1
- package/dist/library/export.js.map +1 -1
- package/dist/library/index.d.ts +1 -0
- package/dist/library/index.js +2 -1
- package/dist/library/kit-catalog.json +13 -13
- package/package.json +5 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
//#region src/library/entry-icons.ts
|
|
2
|
+
/** Each Kit Library entry's id → its component's icon (a BetterCMS icon name), without loading the catalog. */
|
|
3
|
+
var kitEntryIcons = Object.freeze({
|
|
4
|
+
"a11y-critical-media-form": "player-play",
|
|
5
|
+
"about-timeline": "timeline",
|
|
6
|
+
"accordion-feature-image-swap": "list-details",
|
|
7
|
+
"announcement-countdown": "alarm",
|
|
8
|
+
"author-bio": "user-circle",
|
|
9
|
+
"awards-certifications": "award",
|
|
10
|
+
"before-after-slider": "arrows-horizontal",
|
|
11
|
+
"bento-feature-showcase": "layout-dashboard",
|
|
12
|
+
"blog-index": "news",
|
|
13
|
+
"breadcrumb-config": "chevrons-right",
|
|
14
|
+
"careers-list": "id-badge-2",
|
|
15
|
+
"case-study": "briefcase",
|
|
16
|
+
"case-study-cards": "briefcase",
|
|
17
|
+
"category-filter-bar": "filter",
|
|
18
|
+
"changelog": "history",
|
|
19
|
+
"changelog-nested-validation": "notes",
|
|
20
|
+
"chart-attrition": "chart-line",
|
|
21
|
+
"code-snippet-tabs": "terminal-2",
|
|
22
|
+
"code-tabs": "code",
|
|
23
|
+
"commerce-bundle-builder": "packages",
|
|
24
|
+
"commerce-cart-cross-sell": "shopping-cart-plus",
|
|
25
|
+
"commerce-collection-header-facets": "category-2",
|
|
26
|
+
"commerce-featured-product": "star",
|
|
27
|
+
"commerce-product-comparison": "columns-3",
|
|
28
|
+
"commerce-product-detail": "package",
|
|
29
|
+
"commerce-product-grid-query": "grid-dots",
|
|
30
|
+
"commerce-promo-countdown": "discount",
|
|
31
|
+
"commerce-shop-the-look": "hanger",
|
|
32
|
+
"commerce-size-guide": "ruler-measure",
|
|
33
|
+
"commerce-store-locator": "map-pin",
|
|
34
|
+
"comparison-vs-competitors": "vs",
|
|
35
|
+
"conditional-source-matrix": "shopping-cart",
|
|
36
|
+
"conversion-booking-embed": "calendar-time",
|
|
37
|
+
"conversion-contact-section": "address-book",
|
|
38
|
+
"conversion-cta-band": "click",
|
|
39
|
+
"conversion-exit-intent-popup": "app-window",
|
|
40
|
+
"conversion-lead-capture": "forms",
|
|
41
|
+
"conversion-multi-step-form": "list-check",
|
|
42
|
+
"conversion-newsletter-consent": "mail",
|
|
43
|
+
"conversion-quiz-product-finder": "zoom-question",
|
|
44
|
+
"conversion-trust-badges": "shield-check",
|
|
45
|
+
"conversion-waitlist-referral": "user-plus",
|
|
46
|
+
"cookie-consent": "cookie",
|
|
47
|
+
"core-bento": "layout-dashboard",
|
|
48
|
+
"core-faq": "help-circle",
|
|
49
|
+
"core-hero": "template",
|
|
50
|
+
"core-journalStory": "news",
|
|
51
|
+
"core-megaMenu": "layout-navbar",
|
|
52
|
+
"core-pricing": "currency-dollar",
|
|
53
|
+
"core-tabs": "layout-list",
|
|
54
|
+
"countdown-live-counter": "hourglass",
|
|
55
|
+
"course-curriculum": "school",
|
|
56
|
+
"data-table-specs": "table",
|
|
57
|
+
"docs-page": "book",
|
|
58
|
+
"dynamic-query-listing": "database-search",
|
|
59
|
+
"event-detail": "calendar-star",
|
|
60
|
+
"events-list": "calendar-event",
|
|
61
|
+
"feature-alternating-rows": "layout-rows",
|
|
62
|
+
"feature-icon-grid": "layout-grid",
|
|
63
|
+
"footer-mega-locations": "layout-bottombar",
|
|
64
|
+
"footer-minimal": "layout-bottombar",
|
|
65
|
+
"footer-multi-column": "layout-bottombar",
|
|
66
|
+
"global-announcement-overrides": "speakerphone",
|
|
67
|
+
"glossary": "abc",
|
|
68
|
+
"grid-cell-layout": "layout-board-split",
|
|
69
|
+
"hero-app-download": "device-mobile",
|
|
70
|
+
"hero-centered-gradient": "layout-align-center",
|
|
71
|
+
"hero-event": "calendar-event",
|
|
72
|
+
"hero-lead-form": "clipboard-text",
|
|
73
|
+
"hero-logo-wall": "badges",
|
|
74
|
+
"hero-personalized": "target",
|
|
75
|
+
"hero-product": "shopping-bag",
|
|
76
|
+
"hero-search": "input-search",
|
|
77
|
+
"hero-slider": "slideshow",
|
|
78
|
+
"hero-split-media": "layout-columns",
|
|
79
|
+
"hero-split-testimonial": "message-circle-2",
|
|
80
|
+
"hero-stats": "chart-arrows",
|
|
81
|
+
"hero-video-fullbleed": "movie",
|
|
82
|
+
"image-hotspots": "focus-2",
|
|
83
|
+
"integrations-grid": "plug-connected",
|
|
84
|
+
"interactive-3d-lottie-embed": "box",
|
|
85
|
+
"job-posting": "id-badge-2",
|
|
86
|
+
"kb-article": "lifebuoy",
|
|
87
|
+
"leadership-bios": "user-star",
|
|
88
|
+
"legal-policy": "scale",
|
|
89
|
+
"lightbox-gallery-filters": "photo-search",
|
|
90
|
+
"localized-section": "language",
|
|
91
|
+
"location-page": "building-store",
|
|
92
|
+
"locations-directory": "map-pins",
|
|
93
|
+
"logo-cloud": "building-skyscraper",
|
|
94
|
+
"manifesto-pull-quote": "blockquote",
|
|
95
|
+
"masonry-gallery": "layout-board",
|
|
96
|
+
"mixed-media-carousel": "carousel-horizontal",
|
|
97
|
+
"nav-announcement-utility": "layout-navbar",
|
|
98
|
+
"nav-docs-sidebar": "layout-sidebar",
|
|
99
|
+
"nav-ecommerce-header": "layout-navbar",
|
|
100
|
+
"nav-locale-header": "layout-navbar",
|
|
101
|
+
"nav-mega-featured-promo": "layout-navbar",
|
|
102
|
+
"nav-simple-cta": "layout-navbar",
|
|
103
|
+
"overlays-with-triggers": "app-window",
|
|
104
|
+
"page-builder-six-deep": "book-2",
|
|
105
|
+
"parallax-image-overlay": "photo-scan",
|
|
106
|
+
"personalized-hero": "users-group",
|
|
107
|
+
"podcast-episode": "microphone",
|
|
108
|
+
"podcast-episode-list": "microphone",
|
|
109
|
+
"polymorphic-modules": "news",
|
|
110
|
+
"press-kit": "download",
|
|
111
|
+
"press-mentions": "article",
|
|
112
|
+
"pricing-annual-savings-banner": "pig-money",
|
|
113
|
+
"pricing-enterprise-card": "building",
|
|
114
|
+
"pricing-faq": "help-circle",
|
|
115
|
+
"pricing-feature-matrix": "table-options",
|
|
116
|
+
"pricing-single-plan-addons": "playlist-add",
|
|
117
|
+
"pricing-tiers-billing-toggle": "currency-dollar",
|
|
118
|
+
"pricing-usage-calculator": "calculator",
|
|
119
|
+
"problem-solution": "arrows-exchange",
|
|
120
|
+
"product-compare-slider": "arrows-left-right",
|
|
121
|
+
"product-configurator": "adjustments",
|
|
122
|
+
"public-roadmap": "map-2",
|
|
123
|
+
"reader-poll": "chart-bar-popular",
|
|
124
|
+
"recipe": "chef-hat",
|
|
125
|
+
"references-web": "link",
|
|
126
|
+
"related-posts": "arrows-shuffle",
|
|
127
|
+
"resource-library": "books",
|
|
128
|
+
"responsive-layout-settings": "apps",
|
|
129
|
+
"restaurant-menu": "tools-kitchen-2",
|
|
130
|
+
"review-summary": "stars",
|
|
131
|
+
"rich-blog-post": "news",
|
|
132
|
+
"rich-text-embedded-components": "chef-hat",
|
|
133
|
+
"roi-calculator": "calculator",
|
|
134
|
+
"safe-embed": "frame",
|
|
135
|
+
"scrollytelling": "arrows-down",
|
|
136
|
+
"search-results-page": "search",
|
|
137
|
+
"section-theme-tokens": "quote",
|
|
138
|
+
"stats-band": "chart-bar",
|
|
139
|
+
"steps-how-it-works": "list-numbers",
|
|
140
|
+
"sticky-mobile-cta-bar": "layout-bottombar-expand",
|
|
141
|
+
"stockist-map": "map-pin",
|
|
142
|
+
"table-comparison": "table",
|
|
143
|
+
"tabs-with-media": "browser",
|
|
144
|
+
"team-grid": "users",
|
|
145
|
+
"testimonial-grid": "message-star",
|
|
146
|
+
"testimonial-video-slider": "video",
|
|
147
|
+
"timeline-company-history": "timeline",
|
|
148
|
+
"ugc-social-feed": "brand-instagram",
|
|
149
|
+
"values-culture": "heart-handshake",
|
|
150
|
+
"video-section": "player-play",
|
|
151
|
+
"wall-of-love": "heart",
|
|
152
|
+
"webinar-registration": "presentation"
|
|
153
|
+
});
|
|
154
|
+
//#endregion
|
|
155
|
+
export { kitEntryIcons };
|
|
156
|
+
|
|
157
|
+
//# sourceMappingURL=entry-icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-icons.js","names":[],"sources":["../../src/library/entry-icons.ts"],"sourcesContent":["// GENERATED from the kit's Library by scripts/kit-export.ts (with kit-catalog.json). Do not edit. Regenerate (bun run --cwd packages/kit kit:export).\nimport type { DockIconName } from \"../adapters/prod-types\";\n\n/** Each Kit Library entry's id → its component's icon (a BetterCMS icon name), without loading the catalog. */\nexport const kitEntryIcons: Readonly<Record<string, DockIconName>> = Object.freeze({\n \"a11y-critical-media-form\": \"player-play\",\n \"about-timeline\": \"timeline\",\n \"accordion-feature-image-swap\": \"list-details\",\n \"announcement-countdown\": \"alarm\",\n \"author-bio\": \"user-circle\",\n \"awards-certifications\": \"award\",\n \"before-after-slider\": \"arrows-horizontal\",\n \"bento-feature-showcase\": \"layout-dashboard\",\n \"blog-index\": \"news\",\n \"breadcrumb-config\": \"chevrons-right\",\n \"careers-list\": \"id-badge-2\",\n \"case-study\": \"briefcase\",\n \"case-study-cards\": \"briefcase\",\n \"category-filter-bar\": \"filter\",\n \"changelog\": \"history\",\n \"changelog-nested-validation\": \"notes\",\n \"chart-attrition\": \"chart-line\",\n \"code-snippet-tabs\": \"terminal-2\",\n \"code-tabs\": \"code\",\n \"commerce-bundle-builder\": \"packages\",\n \"commerce-cart-cross-sell\": \"shopping-cart-plus\",\n \"commerce-collection-header-facets\": \"category-2\",\n \"commerce-featured-product\": \"star\",\n \"commerce-product-comparison\": \"columns-3\",\n \"commerce-product-detail\": \"package\",\n \"commerce-product-grid-query\": \"grid-dots\",\n \"commerce-promo-countdown\": \"discount\",\n \"commerce-shop-the-look\": \"hanger\",\n \"commerce-size-guide\": \"ruler-measure\",\n \"commerce-store-locator\": \"map-pin\",\n \"comparison-vs-competitors\": \"vs\",\n \"conditional-source-matrix\": \"shopping-cart\",\n \"conversion-booking-embed\": \"calendar-time\",\n \"conversion-contact-section\": \"address-book\",\n \"conversion-cta-band\": \"click\",\n \"conversion-exit-intent-popup\": \"app-window\",\n \"conversion-lead-capture\": \"forms\",\n \"conversion-multi-step-form\": \"list-check\",\n \"conversion-newsletter-consent\": \"mail\",\n \"conversion-quiz-product-finder\": \"zoom-question\",\n \"conversion-trust-badges\": \"shield-check\",\n \"conversion-waitlist-referral\": \"user-plus\",\n \"cookie-consent\": \"cookie\",\n \"core-bento\": \"layout-dashboard\",\n \"core-faq\": \"help-circle\",\n \"core-hero\": \"template\",\n \"core-journalStory\": \"news\",\n \"core-megaMenu\": \"layout-navbar\",\n \"core-pricing\": \"currency-dollar\",\n \"core-tabs\": \"layout-list\",\n \"countdown-live-counter\": \"hourglass\",\n \"course-curriculum\": \"school\",\n \"data-table-specs\": \"table\",\n \"docs-page\": \"book\",\n \"dynamic-query-listing\": \"database-search\",\n \"event-detail\": \"calendar-star\",\n \"events-list\": \"calendar-event\",\n \"feature-alternating-rows\": \"layout-rows\",\n \"feature-icon-grid\": \"layout-grid\",\n \"footer-mega-locations\": \"layout-bottombar\",\n \"footer-minimal\": \"layout-bottombar\",\n \"footer-multi-column\": \"layout-bottombar\",\n \"global-announcement-overrides\": \"speakerphone\",\n \"glossary\": \"abc\",\n \"grid-cell-layout\": \"layout-board-split\",\n \"hero-app-download\": \"device-mobile\",\n \"hero-centered-gradient\": \"layout-align-center\",\n \"hero-event\": \"calendar-event\",\n \"hero-lead-form\": \"clipboard-text\",\n \"hero-logo-wall\": \"badges\",\n \"hero-personalized\": \"target\",\n \"hero-product\": \"shopping-bag\",\n \"hero-search\": \"input-search\",\n \"hero-slider\": \"slideshow\",\n \"hero-split-media\": \"layout-columns\",\n \"hero-split-testimonial\": \"message-circle-2\",\n \"hero-stats\": \"chart-arrows\",\n \"hero-video-fullbleed\": \"movie\",\n \"image-hotspots\": \"focus-2\",\n \"integrations-grid\": \"plug-connected\",\n \"interactive-3d-lottie-embed\": \"box\",\n \"job-posting\": \"id-badge-2\",\n \"kb-article\": \"lifebuoy\",\n \"leadership-bios\": \"user-star\",\n \"legal-policy\": \"scale\",\n \"lightbox-gallery-filters\": \"photo-search\",\n \"localized-section\": \"language\",\n \"location-page\": \"building-store\",\n \"locations-directory\": \"map-pins\",\n \"logo-cloud\": \"building-skyscraper\",\n \"manifesto-pull-quote\": \"blockquote\",\n \"masonry-gallery\": \"layout-board\",\n \"mixed-media-carousel\": \"carousel-horizontal\",\n \"nav-announcement-utility\": \"layout-navbar\",\n \"nav-docs-sidebar\": \"layout-sidebar\",\n \"nav-ecommerce-header\": \"layout-navbar\",\n \"nav-locale-header\": \"layout-navbar\",\n \"nav-mega-featured-promo\": \"layout-navbar\",\n \"nav-simple-cta\": \"layout-navbar\",\n \"overlays-with-triggers\": \"app-window\",\n \"page-builder-six-deep\": \"book-2\",\n \"parallax-image-overlay\": \"photo-scan\",\n \"personalized-hero\": \"users-group\",\n \"podcast-episode\": \"microphone\",\n \"podcast-episode-list\": \"microphone\",\n \"polymorphic-modules\": \"news\",\n \"press-kit\": \"download\",\n \"press-mentions\": \"article\",\n \"pricing-annual-savings-banner\": \"pig-money\",\n \"pricing-enterprise-card\": \"building\",\n \"pricing-faq\": \"help-circle\",\n \"pricing-feature-matrix\": \"table-options\",\n \"pricing-single-plan-addons\": \"playlist-add\",\n \"pricing-tiers-billing-toggle\": \"currency-dollar\",\n \"pricing-usage-calculator\": \"calculator\",\n \"problem-solution\": \"arrows-exchange\",\n \"product-compare-slider\": \"arrows-left-right\",\n \"product-configurator\": \"adjustments\",\n \"public-roadmap\": \"map-2\",\n \"reader-poll\": \"chart-bar-popular\",\n \"recipe\": \"chef-hat\",\n \"references-web\": \"link\",\n \"related-posts\": \"arrows-shuffle\",\n \"resource-library\": \"books\",\n \"responsive-layout-settings\": \"apps\",\n \"restaurant-menu\": \"tools-kitchen-2\",\n \"review-summary\": \"stars\",\n \"rich-blog-post\": \"news\",\n \"rich-text-embedded-components\": \"chef-hat\",\n \"roi-calculator\": \"calculator\",\n \"safe-embed\": \"frame\",\n \"scrollytelling\": \"arrows-down\",\n \"search-results-page\": \"search\",\n \"section-theme-tokens\": \"quote\",\n \"stats-band\": \"chart-bar\",\n \"steps-how-it-works\": \"list-numbers\",\n \"sticky-mobile-cta-bar\": \"layout-bottombar-expand\",\n \"stockist-map\": \"map-pin\",\n \"table-comparison\": \"table\",\n \"tabs-with-media\": \"browser\",\n \"team-grid\": \"users\",\n \"testimonial-grid\": \"message-star\",\n \"testimonial-video-slider\": \"video\",\n \"timeline-company-history\": \"timeline\",\n \"ugc-social-feed\": \"brand-instagram\",\n \"values-culture\": \"heart-handshake\",\n \"video-section\": \"player-play\",\n \"wall-of-love\": \"heart\",\n \"webinar-registration\": \"presentation\",\n});\n"],"mappings":";;AAIA,IAAa,gBAAwD,OAAO,OAAO;CACjF,4BAA4B;CAC5B,kBAAkB;CAClB,gCAAgC;CAChC,0BAA0B;CAC1B,cAAc;CACd,yBAAyB;CACzB,uBAAuB;CACvB,0BAA0B;CAC1B,cAAc;CACd,qBAAqB;CACrB,gBAAgB;CAChB,cAAc;CACd,oBAAoB;CACpB,uBAAuB;CACvB,aAAa;CACb,+BAA+B;CAC/B,mBAAmB;CACnB,qBAAqB;CACrB,aAAa;CACb,2BAA2B;CAC3B,4BAA4B;CAC5B,qCAAqC;CACrC,6BAA6B;CAC7B,+BAA+B;CAC/B,2BAA2B;CAC3B,+BAA+B;CAC/B,4BAA4B;CAC5B,0BAA0B;CAC1B,uBAAuB;CACvB,0BAA0B;CAC1B,6BAA6B;CAC7B,6BAA6B;CAC7B,4BAA4B;CAC5B,8BAA8B;CAC9B,uBAAuB;CACvB,gCAAgC;CAChC,2BAA2B;CAC3B,8BAA8B;CAC9B,iCAAiC;CACjC,kCAAkC;CAClC,2BAA2B;CAC3B,gCAAgC;CAChC,kBAAkB;CAClB,cAAc;CACd,YAAY;CACZ,aAAa;CACb,qBAAqB;CACrB,iBAAiB;CACjB,gBAAgB;CAChB,aAAa;CACb,0BAA0B;CAC1B,qBAAqB;CACrB,oBAAoB;CACpB,aAAa;CACb,yBAAyB;CACzB,gBAAgB;CAChB,eAAe;CACf,4BAA4B;CAC5B,qBAAqB;CACrB,yBAAyB;CACzB,kBAAkB;CAClB,uBAAuB;CACvB,iCAAiC;CACjC,YAAY;CACZ,oBAAoB;CACpB,qBAAqB;CACrB,0BAA0B;CAC1B,cAAc;CACd,kBAAkB;CAClB,kBAAkB;CAClB,qBAAqB;CACrB,gBAAgB;CAChB,eAAe;CACf,eAAe;CACf,oBAAoB;CACpB,0BAA0B;CAC1B,cAAc;CACd,wBAAwB;CACxB,kBAAkB;CAClB,qBAAqB;CACrB,+BAA+B;CAC/B,eAAe;CACf,cAAc;CACd,mBAAmB;CACnB,gBAAgB;CAChB,4BAA4B;CAC5B,qBAAqB;CACrB,iBAAiB;CACjB,uBAAuB;CACvB,cAAc;CACd,wBAAwB;CACxB,mBAAmB;CACnB,wBAAwB;CACxB,4BAA4B;CAC5B,oBAAoB;CACpB,wBAAwB;CACxB,qBAAqB;CACrB,2BAA2B;CAC3B,kBAAkB;CAClB,0BAA0B;CAC1B,yBAAyB;CACzB,0BAA0B;CAC1B,qBAAqB;CACrB,mBAAmB;CACnB,wBAAwB;CACxB,uBAAuB;CACvB,aAAa;CACb,kBAAkB;CAClB,iCAAiC;CACjC,2BAA2B;CAC3B,eAAe;CACf,0BAA0B;CAC1B,8BAA8B;CAC9B,gCAAgC;CAChC,4BAA4B;CAC5B,oBAAoB;CACpB,0BAA0B;CAC1B,wBAAwB;CACxB,kBAAkB;CAClB,eAAe;CACf,UAAU;CACV,kBAAkB;CAClB,iBAAiB;CACjB,oBAAoB;CACpB,8BAA8B;CAC9B,mBAAmB;CACnB,kBAAkB;CAClB,kBAAkB;CAClB,iCAAiC;CACjC,kBAAkB;CAClB,cAAc;CACd,kBAAkB;CAClB,uBAAuB;CACvB,wBAAwB;CACxB,cAAc;CACd,sBAAsB;CACtB,yBAAyB;CACzB,gBAAgB;CAChB,oBAAoB;CACpB,mBAAmB;CACnB,aAAa;CACb,oBAAoB;CACpB,4BAA4B;CAC5B,4BAA4B;CAC5B,mBAAmB;CACnB,kBAAkB;CAClB,iBAAiB;CACjB,gBAAgB;CAChB,wBAAwB;AAC1B,CAAC"}
|
package/dist/library/export.d.ts
CHANGED
|
@@ -40,3 +40,6 @@ export declare const slugOf: (s: string) => string;
|
|
|
40
40
|
export declare function buildKitExport(items?: CatalogItem[]): KitExport;
|
|
41
41
|
/** One entry per line, so a kit change diffs as the entries it touched. */
|
|
42
42
|
export declare function serializeKitExport(x: KitExport): string;
|
|
43
|
+
export declare const KIT_ENTRY_ICONS_FILE = "src/library/entry-icons.ts";
|
|
44
|
+
/** src/library/entry-icons.ts: each catalog entry's id → its component.icon, a small module apart from the catalog. */
|
|
45
|
+
export declare function serializeEntryIcons(x: KitExport): string;
|
package/dist/library/export.js
CHANGED
|
@@ -74,7 +74,22 @@ function serializeKitExport(x) {
|
|
|
74
74
|
tags: x.tags
|
|
75
75
|
}, null, 1).replace(/\n}$/, "")},\n "entries": [\n${x.entries.map((e) => ` ${JSON.stringify(e)}`).join(",\n")}\n ]\n}\n`;
|
|
76
76
|
}
|
|
77
|
+
var KIT_ENTRY_ICONS_FILE = "src/library/entry-icons.ts";
|
|
78
|
+
/** src/library/entry-icons.ts: each catalog entry's id → its component.icon, a small module apart from the catalog. */
|
|
79
|
+
function serializeEntryIcons(x) {
|
|
80
|
+
const rows = x.entries.filter((e) => typeof e.component.icon === "string").sort((a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : 0).map((e) => ` ${JSON.stringify(e.id)}: ${JSON.stringify(e.component.icon)},`);
|
|
81
|
+
return [
|
|
82
|
+
`// GENERATED from the kit's Library by scripts/kit-export.ts (with kit-catalog.json). Do not edit. Regenerate (${KIT_EXPORT_REGENERATE}).`,
|
|
83
|
+
`import type { DockIconName } from "../adapters/prod-types";`,
|
|
84
|
+
``,
|
|
85
|
+
`/** Each Kit Library entry's id → its component's icon (a BetterCMS icon name), without loading the catalog. */`,
|
|
86
|
+
`export const kitEntryIcons: Readonly<Record<string, DockIconName>> = Object.freeze({`,
|
|
87
|
+
...rows,
|
|
88
|
+
`});`,
|
|
89
|
+
``
|
|
90
|
+
].join("\n");
|
|
91
|
+
}
|
|
77
92
|
//#endregion
|
|
78
|
-
export { KIT_EXPORT_FILE, KIT_EXPORT_REGENERATE, buildKitExport, serializeKitExport, slugOf };
|
|
93
|
+
export { KIT_ENTRY_ICONS_FILE, KIT_EXPORT_FILE, KIT_EXPORT_REGENERATE, buildKitExport, serializeEntryIcons, serializeKitExport, slugOf };
|
|
79
94
|
|
|
80
95
|
//# sourceMappingURL=export.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.js","names":[],"sources":["../../src/library/export.ts"],"sourcesContent":["/**\n * The Kit Library as data for agents: every catalog entry (KIT_LIBRARY + the core EXAMPLES) with its category,\n * edge tags, model notes and its schema in the props shape create_component accepts (fromTypeSchema(schema, \"props\")).\n *\n * scripts/kit-export.ts writes it to packages/kit/src/library/kit-catalog.json (checked in) and to the backend, where the MCP\n * serves it as bettercms://kit and the bettercms skill ships it as references/kit-catalog.md. The export test fails\n * when the checked-in file is stale. Pure: no fs, no React.\n */\nimport { fromTypeSchema } from \"../adapters/schema\";\nimport { fieldConfigContract } from \"../adapters/lossy\";\nimport { CATALOG, CATEGORY_ORDER, CORE_CATEGORY, EDGE_TAGS, type CatalogItem } from \"./catalog\";\n\nexport const KIT_EXPORT_FILE = \"src/library/kit-catalog.json\";\nexport const KIT_EXPORT_REGENERATE = \"bun run --cwd packages/kit kit:export\";\n\nexport interface KitExportEntry {\n id: string;\n name: string;\n category: string;\n /** The V2 schema's kind: \"block\" (a section), \"global\" (site chrome), \"entry\" or \"page\". */\n kind: string;\n tags: string[];\n proves: string;\n why: string;\n htmlSignals: string[];\n mcp: string;\n pitfalls: string[];\n /** Kit features the stored component cannot carry (variants, globals...), by name. */\n notCarried: string[];\n /** create_component's shape: name, slug, description, category, icon, preview, props. */\n component: Record<string, unknown>;\n}\nexport interface KitExport {\n $comment: string;\n categories: { name: string; slug: string; entries: string[] }[];\n tags: { tag: string; label: string; hint: string; entries: string[] }[];\n entries: KitExportEntry[];\n /** Which field config keys the kit reads per type, which the host reads, and which only the server reads (lossy.ts). */\n fieldConfig: ReturnType<typeof fieldConfigContract>;\n}\n\nexport const slugOf = (s: string) => s.toLowerCase().replace(/&/g, \" \").replace(/[^a-z0-9]+/g, \"-\").replace(/^-|-$/g, \"\");\n\n/** `helpText: null` is the adapter's \"no help\" marker: dropped, the backend's default is the same. */\nconst compact = (v: unknown): unknown => {\n if (Array.isArray(v)) return v.map(compact);\n if (!v || typeof v !== \"object\") return v;\n const out: Record<string, unknown> = {};\n for (const [k, x] of Object.entries(v)) if (!(k === \"helpText\" && x === null)) out[k] = compact(x);\n return out;\n};\n\n/**\n * An entry's component is exactly what the adapter stores (facet table rows 23/24: nothing is cut on export). A showIf\n * on `_variant` is a prop rule the backend keeps; a slot's allow names resolve to the project's components in the\n * dock, and a slot none of whose names is one takes any component (dock-v2 kitProps slotField).\n */\nfunction entryOf(it: CatalogItem): KitExportEntry {\n const r = fromTypeSchema(it.ex.schema, \"props\");\n const n = it.notes;\n const component = compact(r.schema) as Record<string, unknown>;\n return {\n id: it.id,\n name: it.ex.label,\n category: it.category,\n kind: it.ex.schema.kind,\n tags: [...it.tags],\n proves: it.ex.proves,\n why: n?.why ?? \"\",\n htmlSignals: n?.htmlSignals ?? [],\n mcp: n?.mcp ?? \"\",\n pitfalls: n?.pitfalls ?? [],\n notCarried: [...new Set([...r.lossy, ...r.catalog].map((x) => x.feature))].sort(),\n component,\n };\n}\n\nexport function buildKitExport(items: CatalogItem[] = CATALOG): KitExport {\n const entries = items.map(entryOf);\n const cats = [...CATEGORY_ORDER, CORE_CATEGORY] as string[];\n return {\n $comment: `GENERATED from the kit's Library (packages/kit) (KIT_LIBRARY + EXAMPLES) by scripts/kit-export.ts. Do not edit. Regenerate (${KIT_EXPORT_REGENERATE}).`,\n categories: cats\n .map((name) => ({ name, slug: slugOf(name), entries: entries.filter((e) => e.category === name).map((e) => e.id) }))\n .filter((c) => c.entries.length),\n tags: EDGE_TAGS.map(({ tag, label, hint }) => ({ tag, label, hint, entries: entries.filter((e) => e.tags.includes(tag)).map((e) => e.id) })),\n entries,\n fieldConfig: fieldConfigContract(),\n };\n}\n\n/** One entry per line, so a kit change diffs as the entries it touched. */\nexport function serializeKitExport(x: KitExport): string {\n const head = JSON.stringify({ $comment: x.$comment, fieldConfig: x.fieldConfig, categories: x.categories, tags: x.tags }, null, 1).replace(/\\n}$/, \"\");\n return `${head},\\n \"entries\": [\\n${x.entries.map((e) => ` ${JSON.stringify(e)}`).join(\",\\n\")}\\n ]\\n}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;AAYA,IAAa,kBAAkB;AAC/B,IAAa,wBAAwB;AA4BrC,IAAa,UAAU,MAAc,EAAE,YAAY,CAAC,CAAC,QAAQ,MAAM,GAAG,CAAC,CAAC,QAAQ,eAAe,GAAG,CAAC,CAAC,QAAQ,UAAU,EAAE;;AAGxH,IAAM,WAAW,MAAwB;CACvC,IAAI,MAAM,QAAQ,CAAC,GAAG,OAAO,EAAE,IAAI,OAAO;CAC1C,IAAI,CAAC,KAAK,OAAO,MAAM,UAAU,OAAO;CACxC,MAAM,MAA+B,CAAC;CACtC,KAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,CAAC,GAAG,IAAI,EAAE,MAAM,cAAc,MAAM,OAAO,IAAI,KAAK,QAAQ,CAAC;CACjG,OAAO;AACT;;;;;;AAOA,SAAS,QAAQ,IAAiC;CAChD,MAAM,IAAI,eAAe,GAAG,GAAG,QAAQ,OAAO;CAC9C,MAAM,IAAI,GAAG;CACb,MAAM,YAAY,QAAQ,EAAE,MAAM;CAClC,OAAO;EACL,IAAI,GAAG;EACP,MAAM,GAAG,GAAG;EACZ,UAAU,GAAG;EACb,MAAM,GAAG,GAAG,OAAO;EACnB,MAAM,CAAC,GAAG,GAAG,IAAI;EACjB,QAAQ,GAAG,GAAG;EACd,KAAK,GAAG,OAAO;EACf,aAAa,GAAG,eAAe,CAAC;EAChC,KAAK,GAAG,OAAO;EACf,UAAU,GAAG,YAAY,CAAC;EAC1B,YAAY,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,KAAK,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK;EAChF;CACF;AACF;AAEA,SAAgB,eAAe,QAAuB,SAAoB;CACxE,MAAM,UAAU,MAAM,IAAI,OAAO;CACjC,MAAM,OAAO,CAAC,GAAG,gBAAgB,aAAa;CAC9C,OAAO;EACL,UAAU,+HAA+H,sBAAsB;EAC/J,YAAY,KACT,KAAK,UAAU;GAAE;GAAM,MAAM,OAAO,IAAI;GAAG,SAAS,QAAQ,QAAQ,MAAM,EAAE,aAAa,IAAI,CAAC,CAAC,KAAK,MAAM,EAAE,EAAE;EAAE,EAAE,CAAC,CACnH,QAAQ,MAAM,EAAE,QAAQ,MAAM;EACjC,MAAM,UAAU,KAAK,EAAE,KAAK,OAAO,YAAY;GAAE;GAAK;GAAO;GAAM,SAAS,QAAQ,QAAQ,MAAM,EAAE,KAAK,SAAS,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,EAAE;EAAE,EAAE;EAC3I;EACA,aAAa,oBAAoB;CACnC;AACF;;AAGA,SAAgB,mBAAmB,GAAsB;CAEvD,OAAO,GADM,KAAK,UAAU;EAAE,UAAU,EAAE;EAAU,aAAa,EAAE;EAAa,YAAY,EAAE;EAAY,MAAM,EAAE;CAAK,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,QAAQ,EACzI,EAAK,oBAAoB,EAAE,QAAQ,KAAK,MAAM,KAAK,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,EAAE;AAChG"}
|
|
1
|
+
{"version":3,"file":"export.js","names":[],"sources":["../../src/library/export.ts"],"sourcesContent":["/**\n * The Kit Library as data for agents: every catalog entry (KIT_LIBRARY + the core EXAMPLES) with its category,\n * edge tags, model notes and its schema in the props shape create_component accepts (fromTypeSchema(schema, \"props\")).\n *\n * scripts/kit-export.ts writes it to packages/kit/src/library/kit-catalog.json (checked in) and to the backend, where the MCP\n * serves it as bettercms://kit and the bettercms skill ships it as references/kit-catalog.md. The export test fails\n * when the checked-in file is stale. Pure: no fs, no React.\n */\nimport { fromTypeSchema } from \"../adapters/schema\";\nimport { fieldConfigContract } from \"../adapters/lossy\";\nimport { CATALOG, CATEGORY_ORDER, CORE_CATEGORY, EDGE_TAGS, type CatalogItem } from \"./catalog\";\n\nexport const KIT_EXPORT_FILE = \"src/library/kit-catalog.json\";\nexport const KIT_EXPORT_REGENERATE = \"bun run --cwd packages/kit kit:export\";\n\nexport interface KitExportEntry {\n id: string;\n name: string;\n category: string;\n /** The V2 schema's kind: \"block\" (a section), \"global\" (site chrome), \"entry\" or \"page\". */\n kind: string;\n tags: string[];\n proves: string;\n why: string;\n htmlSignals: string[];\n mcp: string;\n pitfalls: string[];\n /** Kit features the stored component cannot carry (variants, globals...), by name. */\n notCarried: string[];\n /** create_component's shape: name, slug, description, category, icon, preview, props. */\n component: Record<string, unknown>;\n}\nexport interface KitExport {\n $comment: string;\n categories: { name: string; slug: string; entries: string[] }[];\n tags: { tag: string; label: string; hint: string; entries: string[] }[];\n entries: KitExportEntry[];\n /** Which field config keys the kit reads per type, which the host reads, and which only the server reads (lossy.ts). */\n fieldConfig: ReturnType<typeof fieldConfigContract>;\n}\n\nexport const slugOf = (s: string) => s.toLowerCase().replace(/&/g, \" \").replace(/[^a-z0-9]+/g, \"-\").replace(/^-|-$/g, \"\");\n\n/** `helpText: null` is the adapter's \"no help\" marker: dropped, the backend's default is the same. */\nconst compact = (v: unknown): unknown => {\n if (Array.isArray(v)) return v.map(compact);\n if (!v || typeof v !== \"object\") return v;\n const out: Record<string, unknown> = {};\n for (const [k, x] of Object.entries(v)) if (!(k === \"helpText\" && x === null)) out[k] = compact(x);\n return out;\n};\n\n/**\n * An entry's component is exactly what the adapter stores (facet table rows 23/24: nothing is cut on export). A showIf\n * on `_variant` is a prop rule the backend keeps; a slot's allow names resolve to the project's components in the\n * dock, and a slot none of whose names is one takes any component (dock-v2 kitProps slotField).\n */\nfunction entryOf(it: CatalogItem): KitExportEntry {\n const r = fromTypeSchema(it.ex.schema, \"props\");\n const n = it.notes;\n const component = compact(r.schema) as Record<string, unknown>;\n return {\n id: it.id,\n name: it.ex.label,\n category: it.category,\n kind: it.ex.schema.kind,\n tags: [...it.tags],\n proves: it.ex.proves,\n why: n?.why ?? \"\",\n htmlSignals: n?.htmlSignals ?? [],\n mcp: n?.mcp ?? \"\",\n pitfalls: n?.pitfalls ?? [],\n notCarried: [...new Set([...r.lossy, ...r.catalog].map((x) => x.feature))].sort(),\n component,\n };\n}\n\nexport function buildKitExport(items: CatalogItem[] = CATALOG): KitExport {\n const entries = items.map(entryOf);\n const cats = [...CATEGORY_ORDER, CORE_CATEGORY] as string[];\n return {\n $comment: `GENERATED from the kit's Library (packages/kit) (KIT_LIBRARY + EXAMPLES) by scripts/kit-export.ts. Do not edit. Regenerate (${KIT_EXPORT_REGENERATE}).`,\n categories: cats\n .map((name) => ({ name, slug: slugOf(name), entries: entries.filter((e) => e.category === name).map((e) => e.id) }))\n .filter((c) => c.entries.length),\n tags: EDGE_TAGS.map(({ tag, label, hint }) => ({ tag, label, hint, entries: entries.filter((e) => e.tags.includes(tag)).map((e) => e.id) })),\n entries,\n fieldConfig: fieldConfigContract(),\n };\n}\n\n/** One entry per line, so a kit change diffs as the entries it touched. */\nexport function serializeKitExport(x: KitExport): string {\n const head = JSON.stringify({ $comment: x.$comment, fieldConfig: x.fieldConfig, categories: x.categories, tags: x.tags }, null, 1).replace(/\\n}$/, \"\");\n return `${head},\\n \"entries\": [\\n${x.entries.map((e) => ` ${JSON.stringify(e)}`).join(\",\\n\")}\\n ]\\n}\\n`;\n}\n\nexport const KIT_ENTRY_ICONS_FILE = \"src/library/entry-icons.ts\";\n\n/** src/library/entry-icons.ts: each catalog entry's id → its component.icon, a small module apart from the catalog. */\nexport function serializeEntryIcons(x: KitExport): string {\n const rows = x.entries\n .filter((e) => typeof e.component.icon === \"string\")\n .sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0))\n .map((e) => ` ${JSON.stringify(e.id)}: ${JSON.stringify(e.component.icon)},`);\n return [\n `// GENERATED from the kit's Library by scripts/kit-export.ts (with kit-catalog.json). Do not edit. Regenerate (${KIT_EXPORT_REGENERATE}).`,\n `import type { DockIconName } from \"../adapters/prod-types\";`,\n ``,\n `/** Each Kit Library entry's id → its component's icon (a BetterCMS icon name), without loading the catalog. */`,\n `export const kitEntryIcons: Readonly<Record<string, DockIconName>> = Object.freeze({`,\n ...rows,\n `});`,\n ``,\n ].join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;AAYA,IAAa,kBAAkB;AAC/B,IAAa,wBAAwB;AA4BrC,IAAa,UAAU,MAAc,EAAE,YAAY,CAAC,CAAC,QAAQ,MAAM,GAAG,CAAC,CAAC,QAAQ,eAAe,GAAG,CAAC,CAAC,QAAQ,UAAU,EAAE;;AAGxH,IAAM,WAAW,MAAwB;CACvC,IAAI,MAAM,QAAQ,CAAC,GAAG,OAAO,EAAE,IAAI,OAAO;CAC1C,IAAI,CAAC,KAAK,OAAO,MAAM,UAAU,OAAO;CACxC,MAAM,MAA+B,CAAC;CACtC,KAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,CAAC,GAAG,IAAI,EAAE,MAAM,cAAc,MAAM,OAAO,IAAI,KAAK,QAAQ,CAAC;CACjG,OAAO;AACT;;;;;;AAOA,SAAS,QAAQ,IAAiC;CAChD,MAAM,IAAI,eAAe,GAAG,GAAG,QAAQ,OAAO;CAC9C,MAAM,IAAI,GAAG;CACb,MAAM,YAAY,QAAQ,EAAE,MAAM;CAClC,OAAO;EACL,IAAI,GAAG;EACP,MAAM,GAAG,GAAG;EACZ,UAAU,GAAG;EACb,MAAM,GAAG,GAAG,OAAO;EACnB,MAAM,CAAC,GAAG,GAAG,IAAI;EACjB,QAAQ,GAAG,GAAG;EACd,KAAK,GAAG,OAAO;EACf,aAAa,GAAG,eAAe,CAAC;EAChC,KAAK,GAAG,OAAO;EACf,UAAU,GAAG,YAAY,CAAC;EAC1B,YAAY,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,KAAK,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK;EAChF;CACF;AACF;AAEA,SAAgB,eAAe,QAAuB,SAAoB;CACxE,MAAM,UAAU,MAAM,IAAI,OAAO;CACjC,MAAM,OAAO,CAAC,GAAG,gBAAgB,aAAa;CAC9C,OAAO;EACL,UAAU,+HAA+H,sBAAsB;EAC/J,YAAY,KACT,KAAK,UAAU;GAAE;GAAM,MAAM,OAAO,IAAI;GAAG,SAAS,QAAQ,QAAQ,MAAM,EAAE,aAAa,IAAI,CAAC,CAAC,KAAK,MAAM,EAAE,EAAE;EAAE,EAAE,CAAC,CACnH,QAAQ,MAAM,EAAE,QAAQ,MAAM;EACjC,MAAM,UAAU,KAAK,EAAE,KAAK,OAAO,YAAY;GAAE;GAAK;GAAO;GAAM,SAAS,QAAQ,QAAQ,MAAM,EAAE,KAAK,SAAS,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,EAAE;EAAE,EAAE;EAC3I;EACA,aAAa,oBAAoB;CACnC;AACF;;AAGA,SAAgB,mBAAmB,GAAsB;CAEvD,OAAO,GADM,KAAK,UAAU;EAAE,UAAU,EAAE;EAAU,aAAa,EAAE;EAAa,YAAY,EAAE;EAAY,MAAM,EAAE;CAAK,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,QAAQ,EACzI,EAAK,oBAAoB,EAAE,QAAQ,KAAK,MAAM,KAAK,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,EAAE;AAChG;AAEA,IAAa,uBAAuB;;AAGpC,SAAgB,oBAAoB,GAAsB;CACxD,MAAM,OAAO,EAAE,QACZ,QAAQ,MAAM,OAAO,EAAE,UAAU,SAAS,QAAQ,CAAC,CACnD,MAAM,GAAG,MAAO,EAAE,KAAK,EAAE,KAAK,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,CAAE,CAAC,CACxD,KAAK,MAAM,KAAK,KAAK,UAAU,EAAE,EAAE,EAAE,IAAI,KAAK,UAAU,EAAE,UAAU,IAAI,EAAE,EAAE;CAC/E,OAAO;EACL,kHAAkH,sBAAsB;EACxI;EACA;EACA;EACA;EACA,GAAG;EACH;EACA;CACF,CAAC,CAAC,KAAK,IAAI;AACb"}
|
package/dist/library/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Import it only from lazy chunks: the catalog is large and must stay out of the main bundle.
|
|
7
7
|
*/
|
|
8
8
|
export { KIT_LIBRARY } from "./entries";
|
|
9
|
+
export { kitEntryIcons } from "./entry-icons";
|
|
9
10
|
export * from "./types";
|
|
10
11
|
export { BLOCK_LIBRARY, EXAMPLES, resolveExampleBlock, type KitExample } from "./examples";
|
|
11
12
|
export * from "./catalog";
|
package/dist/library/index.js
CHANGED
|
@@ -3,4 +3,5 @@ import { BLOCK_LIBRARY, EXAMPLES, resolveExampleBlock } from "./examples/index.j
|
|
|
3
3
|
import { KIT_LIBRARY } from "./entries/index.js";
|
|
4
4
|
import { CATALOG, CATEGORY_ORDER, CORE_CATEGORY, EDGE_TAGS, LIBRARY_BLOCKS, PICKABLE_BLOCKS, TAG_LABEL, blocksFor, buildCatalog, categoriesOf, matches, resolveLibraryBlock, termsOf } from "./catalog.js";
|
|
5
5
|
import { coverageOf } from "./coverage.js";
|
|
6
|
-
|
|
6
|
+
import { kitEntryIcons } from "./entry-icons.js";
|
|
7
|
+
export { BLOCK_LIBRARY, CATALOG, CATEGORY_ORDER, CORE_CATEGORY, EDGE_TAGS, EXAMPLES, FEATURE_COLUMNS, KIT_LIBRARY, LIBRARY_BLOCKS, PICKABLE_BLOCKS, TAG_LABEL, TYPE_COLUMNS, blocksFor, buildCatalog, categoriesOf, coverageOf, kitEntryIcons, matches, resolveExampleBlock, resolveLibraryBlock, statsOf, termsOf };
|