@conversokit/widgets 0.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.
- package/LICENSE +201 -0
- package/dist/AddToCartPanel.d.ts +11 -0
- package/dist/AddToCartPanel.d.ts.map +1 -0
- package/dist/AddToCartPanel.js +62 -0
- package/dist/AlertFeed.d.ts +9 -0
- package/dist/AlertFeed.d.ts.map +1 -0
- package/dist/AlertFeed.js +67 -0
- package/dist/AnalyticsPanel.d.ts +8 -0
- package/dist/AnalyticsPanel.d.ts.map +1 -0
- package/dist/AnalyticsPanel.js +24 -0
- package/dist/AvailabilityCalendar.d.ts +25 -0
- package/dist/AvailabilityCalendar.d.ts.map +1 -0
- package/dist/AvailabilityCalendar.js +104 -0
- package/dist/BookingCard.d.ts +9 -0
- package/dist/BookingCard.d.ts.map +1 -0
- package/dist/BookingCard.js +62 -0
- package/dist/CTABanner.d.ts +35 -0
- package/dist/CTABanner.d.ts.map +1 -0
- package/dist/CTABanner.js +72 -0
- package/dist/CheckoutSummary.d.ts +11 -0
- package/dist/CheckoutSummary.d.ts.map +1 -0
- package/dist/CheckoutSummary.js +70 -0
- package/dist/ConsentBanner.d.ts +30 -0
- package/dist/ConsentBanner.d.ts.map +1 -0
- package/dist/ConsentBanner.js +82 -0
- package/dist/DestinationRecommendations.d.ts +57 -0
- package/dist/DestinationRecommendations.d.ts.map +1 -0
- package/dist/DestinationRecommendations.js +43 -0
- package/dist/FlightSummary.d.ts +10 -0
- package/dist/FlightSummary.d.ts.map +1 -0
- package/dist/FlightSummary.js +50 -0
- package/dist/HotelCard.d.ts +10 -0
- package/dist/HotelCard.d.ts.map +1 -0
- package/dist/HotelCard.js +52 -0
- package/dist/ItineraryTimeline.d.ts +8 -0
- package/dist/ItineraryTimeline.d.ts.map +1 -0
- package/dist/ItineraryTimeline.js +56 -0
- package/dist/KPIGrid.d.ts +46 -0
- package/dist/KPIGrid.d.ts.map +1 -0
- package/dist/KPIGrid.js +53 -0
- package/dist/LeadCaptureForm.d.ts +14 -0
- package/dist/LeadCaptureForm.d.ts.map +1 -0
- package/dist/LeadCaptureForm.js +84 -0
- package/dist/MultiStepForm.d.ts +11 -0
- package/dist/MultiStepForm.d.ts.map +1 -0
- package/dist/MultiStepForm.js +60 -0
- package/dist/ProductCard.d.ts +17 -0
- package/dist/ProductCard.d.ts.map +1 -0
- package/dist/ProductCard.js +70 -0
- package/dist/ProductCarousel.d.ts +58 -0
- package/dist/ProductCarousel.d.ts.map +1 -0
- package/dist/ProductCarousel.js +31 -0
- package/dist/TimeSlotSelector.d.ts +10 -0
- package/dist/TimeSlotSelector.d.ts.map +1 -0
- package/dist/TimeSlotSelector.js +46 -0
- package/dist/TrendChart.d.ts +10 -0
- package/dist/TrendChart.d.ts.map +1 -0
- package/dist/TrendChart.js +50 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/registry.d.ts +6 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +50 -0
- package/package.json +52 -0
package/dist/registry.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ProductCardMeta } from './ProductCard.js';
|
|
2
|
+
import { ProductCarouselMeta } from './ProductCarousel.js';
|
|
3
|
+
import { ConsentBannerMeta } from './ConsentBanner.js';
|
|
4
|
+
import { CheckoutSummaryMeta } from './CheckoutSummary.js';
|
|
5
|
+
import { AddToCartPanelMeta } from './AddToCartPanel.js';
|
|
6
|
+
import { AvailabilityCalendarMeta } from './AvailabilityCalendar.js';
|
|
7
|
+
import { TimeSlotSelectorMeta } from './TimeSlotSelector.js';
|
|
8
|
+
import { BookingCardMeta } from './BookingCard.js';
|
|
9
|
+
import { LeadCaptureFormMeta } from './LeadCaptureForm.js';
|
|
10
|
+
import { MultiStepFormMeta } from './MultiStepForm.js';
|
|
11
|
+
import { CTABannerMeta } from './CTABanner.js';
|
|
12
|
+
import { HotelCardMeta } from './HotelCard.js';
|
|
13
|
+
import { FlightSummaryMeta } from './FlightSummary.js';
|
|
14
|
+
import { ItineraryTimelineMeta } from './ItineraryTimeline.js';
|
|
15
|
+
import { DestinationRecommendationsMeta } from './DestinationRecommendations.js';
|
|
16
|
+
import { KPIGridMeta } from './KPIGrid.js';
|
|
17
|
+
import { TrendChartMeta } from './TrendChart.js';
|
|
18
|
+
import { AnalyticsPanelMeta } from './AnalyticsPanel.js';
|
|
19
|
+
import { AlertFeedMeta } from './AlertFeed.js';
|
|
20
|
+
const allMeta = [
|
|
21
|
+
ProductCardMeta,
|
|
22
|
+
ProductCarouselMeta,
|
|
23
|
+
CheckoutSummaryMeta,
|
|
24
|
+
AddToCartPanelMeta,
|
|
25
|
+
AvailabilityCalendarMeta,
|
|
26
|
+
TimeSlotSelectorMeta,
|
|
27
|
+
BookingCardMeta,
|
|
28
|
+
LeadCaptureFormMeta,
|
|
29
|
+
MultiStepFormMeta,
|
|
30
|
+
CTABannerMeta,
|
|
31
|
+
ConsentBannerMeta,
|
|
32
|
+
HotelCardMeta,
|
|
33
|
+
FlightSummaryMeta,
|
|
34
|
+
ItineraryTimelineMeta,
|
|
35
|
+
DestinationRecommendationsMeta,
|
|
36
|
+
KPIGridMeta,
|
|
37
|
+
TrendChartMeta,
|
|
38
|
+
AnalyticsPanelMeta,
|
|
39
|
+
AlertFeedMeta
|
|
40
|
+
];
|
|
41
|
+
export const widgetRegistry = Object.fromEntries(allMeta.map((m) => [m.name, m]));
|
|
42
|
+
export function registerWidget(meta) {
|
|
43
|
+
widgetRegistry[meta.name] = meta;
|
|
44
|
+
}
|
|
45
|
+
export function getWidget(name) {
|
|
46
|
+
return widgetRegistry[name];
|
|
47
|
+
}
|
|
48
|
+
export function listWidgets() {
|
|
49
|
+
return Object.values(widgetRegistry);
|
|
50
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@conversokit/widgets",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "19 themed React widgets for ConversoKit (commerce, booking, lead-gen, travel, dashboard, consent) — every widget styled via `--ck-*` CSS variables.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/Xyborg/ConversoKit.git",
|
|
9
|
+
"directory": "packages/widgets"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/Xyborg/ConversoKit#readme",
|
|
12
|
+
"bugs": "https://github.com/Xyborg/ConversoKit/issues",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"main": "dist/index.js",
|
|
18
|
+
"module": "dist/index.js",
|
|
19
|
+
"types": "dist/index.d.ts",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@hookform/resolvers": "^3.3.4",
|
|
25
|
+
"date-fns": "^3.6.0",
|
|
26
|
+
"react-hook-form": "^7.51.0",
|
|
27
|
+
"zod": "^3.22.2",
|
|
28
|
+
"@conversokit/themes": "0.1.0",
|
|
29
|
+
"@conversokit/shared": "0.1.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": "^18.0.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@testing-library/react": "^14.2.0",
|
|
36
|
+
"@testing-library/jest-dom": "^6.4.0",
|
|
37
|
+
"@types/react": "^18.0.28",
|
|
38
|
+
"jsdom": "^24.0.0",
|
|
39
|
+
"react": "^18.2.0",
|
|
40
|
+
"react-dom": "^18.2.0",
|
|
41
|
+
"@types/react-dom": "^18.0.11",
|
|
42
|
+
"typescript": "^5.2.0",
|
|
43
|
+
"vitest": "^1.6.0"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsc --project tsconfig.json",
|
|
47
|
+
"dev": "tsc --project tsconfig.json --watch",
|
|
48
|
+
"typecheck": "tsc --noEmit",
|
|
49
|
+
"lint": "eslint src",
|
|
50
|
+
"test": "vitest run"
|
|
51
|
+
}
|
|
52
|
+
}
|