@contractspec/bundle.library 3.9.9 → 3.10.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 (44) hide show
  1. package/.turbo/turbo-build.log +54 -40
  2. package/CHANGELOG.md +48 -0
  3. package/README.md +1 -0
  4. package/dist/components/integrations/atoms/IntegrationCredentialFieldList.d.ts +6 -0
  5. package/dist/components/integrations/atoms/IntegrationCredentialFieldList.js +2 -0
  6. package/dist/components/integrations/atoms/IntegrationCredentialModeTabs.d.ts +7 -0
  7. package/dist/components/integrations/atoms/IntegrationCredentialModeTabs.js +2 -0
  8. package/dist/components/integrations/atoms/IntegrationEnvAliasPreview.d.ts +7 -0
  9. package/dist/components/integrations/atoms/IntegrationEnvAliasPreview.js +2 -0
  10. package/dist/components/integrations/blocks/IntegrationCredentialSetupBlock.d.ts +11 -0
  11. package/dist/components/integrations/blocks/IntegrationCredentialSetupBlock.js +2 -0
  12. package/dist/components/integrations/byok-env-ui-kit.test.d.ts +1 -0
  13. package/dist/components/integrations/helpers/credentialSetupAliases.d.ts +3 -0
  14. package/dist/components/integrations/helpers/credentialSetupAliases.js +2 -0
  15. package/dist/components/integrations/helpers/credentialSetupModel.d.ts +58 -0
  16. package/dist/components/integrations/helpers/credentialSetupModel.js +2 -0
  17. package/dist/components/integrations/index.d.ts +5 -0
  18. package/dist/components/integrations/index.js +2 -2
  19. package/dist/components/integrations/organisms/IntegrationSettings.d.ts +3 -1
  20. package/dist/components/integrations/organisms/IntegrationSettings.js +2 -2
  21. package/dist/components/integrations/organisms/IntegrationSettingsSecretReference.d.ts +8 -0
  22. package/dist/components/integrations/organisms/IntegrationSettingsSecretReference.js +2 -0
  23. package/dist/index.js +302 -302
  24. package/dist/node/components/integrations/atoms/IntegrationCredentialFieldList.js +1 -0
  25. package/dist/node/components/integrations/atoms/IntegrationCredentialModeTabs.js +1 -0
  26. package/dist/node/components/integrations/atoms/IntegrationEnvAliasPreview.js +1 -0
  27. package/dist/node/components/integrations/blocks/IntegrationCredentialSetupBlock.js +1 -0
  28. package/dist/node/components/integrations/helpers/credentialSetupAliases.js +1 -0
  29. package/dist/node/components/integrations/helpers/credentialSetupModel.js +1 -0
  30. package/dist/node/components/integrations/index.js +2 -2
  31. package/dist/node/components/integrations/organisms/IntegrationSettings.js +2 -2
  32. package/dist/node/components/integrations/organisms/IntegrationSettingsSecretReference.js +1 -0
  33. package/dist/node/index.js +302 -302
  34. package/package.json +107 -23
  35. package/src/components/integrations/atoms/IntegrationCredentialFieldList.tsx +51 -0
  36. package/src/components/integrations/atoms/IntegrationCredentialModeTabs.tsx +44 -0
  37. package/src/components/integrations/atoms/IntegrationEnvAliasPreview.tsx +56 -0
  38. package/src/components/integrations/blocks/IntegrationCredentialSetupBlock.tsx +95 -0
  39. package/src/components/integrations/byok-env-ui-kit.test.tsx +194 -0
  40. package/src/components/integrations/helpers/credentialSetupAliases.ts +137 -0
  41. package/src/components/integrations/helpers/credentialSetupModel.ts +218 -0
  42. package/src/components/integrations/index.ts +5 -0
  43. package/src/components/integrations/organisms/IntegrationSettings.tsx +91 -97
  44. package/src/components/integrations/organisms/IntegrationSettingsSecretReference.tsx +84 -0
@@ -1,8 +1,8 @@
1
1
  $ contractspec-bun-build prebuild
2
2
  $ bun run build:bundle && bun run build:types
3
3
  $ contractspec-bun-build transpile
4
- [contractspec-bun-build] transpile target=bun root=src entries=327 noBundle=false
5
- Bundled 327 modules in 152ms
4
+ [contractspec-bun-build] transpile target=bun root=src entries=334 noBundle=false
5
+ Bundled 334 modules in 119ms
6
6
 
7
7
  application/context-storage/index.js 0.85 KB (entry point)
8
8
  presentation/features/templates/types.js 8 bytes (entry point)
@@ -12,64 +12,64 @@ Bundled 327 modules in 152ms
12
12
  presentation/features/molecules/FeatureFilters/types.js 8 bytes (entry point)
13
13
  presentation/features/molecules/index.js 8.41 KB (entry point)
14
14
  presentation/features/index.js 50.56 KB (entry point)
15
- presentation/features/templates/FeatureOverviewTemplate/index.js 3.1 KB (entry point)
16
15
  presentation/features/templates/FeaturePresentationDetailTemplate/index.js 5.15 KB (entry point)
17
16
  presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js 5.15 KB (entry point)
18
17
  presentation/features/templates/FeaturePresentationDetailTemplate/types.js 8 bytes (entry point)
19
18
  presentation/features/templates/FeaturePresentationsTemplate/index.js 6.0 KB (entry point)
20
19
  presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js 6.0 KB (entry point)
21
20
  presentation/features/templates/FeatureFormsTemplate/index.js 5.97 KB (entry point)
22
- presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js 5.97 KB (entry point)
23
21
  presentation/features/templates/FeatureOperationDetailTemplate/index.js 4.92 KB (entry point)
24
22
  presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js 4.92 KB (entry point)
25
23
  presentation/features/templates/FeatureOperationDetailTemplate/types.js 8 bytes (entry point)
26
24
  presentation/features/templates/FeatureOperationsTemplate/index.js 3.41 KB (entry point)
27
25
  presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js 3.41 KB (entry point)
26
+ presentation/features/templates/FeatureOverviewTemplate/index.js 3.1 KB (entry point)
28
27
  presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js 3.1 KB (entry point)
29
28
  presentation/features/templates/FeatureEventDetailTemplate/index.js 5.1 KB (entry point)
30
- presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js 5.1 KB (entry point)
31
29
  presentation/features/templates/FeatureEventDetailTemplate/types.js 8 bytes (entry point)
32
30
  presentation/features/templates/FeatureEventsTemplate/index.js 5.96 KB (entry point)
33
31
  presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js 5.96 KB (entry point)
34
32
  presentation/features/templates/FeatureFormDetailTemplate/index.js 5.45 KB (entry point)
35
33
  presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js 5.45 KB (entry point)
36
34
  presentation/features/templates/FeatureFormDetailTemplate/types.js 8 bytes (entry point)
37
- presentation/features/organisms/FeatureOperationsList.js 2.77 KB (entry point)
35
+ presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js 5.97 KB (entry point)
38
36
  presentation/features/organisms/FeaturePresentationsList.js 5.35 KB (entry point)
39
37
  presentation/features/templates/FeatureDataViewDetailTemplate/index.js 5.51 KB (entry point)
40
38
  presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js 5.51 KB (entry point)
41
39
  presentation/features/templates/FeatureDataViewDetailTemplate/types.js 8 bytes (entry point)
42
40
  presentation/features/templates/FeatureDataViewsTemplate/index.js 5.98 KB (entry point)
43
41
  presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js 5.98 KB (entry point)
42
+ presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js 5.1 KB (entry point)
44
43
  presentation/features/organisms/FeatureDetail/index.js 2.49 KB (entry point)
45
- presentation/features/organisms/FeatureDetail/FeatureDetail.js 2.49 KB (entry point)
46
44
  presentation/features/organisms/FeatureDiscovery/index.js 15.59 KB (entry point)
47
45
  presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js 15.59 KB (entry point)
48
46
  presentation/features/organisms/FeatureEventsList.js 5.33 KB (entry point)
49
47
  presentation/features/organisms/FeatureFormsList.js 5.34 KB (entry point)
50
- presentation/features/molecules/FeatureCategoryHeader/index.js 1.30 KB (entry point)
48
+ presentation/features/organisms/FeatureOperationsList.js 2.77 KB (entry point)
51
49
  presentation/features/molecules/FeatureFilters/index.js 1.64 KB (entry point)
52
50
  presentation/features/molecules/FeatureFilters/FeatureFilters.js 1.64 KB (entry point)
53
51
  presentation/features/organisms/FeatureDataViewsList.js 5.34 KB (entry point)
52
+ presentation/features/organisms/FeatureDetail/FeatureDetail.js 2.49 KB (entry point)
54
53
  presentation/features/hooks/useRelatedDocs.js 0.77 KB (entry point)
55
54
  presentation/features/molecules/FeatureCard/index.js 5.88 KB (entry point)
56
55
  presentation/features/molecules/FeatureCard/FeatureCard.js 5.88 KB (entry point)
57
56
  presentation/features/molecules/FeatureHoverPreview/index.js 3.1 KB (entry point)
58
57
  presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js 3.1 KB (entry point)
59
58
  presentation/features/molecules/FeatureCard/types.js 8 bytes (entry point)
59
+ presentation/features/molecules/FeatureCategoryHeader/index.js 1.30 KB (entry point)
60
60
  presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js 1.30 KB (entry point)
61
- libs/posthog/native.js 0.77 KB (entry point)
62
61
  libs/posthog/server.js 455 bytes (entry point)
63
62
  libs/pricing-examples.js 473 bytes (entry point)
64
63
  presentation/features/atoms/index.js 1.46 KB (entry point)
65
64
  presentation/features/atoms/FeatureIcon/index.js 1.46 KB (entry point)
66
65
  presentation/features/atoms/FeatureIcon/FeatureIcon.js 1.46 KB (entry point)
67
66
  presentation/features/hooks/index.js 6.78 KB (entry point)
68
- presentation/features/hooks/useFeatureFilters.js 1.47 KB (entry point)
69
67
  presentation/features/hooks/useFeatureRegistry.js 3.0 KB (entry point)
70
68
  presentation/features/hooks/useContractsRegistry.js 5.0 KB (entry point)
69
+ presentation/features/hooks/useFeatureFilters.js 1.47 KB (entry point)
71
70
  libs/email/types.js 8 bytes (entry point)
72
71
  libs/posthog/client.js 1.29 KB (entry point)
72
+ libs/posthog/native.js 0.77 KB (entry point)
73
73
  ./index.js 0.82 MB (entry point)
74
74
  infrastructure/index.js 0.75 KB (entry point)
75
75
  infrastructure/elysia/index.js 0.75 KB (entry point)
@@ -78,24 +78,23 @@ Bundled 327 modules in 152ms
78
78
  libs/email/newsletter.js 4.73 KB (entry point)
79
79
  libs/email/waitlist-application.js 7.92 KB (entry point)
80
80
  libs/email/waitlist.js 5.35 KB (entry point)
81
- libs/email/client.js 2.16 KB (entry point)
82
81
  libs/email/utils.js 387 bytes (entry point)
82
+ libs/email/client.js 2.16 KB (entry point)
83
83
  config/index.js 2.58 KB (entry point)
84
84
  features/index.js 6.0 KB (entry point)
85
85
  features/registry.js 2.63 KB (entry point)
86
- features/mcp.feature.js 0.86 KB (entry point)
87
86
  features/presentations.feature.js 0.96 KB (entry point)
88
87
  features/docs.feature.js 0.90 KB (entry point)
89
88
  features/docs/index.js 0.54 KB (entry point)
90
89
  features/docs/docs.contracts.js 0.54 KB (entry point)
91
- components/templates/recipes/types.js 8 bytes (entry point)
90
+ features/mcp.feature.js 0.86 KB (entry point)
92
91
  components/templates/todos/types.js 8 bytes (entry point)
93
92
  config/contractspec-blueprint.js 2.49 KB (entry point)
94
- config/contractspec-branding.js 0.86 KB (entry point)
95
93
  config/contractspec-routes.js 0.88 KB (entry point)
94
+ config/contractspec-branding.js 0.86 KB (entry point)
96
95
  components/templates/messaging/types.js 8 bytes (entry point)
96
+ components/templates/recipes/types.js 8 bytes (entry point)
97
97
  components/shell/index.js 4.23 KB (entry point)
98
- components/shell/WorkspaceShellRenderer.js 3.40 KB (entry point)
99
98
  components/templates/engine/index.js 0.86 KB (entry point)
100
99
  components/templates/index.js 20.23 KB (entry point)
101
100
  components/templates/todos/index.js 9.31 KB (entry point)
@@ -104,12 +103,12 @@ Bundled 327 modules in 152ms
104
103
  components/templates/todos/TaskForm.js 3.1 KB (entry point)
105
104
  components/templates/todos/TaskItem.js 2.18 KB (entry point)
106
105
  components/templates/messaging/index.js 5.91 KB (entry point)
107
- components/templates/messaging/MessagingWorkspace.js 5.82 KB (entry point)
108
106
  components/templates/recipes/index.js 5.35 KB (entry point)
109
107
  components/templates/recipes/RecipeList.js 5.30 KB (entry point)
110
108
  components/templates/recipes/LanguageSwitcher.js 0.68 KB (entry point)
111
109
  components/templates/recipes/RecipeCard.js 1.60 KB (entry point)
112
110
  components/templates/recipes/RecipeDetail.js 1.55 KB (entry point)
111
+ components/templates/messaging/MessagingWorkspace.js 5.82 KB (entry point)
113
112
  components/templates/messaging/ConversationList.js 2.15 KB (entry point)
114
113
  components/templates/messaging/MessageComposer.js 3.48 KB (entry point)
115
114
  components/templates/messaging/MessageThread.js 2.24 KB (entry point)
@@ -119,14 +118,22 @@ Bundled 327 modules in 152ms
119
118
  components/shared/index.js 0.86 KB (entry point)
120
119
  components/shared/FeatureGateNotice.js 0.86 KB (entry point)
121
120
  components/shell/WorkspaceProjectShellLayout.js 3.31 KB (entry point)
121
+ components/shell/WorkspaceShellRenderer.js 3.40 KB (entry point)
122
122
  components/shell/WorkspaceSidebar.js 1.1 KB (entry point)
123
123
  components/shell/WorkspaceHeader.js 1.72 KB (entry point)
124
- components/docs/tech/contracts/tech-docs.docblocks.js 0.73 KB (entry point)
125
- components/integrations/index.js 10.29 KB (entry point)
126
- components/integrations/organisms/KnowledgeSourceList.js 2.11 KB (entry point)
124
+ components/integrations/index.js 18.70 KB (entry point)
127
125
  components/integrations/organisms/IntegrationMarketplace.js 4.1 KB (entry point)
128
126
  components/integrations/molecules/IntegrationCard.js 1.91 KB (entry point)
129
- components/integrations/organisms/IntegrationSettings.js 4.52 KB (entry point)
127
+ components/integrations/organisms/IntegrationSettings.js 12.69 KB (entry point)
128
+ components/integrations/organisms/IntegrationSettingsSecretReference.js 1.56 KB (entry point)
129
+ components/integrations/organisms/KnowledgeSourceList.js 2.11 KB (entry point)
130
+ components/docs/tech/contracts/tech-docs.docblocks.js 0.73 KB (entry point)
131
+ components/integrations/blocks/IntegrationCredentialSetupBlock.js 7.70 KB (entry point)
132
+ components/integrations/helpers/credentialSetupModel.js 3.66 KB (entry point)
133
+ components/integrations/helpers/credentialSetupAliases.js 1.76 KB (entry point)
134
+ components/integrations/atoms/IntegrationCredentialFieldList.js 1.20 KB (entry point)
135
+ components/integrations/atoms/IntegrationCredentialModeTabs.js 0.96 KB (entry point)
136
+ components/integrations/atoms/IntegrationEnvAliasPreview.js 1.31 KB (entry point)
130
137
  components/docs/ops/ops.docs.js 22.56 KB (entry point)
131
138
  components/docs/product/product.docblocks.js 2.95 KB (entry point)
132
139
  components/docs/ops/ops-lifecycle.docblocks.js 6.19 KB (entry point)
@@ -332,8 +339,8 @@ Bundled 327 modules in 152ms
332
339
  application/mcp/contractsMcpAdoptionTools.js 2.54 KB (entry point)
333
340
  application/mcp/contractsMcpResources.js 3.47 KB (entry point)
334
341
 
335
- [contractspec-bun-build] transpile target=node root=src entries=327 noBundle=false
336
- Bundled 327 modules in 121ms
342
+ [contractspec-bun-build] transpile target=node root=src entries=334 noBundle=false
343
+ Bundled 334 modules in 123ms
337
344
 
338
345
  application/context-storage/index.js 0.85 KB (entry point)
339
346
  presentation/features/templates/types.js 0 KB (entry point)
@@ -343,64 +350,64 @@ Bundled 327 modules in 121ms
343
350
  presentation/features/molecules/FeatureFilters/types.js 0 KB (entry point)
344
351
  presentation/features/molecules/index.js 8.41 KB (entry point)
345
352
  presentation/features/index.js 50.55 KB (entry point)
346
- presentation/features/templates/FeatureOverviewTemplate/index.js 3.1 KB (entry point)
347
353
  presentation/features/templates/FeaturePresentationDetailTemplate/index.js 5.14 KB (entry point)
348
354
  presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js 5.14 KB (entry point)
349
355
  presentation/features/templates/FeaturePresentationDetailTemplate/types.js 0 KB (entry point)
350
356
  presentation/features/templates/FeaturePresentationsTemplate/index.js 6.0 KB (entry point)
351
357
  presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js 6.0 KB (entry point)
352
358
  presentation/features/templates/FeatureFormsTemplate/index.js 5.96 KB (entry point)
353
- presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js 5.96 KB (entry point)
354
359
  presentation/features/templates/FeatureOperationDetailTemplate/index.js 4.92 KB (entry point)
355
360
  presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js 4.92 KB (entry point)
356
361
  presentation/features/templates/FeatureOperationDetailTemplate/types.js 0 KB (entry point)
357
362
  presentation/features/templates/FeatureOperationsTemplate/index.js 3.41 KB (entry point)
358
363
  presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js 3.41 KB (entry point)
364
+ presentation/features/templates/FeatureOverviewTemplate/index.js 3.1 KB (entry point)
359
365
  presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js 3.1 KB (entry point)
360
366
  presentation/features/templates/FeatureEventDetailTemplate/index.js 5.1 KB (entry point)
361
- presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js 5.1 KB (entry point)
362
367
  presentation/features/templates/FeatureEventDetailTemplate/types.js 0 KB (entry point)
363
368
  presentation/features/templates/FeatureEventsTemplate/index.js 5.95 KB (entry point)
364
369
  presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js 5.95 KB (entry point)
365
370
  presentation/features/templates/FeatureFormDetailTemplate/index.js 5.45 KB (entry point)
366
371
  presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js 5.45 KB (entry point)
367
372
  presentation/features/templates/FeatureFormDetailTemplate/types.js 0 KB (entry point)
368
- presentation/features/organisms/FeatureOperationsList.js 2.76 KB (entry point)
373
+ presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js 5.96 KB (entry point)
369
374
  presentation/features/organisms/FeaturePresentationsList.js 5.35 KB (entry point)
370
375
  presentation/features/templates/FeatureDataViewDetailTemplate/index.js 5.50 KB (entry point)
371
376
  presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js 5.50 KB (entry point)
372
377
  presentation/features/templates/FeatureDataViewDetailTemplate/types.js 0 KB (entry point)
373
378
  presentation/features/templates/FeatureDataViewsTemplate/index.js 5.97 KB (entry point)
374
379
  presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js 5.97 KB (entry point)
380
+ presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js 5.1 KB (entry point)
375
381
  presentation/features/organisms/FeatureDetail/index.js 2.48 KB (entry point)
376
- presentation/features/organisms/FeatureDetail/FeatureDetail.js 2.48 KB (entry point)
377
382
  presentation/features/organisms/FeatureDiscovery/index.js 15.58 KB (entry point)
378
383
  presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js 15.58 KB (entry point)
379
384
  presentation/features/organisms/FeatureEventsList.js 5.32 KB (entry point)
380
385
  presentation/features/organisms/FeatureFormsList.js 5.33 KB (entry point)
381
- presentation/features/molecules/FeatureCategoryHeader/index.js 1.29 KB (entry point)
386
+ presentation/features/organisms/FeatureOperationsList.js 2.76 KB (entry point)
382
387
  presentation/features/molecules/FeatureFilters/index.js 1.63 KB (entry point)
383
388
  presentation/features/molecules/FeatureFilters/FeatureFilters.js 1.63 KB (entry point)
384
389
  presentation/features/organisms/FeatureDataViewsList.js 5.33 KB (entry point)
390
+ presentation/features/organisms/FeatureDetail/FeatureDetail.js 2.48 KB (entry point)
385
391
  presentation/features/hooks/useRelatedDocs.js 0.76 KB (entry point)
386
392
  presentation/features/molecules/FeatureCard/index.js 5.87 KB (entry point)
387
393
  presentation/features/molecules/FeatureCard/FeatureCard.js 5.87 KB (entry point)
388
394
  presentation/features/molecules/FeatureHoverPreview/index.js 3.0 KB (entry point)
389
395
  presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js 3.0 KB (entry point)
390
396
  presentation/features/molecules/FeatureCard/types.js 0 KB (entry point)
397
+ presentation/features/molecules/FeatureCategoryHeader/index.js 1.29 KB (entry point)
391
398
  presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js 1.29 KB (entry point)
392
- libs/posthog/native.js 0.76 KB (entry point)
393
399
  libs/posthog/server.js 447 bytes (entry point)
394
400
  libs/pricing-examples.js 462 bytes (entry point)
395
401
  presentation/features/atoms/index.js 1.45 KB (entry point)
396
402
  presentation/features/atoms/FeatureIcon/index.js 1.45 KB (entry point)
397
403
  presentation/features/atoms/FeatureIcon/FeatureIcon.js 1.45 KB (entry point)
398
404
  presentation/features/hooks/index.js 6.77 KB (entry point)
399
- presentation/features/hooks/useFeatureFilters.js 1.46 KB (entry point)
400
405
  presentation/features/hooks/useFeatureRegistry.js 3.0 KB (entry point)
401
406
  presentation/features/hooks/useContractsRegistry.js 5.00 KB (entry point)
407
+ presentation/features/hooks/useFeatureFilters.js 1.46 KB (entry point)
402
408
  libs/email/types.js 0 KB (entry point)
403
409
  libs/posthog/client.js 1.28 KB (entry point)
410
+ libs/posthog/native.js 0.76 KB (entry point)
404
411
  ./index.js 0.82 MB (entry point)
405
412
  infrastructure/index.js 0.74 KB (entry point)
406
413
  infrastructure/elysia/index.js 0.74 KB (entry point)
@@ -409,24 +416,23 @@ Bundled 327 modules in 121ms
409
416
  libs/email/newsletter.js 4.71 KB (entry point)
410
417
  libs/email/waitlist-application.js 7.90 KB (entry point)
411
418
  libs/email/waitlist.js 5.32 KB (entry point)
412
- libs/email/client.js 2.15 KB (entry point)
413
419
  libs/email/utils.js 379 bytes (entry point)
420
+ libs/email/client.js 2.15 KB (entry point)
414
421
  config/index.js 2.57 KB (entry point)
415
422
  features/index.js 6.0 KB (entry point)
416
423
  features/registry.js 2.62 KB (entry point)
417
- features/mcp.feature.js 0.85 KB (entry point)
418
424
  features/presentations.feature.js 0.95 KB (entry point)
419
425
  features/docs.feature.js 0.89 KB (entry point)
420
426
  features/docs/index.js 0.53 KB (entry point)
421
427
  features/docs/docs.contracts.js 0.53 KB (entry point)
422
- components/templates/recipes/types.js 0 KB (entry point)
428
+ features/mcp.feature.js 0.85 KB (entry point)
423
429
  components/templates/todos/types.js 0 KB (entry point)
424
430
  config/contractspec-blueprint.js 2.48 KB (entry point)
425
- config/contractspec-branding.js 0.86 KB (entry point)
426
431
  config/contractspec-routes.js 0.87 KB (entry point)
432
+ config/contractspec-branding.js 0.86 KB (entry point)
427
433
  components/templates/messaging/types.js 0 KB (entry point)
434
+ components/templates/recipes/types.js 0 KB (entry point)
428
435
  components/shell/index.js 4.22 KB (entry point)
429
- components/shell/WorkspaceShellRenderer.js 3.40 KB (entry point)
430
436
  components/templates/engine/index.js 0.85 KB (entry point)
431
437
  components/templates/index.js 20.20 KB (entry point)
432
438
  components/templates/todos/index.js 9.30 KB (entry point)
@@ -435,12 +441,12 @@ Bundled 327 modules in 121ms
435
441
  components/templates/todos/TaskForm.js 3.1 KB (entry point)
436
442
  components/templates/todos/TaskItem.js 2.17 KB (entry point)
437
443
  components/templates/messaging/index.js 5.88 KB (entry point)
438
- components/templates/messaging/MessagingWorkspace.js 5.80 KB (entry point)
439
444
  components/templates/recipes/index.js 5.34 KB (entry point)
440
445
  components/templates/recipes/RecipeList.js 5.28 KB (entry point)
441
446
  components/templates/recipes/LanguageSwitcher.js 0.67 KB (entry point)
442
447
  components/templates/recipes/RecipeCard.js 1.59 KB (entry point)
443
448
  components/templates/recipes/RecipeDetail.js 1.54 KB (entry point)
449
+ components/templates/messaging/MessagingWorkspace.js 5.80 KB (entry point)
444
450
  components/templates/messaging/ConversationList.js 2.13 KB (entry point)
445
451
  components/templates/messaging/MessageComposer.js 3.46 KB (entry point)
446
452
  components/templates/messaging/MessageThread.js 2.23 KB (entry point)
@@ -450,14 +456,22 @@ Bundled 327 modules in 121ms
450
456
  components/shared/index.js 0.85 KB (entry point)
451
457
  components/shared/FeatureGateNotice.js 0.85 KB (entry point)
452
458
  components/shell/WorkspaceProjectShellLayout.js 3.30 KB (entry point)
459
+ components/shell/WorkspaceShellRenderer.js 3.40 KB (entry point)
453
460
  components/shell/WorkspaceSidebar.js 1.1 KB (entry point)
454
461
  components/shell/WorkspaceHeader.js 1.71 KB (entry point)
455
- components/docs/tech/contracts/tech-docs.docblocks.js 0.72 KB (entry point)
456
- components/integrations/index.js 10.29 KB (entry point)
457
- components/integrations/organisms/KnowledgeSourceList.js 2.10 KB (entry point)
462
+ components/integrations/index.js 18.68 KB (entry point)
458
463
  components/integrations/organisms/IntegrationMarketplace.js 4.1 KB (entry point)
459
464
  components/integrations/molecules/IntegrationCard.js 1.90 KB (entry point)
460
- components/integrations/organisms/IntegrationSettings.js 4.51 KB (entry point)
465
+ components/integrations/organisms/IntegrationSettings.js 12.68 KB (entry point)
466
+ components/integrations/organisms/IntegrationSettingsSecretReference.js 1.55 KB (entry point)
467
+ components/integrations/organisms/KnowledgeSourceList.js 2.10 KB (entry point)
468
+ components/docs/tech/contracts/tech-docs.docblocks.js 0.72 KB (entry point)
469
+ components/integrations/blocks/IntegrationCredentialSetupBlock.js 7.68 KB (entry point)
470
+ components/integrations/helpers/credentialSetupModel.js 3.65 KB (entry point)
471
+ components/integrations/helpers/credentialSetupAliases.js 1.75 KB (entry point)
472
+ components/integrations/atoms/IntegrationCredentialFieldList.js 1.19 KB (entry point)
473
+ components/integrations/atoms/IntegrationCredentialModeTabs.js 0.96 KB (entry point)
474
+ components/integrations/atoms/IntegrationEnvAliasPreview.js 1.30 KB (entry point)
461
475
  components/docs/ops/ops.docs.js 22.52 KB (entry point)
462
476
  components/docs/product/product.docblocks.js 2.94 KB (entry point)
463
477
  components/docs/ops/ops-lifecycle.docblocks.js 6.18 KB (entry point)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # @contractspec/bundle.library
2
2
 
3
+ ## 3.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add reusable BYOK and environment alias UI helpers for integration setup.
8
+ - Packages: @contractspec/bundle.library (minor)
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies because of chore: auto-bump internal dependents
13
+ - Updated dependencies because of Add first-class monorepo-aware environment contracts and managed/BYOK credential setup helpers.
14
+ - Updated dependencies because of Improve PageOutline desktop behavior with a Notion-like floating rail that keeps AppShell content centered while expanding on hover or keyboard focus.
15
+ - @contractspec/example.data-grid-showcase@3.8.23
16
+ - @contractspec/lib.ai-providers@3.7.21
17
+ - @contractspec/lib.content-gen@3.7.28
18
+ - @contractspec/lib.contracts-library@3.7.28
19
+ - @contractspec/lib.contracts-runtime-client-react@3.14.1
20
+ - @contractspec/lib.contracts-runtime-server-graphql@3.8.7
21
+ - @contractspec/lib.contracts-runtime-server-mcp@3.8.8
22
+ - @contractspec/lib.contracts-runtime-server-rest@3.9.1
23
+ - @contractspec/lib.example-shared-ui@7.0.8
24
+ - @contractspec/lib.knowledge@3.8.4
25
+ - @contractspec/lib.logger@3.7.21
26
+ - @contractspec/lib.provider-ranking@0.7.21
27
+ - @contractspec/lib.runtime-sandbox@3.0.7
28
+ - @contractspec/lib.surface-runtime@0.5.28
29
+ - @contractspec/lib.ui-kit-web@3.13.3
30
+ - @contractspec/lib.ui-link@3.7.23
31
+ - @contractspec/module.context-storage@0.7.27
32
+ - @contractspec/module.examples@4.0.8
33
+ - @contractspec/lib.contracts-spec@6.3.0
34
+ - @contractspec/lib.contracts-integrations@3.9.0
35
+ - @contractspec/bundle.workspace@4.7.0
36
+ - @contractspec/lib.design-system@4.4.2
37
+
38
+ ## 3.9.10
39
+
40
+ ### Patch Changes
41
+
42
+ - chore: auto-bump internal dependents
43
+ - Updated dependencies because of Fix AppShell desktop sidebar collapse/layout and web notification dismissal behavior.
44
+ - Updated dependencies because of chore: auto-bump internal dependents
45
+ - Updated dependencies because of Fix FormSpec phone country-select rendering to remove duplicated country adornments.
46
+ - @contractspec/lib.design-system@4.4.1
47
+ - @contractspec/example.data-grid-showcase@3.8.22
48
+ - @contractspec/lib.example-shared-ui@7.0.7
49
+ - @contractspec/module.examples@4.0.7
50
+
3
51
  ## 3.9.9
4
52
 
5
53
  ### Patch Changes
package/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
 
7
7
  - Provides the reusable product-facing bundle consumed by API, web, and documentation surfaces.
8
8
  - Aggregates docs pages, integration marketplace UI, templates, example showcase pages, and library-side MCP implementations.
9
+ - Includes reusable managed/BYOK credential setup UI for integration manifests and monorepo-aware env alias previews.
9
10
  - Acts as the main composition layer between lower-level libraries and app-specific delivery shells.
10
11
  - `src/presentation/` contains presentation-layer components and renderers.
11
12
 
@@ -0,0 +1,6 @@
1
+ import type { CredentialSetupFieldRow } from '../helpers/credentialSetupModel';
2
+ export interface IntegrationCredentialFieldListProps {
3
+ fields: CredentialSetupFieldRow[];
4
+ emptyLabel?: string;
5
+ }
6
+ export declare function IntegrationCredentialFieldList({ fields, emptyLabel, }: IntegrationCredentialFieldListProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var F=Object.defineProperty;var G=(q)=>q;function I(q,v){this[q]=G.bind(null,v)}var O=(q,v)=>{for(var h in v)F(q,h,{get:v[h],enumerable:!0,configurable:!0,set:I.bind(v,h)})};var P=(q,v)=>()=>(q&&(v=q(q=0)),v);import{HStack as J,Muted as A,Small as K,Text as E,VStack as C}from"@contractspec/lib.design-system";import{Badge as N}from"@contractspec/lib.ui-kit-web/ui/badge";import{jsx as z,jsxs as D}from"react/jsx-runtime";function W({fields:q,emptyLabel:v="No credential fields declared."}){if(q.length===0)return z(A,{children:v});return z(C,{gap:"sm",align:"stretch",children:q.map((h)=>D(C,{gap:"sm",align:"stretch",className:"rounded-xl border p-3 text-sm",children:[D(J,{justify:"between",align:"start",gap:"md",children:[D(C,{gap:"sm",align:"start",children:[z(K,{children:h.label}),z(A,{className:"text-xs",children:h.kind})]}),z(N,{variant:h.status==="missing"?"destructive":"secondary",children:z(E,{children:h.status})})]}),h.description?z(A,{children:h.description}):null,h.secretRef?z(A,{className:"font-mono text-xs",children:h.secretRef}):null,h.required?z(E,{className:"text-xs",children:"Required"}):null]},`${h.kind}:${h.key}`))})}export{W as IntegrationCredentialFieldList};
@@ -0,0 +1,7 @@
1
+ import type { CredentialSetupModeOption, IntegrationCredentialSetupModel } from '../helpers/credentialSetupModel';
2
+ export interface IntegrationCredentialModeTabsProps {
3
+ modes: CredentialSetupModeOption[];
4
+ selectedMode: IntegrationCredentialSetupModel['selectedMode'];
5
+ onModeChange?: (mode: IntegrationCredentialSetupModel['selectedMode']) => void;
6
+ }
7
+ export declare function IntegrationCredentialModeTabs({ modes, selectedMode, onModeChange, }: IntegrationCredentialModeTabsProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var D=Object.defineProperty;var E=(f)=>f;function F(f,q){this[f]=E.bind(null,q)}var L=(f,q)=>{for(var y in q)D(f,y,{get:q[y],enumerable:!0,configurable:!0,set:F.bind(q,y)})};var N=(f,q)=>()=>(f&&(q=f(f=0)),q);import{HStack as G,Text as A}from"@contractspec/lib.design-system";import{Badge as I}from"@contractspec/lib.ui-kit-web/ui/badge";import{Button as J}from"@contractspec/lib.ui-kit-web/ui/button";import{jsx as z,jsxs as K}from"react/jsx-runtime";function U({modes:f,selectedMode:q,onModeChange:y}){return z(G,{wrap:"wrap",gap:"sm",role:"tablist","aria-label":"Credential mode",children:f.map((v)=>K(J,{type:"button",variant:v.mode===q?"default":"outline",disabled:!v.available,onClick:()=>y?.(v.mode),role:"tab","aria-selected":v.mode===q,children:[z(A,{children:v.label}),v.missingRequiredCount>0?z(I,{variant:"destructive",children:z(A,{children:`${v.missingRequiredCount} missing`})}):null]},v.mode))})}export{U as IntegrationCredentialModeTabs};
@@ -0,0 +1,7 @@
1
+ import type { CredentialSetupAliasRow, CredentialSetupWarning } from '../helpers/credentialSetupModel';
2
+ export interface IntegrationEnvAliasPreviewProps {
3
+ aliases: CredentialSetupAliasRow[];
4
+ warnings?: CredentialSetupWarning[];
5
+ emptyLabel?: string;
6
+ }
7
+ export declare function IntegrationEnvAliasPreview({ aliases, warnings, emptyLabel, }: IntegrationEnvAliasPreviewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var G=Object.defineProperty;var I=(h)=>h;function J(h,q){this[h]=I.bind(null,q)}var P=(h,q)=>{for(var z in q)G(h,z,{get:q[z],enumerable:!0,configurable:!0,set:J.bind(q,z)})};var Q=(h,q)=>()=>(h&&(q=h(h=0)),q);import{Code as K,HStack as N,Muted as A,Text as E,VStack as F}from"@contractspec/lib.design-system";import{Badge as O}from"@contractspec/lib.ui-kit-web/ui/badge";import{jsx as v,jsxs as D}from"react/jsx-runtime";function X({aliases:h,warnings:q=[],emptyLabel:z="No env aliases declared."}){return D(F,{gap:"sm",align:"stretch",children:[h.length===0?v(A,{children:z}):null,h.map((f)=>D(F,{gap:"sm",align:"stretch",className:"rounded-xl border p-3 text-sm",children:[D(N,{wrap:"wrap",gap:"sm",align:"center",children:[v(K,{children:f.envName}),v(O,{variant:f.public?"default":"secondary",children:v(E,{children:f.public?"public":"server"})})]}),v(A,{className:"text-xs",children:`${f.logicalKey} \u2192 ${f.targetLabel??f.targetId??"workspace root"}${f.framework?` \xB7 ${f.framework}`:""}${f.profile?` \xB7 ${f.profile}`:""}`}),f.warning?v(E,{className:"text-xs",children:f.warning}):null]},`${f.logicalKey}:${f.envName}:${f.targetId??"root"}`)),q.map((f)=>v(A,{children:`${f.level.toUpperCase()}: ${f.message}`},`${f.level}:${f.fieldKey??f.message}`))]})}export{X as IntegrationEnvAliasPreview};
@@ -0,0 +1,11 @@
1
+ import { type BuildIntegrationCredentialSetupModelInput, type IntegrationCredentialSetupModel } from '../helpers/credentialSetupModel';
2
+ export interface IntegrationCredentialSetupBlockProps extends BuildIntegrationCredentialSetupModelInput {
3
+ title?: string;
4
+ description?: string;
5
+ onModeChange?: (mode: IntegrationCredentialSetupModel['selectedMode']) => void;
6
+ onTestConnection?: () => void | Promise<void>;
7
+ onSave?: () => void | Promise<void>;
8
+ isTesting?: boolean;
9
+ isSaving?: boolean;
10
+ }
11
+ export declare function IntegrationCredentialSetupBlock({ title, description, onModeChange, onTestConnection, onSave, isTesting, isSaving, ...input }: IntegrationCredentialSetupBlockProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var u=Object.defineProperty;var w=(r)=>r;function T(r,A){this[r]=w.bind(null,A)}var Br=(r,A)=>{for(var E in A)u(r,E,{get:A[E],enumerable:!0,configurable:!0,set:T.bind(A,E)})};var Xr=(r,A)=>()=>(r&&(A=r(r=0)),A);import{HStack as o,Muted as _,Small as m,Text as J,VStack as X}from"@contractspec/lib.design-system";import{Badge as f}from"@contractspec/lib.ui-kit-web/ui/badge";import{jsx as K,jsxs as $}from"react/jsx-runtime";function Q({fields:r,emptyLabel:A="No credential fields declared."}){if(r.length===0)return K(_,{children:A});return K(X,{gap:"sm",align:"stretch",children:r.map((E)=>$(X,{gap:"sm",align:"stretch",className:"rounded-xl border p-3 text-sm",children:[$(o,{justify:"between",align:"start",gap:"md",children:[$(X,{gap:"sm",align:"start",children:[K(m,{children:E.label}),K(_,{className:"text-xs",children:E.kind})]}),K(f,{variant:E.status==="missing"?"destructive":"secondary",children:K(J,{children:E.status})})]}),E.description?K(_,{children:E.description}):null,E.secretRef?K(_,{className:"font-mono text-xs",children:E.secretRef}):null,E.required?K(J,{className:"text-xs",children:"Required"}):null]},`${E.kind}:${E.key}`))})}import{HStack as j,Text as Y}from"@contractspec/lib.design-system";import{Badge as x}from"@contractspec/lib.ui-kit-web/ui/badge";import{Button as n}from"@contractspec/lib.ui-kit-web/ui/button";import{jsx as h,jsxs as l}from"react/jsx-runtime";function Z({modes:r,selectedMode:A,onModeChange:E}){return h(j,{wrap:"wrap",gap:"sm",role:"tablist","aria-label":"Credential mode",children:r.map((I)=>l(n,{type:"button",variant:I.mode===A?"default":"outline",disabled:!I.available,onClick:()=>E?.(I.mode),role:"tab","aria-selected":I.mode===A,children:[h(Y,{children:I.label}),I.missingRequiredCount>0?h(x,{variant:"destructive",children:h(Y,{children:`${I.missingRequiredCount} missing`})}):null]},I.mode))})}import{Code as e,HStack as a,Muted as g,Text as q,VStack as F}from"@contractspec/lib.design-system";import{Badge as d}from"@contractspec/lib.ui-kit-web/ui/badge";import{jsx as b,jsxs as O}from"react/jsx-runtime";function V({aliases:r,warnings:A=[],emptyLabel:E="No env aliases declared."}){return O(F,{gap:"sm",align:"stretch",children:[r.length===0?b(g,{children:E}):null,r.map((I)=>O(F,{gap:"sm",align:"stretch",className:"rounded-xl border p-3 text-sm",children:[O(a,{wrap:"wrap",gap:"sm",align:"center",children:[b(e,{children:I.envName}),b(d,{variant:I.public?"default":"secondary",children:b(q,{children:I.public?"public":"server"})})]}),b(g,{className:"text-xs",children:`${I.logicalKey} \u2192 ${I.targetLabel??I.targetId??"workspace root"}${I.framework?` \xB7 ${I.framework}`:""}${I.profile?` \xB7 ${I.profile}`:""}`}),I.warning?b(q,{className:"text-xs",children:I.warning}):null]},`${I.logicalKey}:${I.envName}:${I.targetId??"root"}`)),A.map((I)=>b(g,{children:`${I.level.toUpperCase()}: ${I.message}`},`${I.level}:${I.fieldKey??I.message}`))]})}function t(r,A,E,I){return[...s(r?.envAliases??[],E,I),...i(A.environment,A,E,I)]}function s(r,A,E){return r.flatMap((I)=>{if(A.has(I.logicalKey)&&z(I.envVar,I.public))return E.push({level:"error",fieldKey:I.logicalKey,message:`Unsafe public alias was omitted for secret field ${I.logicalKey}.`}),[];return[{logicalKey:I.logicalKey,envName:I.envVar,targetId:I.targetId,public:z(I.envVar,I.public),warning:I.public?"Public client alias":void 0}]})}function i(r,A,E,I){if(!r)return[];return Object.values(r?.variables??{}).flatMap((c)=>(c.aliases??[]).filter((C)=>rr(C,r,A)).flatMap((C)=>{let P=z(C.name)||Ar(C.exposure);if(E.has(c.key)&&P)return I.push({level:"error",fieldKey:c.key,message:`Unsafe public alias was omitted for secret field ${c.key}.`}),[];return[{logicalKey:c.key,envName:C.name,targetId:C.targetId,targetLabel:Ir(r,C.targetId),profile:C.profile,framework:C.framework,public:P,warning:P?"Public client alias":void 0}]}))}function rr(r,A,E){if(E.targetIds?.length&&r.targetId&&!E.targetIds.includes(r.targetId))return!1;if(E.profile&&r.profile&&r.profile!==E.profile)return!1;if(!E.targetIds?.length&&(r.targetId||r.profile||r.framework))return!1;if(r.framework&&r.targetId){let I=A.targets?.[r.targetId]?.framework;if(I&&I!==r.framework)return!1}return!0}function Ir(r,A){if(!A)return;let E=r.targets?.[A];return E?.packageName??E?.appId??E?.id??A}function Ar(r){return r==="public-client"||r==="native-client"}function z(r,A){return A===!0||r.startsWith("NEXT_PUBLIC_")||r.startsWith("EXPO_PUBLIC_")}import{getIntegrationCredentialManifest as Er}from"@contractspec/lib.contracts-integrations";function H(r){let A=r.credentialManifest??Cr(r),E=cr(r,A),I=r.selectedMode??E[0]??"managed",c=A.modes?.[I],C=new Set((c?.secretFields??[]).map((U)=>U.key)),P=[],B=Pr(c,r,P),W=t(c,r,C,P),M=E.map((U)=>yr(U,A.modes?.[U],r));return{selectedMode:I,modes:M,fields:B,aliases:W,warnings:P}}function Cr(r){return r.integration?Er(r.integration):{}}function cr(r,A){return r.supportedModes??r.integration?.supportedModes??Object.keys(A.modes??{})}function yr(r,A,E){let I=[...A?.configFields??[],...A?.secretFields??[]],c=I.filter((C)=>C.required&&!L(C,E)).length;return{mode:r,label:r==="byok"?"BYOK":"Managed",available:Boolean(A),fieldCount:I.length,missingRequiredCount:c,docsUrl:A?.docsUrl,setupSteps:A?.setupSteps}}function Pr(r,A,E){let I=(r?.configFields??[]).map((C)=>R("config",C,A,E)),c=(r?.secretFields??[]).map((C)=>R("secret",C,A,E));return[...I,...c]}function R(r,A,E,I){let c=L(A,E),C=r==="secret"?Kr(A,E,I):void 0;if(r==="secret"&&A.required===!0&&!c)I.push({level:"warning",fieldKey:A.key,message:`${D(A.key)} is required for BYOK secret reference setup.`});return{kind:r,key:A.key,label:D(A.key),description:A.description,required:A.required===!0,status:c?"configured":A.required?"missing":"optional",secretRef:C,envVar:A.envVar}}function L(r,A){let E=A.configValues?.[r.key],I=A.secretRefs?.[r.key]??A.secretRefs?.[r.envVar??""];return v(E)||v(I)}function Kr(r,A,E){let I=A.secretRefs?.[r.key]??A.secretRefs?.[r.envVar??""];if(!I)return;if(/^[a-z][a-z0-9+.-]*:\/\//i.test(I)||/^[A-Z][A-Z0-9_]*$/.test(I))return I;E.push({level:"warning",fieldKey:r.key,message:`${D(r.key)} has a value, but it is hidden because it is not a secret reference.`});return}function v(r){return r!==void 0&&r!==null&&r!==""}function D(r){return r.replace(/[_-]+/g," ").replace(/\b\w/g,(A)=>A.toUpperCase())}import{Small as S,Text as k,VStack as G}from"@contractspec/lib.design-system";import{Button as p}from"@contractspec/lib.ui-kit-web/ui/button";import{Card as Wr,CardContent as br,CardDescription as Nr,CardFooter as Ur,CardHeader as _r,CardTitle as hr}from"@contractspec/lib.ui-kit-web/ui/card";import{jsx as y,jsxs as N}from"react/jsx-runtime";function or({title:r="Credential setup",description:A="Configure managed credentials or BYOK secret references without exposing raw secrets.",onModeChange:E,onTestConnection:I,onSave:c,isTesting:C,isSaving:P,...B}){let W=H(B);return N(Wr,{children:[N(_r,{children:[y(hr,{children:r}),y(Nr,{children:A})]}),y(br,{children:N(G,{gap:"lg",align:"stretch",children:[y(Z,{modes:W.modes,selectedMode:W.selectedMode,onModeChange:E}),N(G,{gap:"sm",align:"stretch",children:[y(S,{children:"Required fields"}),y(Q,{fields:W.fields})]}),N(G,{gap:"sm",align:"stretch",children:[y(S,{children:"Environment aliases"}),y(V,{aliases:W.aliases,warnings:W.warnings})]})]})}),I||c?N(Ur,{className:"flex flex-wrap justify-end gap-2",children:[I?y(p,{type:"button",variant:"outline",disabled:C,onClick:()=>void I(),children:y(k,{children:C?"Testing...":"Test connection"})}):null,c?y(p,{type:"button",disabled:P,onClick:()=>void c(),children:y(k,{children:P?"Saving...":"Save settings"})}):null]}):null]})}export{or as IntegrationCredentialSetupBlock};
@@ -0,0 +1,3 @@
1
+ import type { IntegrationCredentialModeManifest } from '@contractspec/lib.contracts-integrations';
2
+ import type { BuildIntegrationCredentialSetupModelInput, CredentialSetupAliasRow, CredentialSetupWarning } from './credentialSetupModel';
3
+ export declare function buildAliases(manifest: IntegrationCredentialModeManifest | undefined, input: BuildIntegrationCredentialSetupModelInput, secretKeys: Set<string>, warnings: CredentialSetupWarning[]): CredentialSetupAliasRow[];
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var u=Object.defineProperty;var f=(e)=>e;function d(e,t){this[e]=f.bind(null,t)}var I=(e,t)=>{for(var r in t)u(e,r,{get:t[r],enumerable:!0,configurable:!0,set:d.bind(t,r)})};var b=(e,t)=>()=>(e&&(t=e(e=0)),t);function v(e,t,r,n){return[...c(e?.envAliases??[],r,n),...g(t.environment,t,r,n)]}function c(e,t,r){return e.flatMap((n)=>{if(t.has(n.logicalKey)&&o(n.envVar,n.public))return r.push({level:"error",fieldKey:n.logicalKey,message:`Unsafe public alias was omitted for secret field ${n.logicalKey}.`}),[];return[{logicalKey:n.logicalKey,envName:n.envVar,targetId:n.targetId,public:o(n.envVar,n.public),warning:n.public?"Public client alias":void 0}]})}function g(e,t,r,n){if(!e)return[];return Object.values(e?.variables??{}).flatMap((l)=>(l.aliases??[]).filter((i)=>p(i,e,t)).flatMap((i)=>{let a=o(i.name)||m(i.exposure);if(r.has(l.key)&&a)return n.push({level:"error",fieldKey:l.key,message:`Unsafe public alias was omitted for secret field ${l.key}.`}),[];return[{logicalKey:l.key,envName:i.name,targetId:i.targetId,targetLabel:s(e,i.targetId),profile:i.profile,framework:i.framework,public:a,warning:a?"Public client alias":void 0}]}))}function p(e,t,r){if(r.targetIds?.length&&e.targetId&&!r.targetIds.includes(e.targetId))return!1;if(r.profile&&e.profile&&e.profile!==r.profile)return!1;if(!r.targetIds?.length&&(e.targetId||e.profile||e.framework))return!1;if(e.framework&&e.targetId){let n=t.targets?.[e.targetId]?.framework;if(n&&n!==e.framework)return!1}return!0}function s(e,t){if(!t)return;let r=e.targets?.[t];return r?.packageName??r?.appId??r?.id??t}function m(e){return e==="public-client"||e==="native-client"}function o(e,t){return t===!0||e.startsWith("NEXT_PUBLIC_")||e.startsWith("EXPO_PUBLIC_")}export{v as buildAliases};
@@ -0,0 +1,58 @@
1
+ import type { IntegrationCredentialManifest, IntegrationOwnershipMode, IntegrationSpec } from '@contractspec/lib.contracts-integrations';
2
+ import type { EnvironmentConfig } from '@contractspec/lib.contracts-spec/workspace-config/environment';
3
+ export type CredentialSetupFieldKind = 'config' | 'secret';
4
+ export type CredentialSetupFieldStatus = 'configured' | 'missing' | 'optional';
5
+ export type CredentialSetupWarningLevel = 'info' | 'warning' | 'error';
6
+ export interface CredentialSetupFieldRow {
7
+ kind: CredentialSetupFieldKind;
8
+ key: string;
9
+ label: string;
10
+ description?: string;
11
+ required: boolean;
12
+ status: CredentialSetupFieldStatus;
13
+ secretRef?: string;
14
+ envVar?: string;
15
+ }
16
+ export interface CredentialSetupAliasRow {
17
+ logicalKey: string;
18
+ envName: string;
19
+ targetId?: string;
20
+ targetLabel?: string;
21
+ profile?: string;
22
+ framework?: string;
23
+ public: boolean;
24
+ warning?: string;
25
+ }
26
+ export interface CredentialSetupWarning {
27
+ level: CredentialSetupWarningLevel;
28
+ message: string;
29
+ fieldKey?: string;
30
+ }
31
+ export interface CredentialSetupModeOption {
32
+ mode: IntegrationOwnershipMode;
33
+ label: string;
34
+ available: boolean;
35
+ fieldCount: number;
36
+ missingRequiredCount: number;
37
+ docsUrl?: string;
38
+ setupSteps?: string[];
39
+ }
40
+ export interface IntegrationCredentialSetupModel {
41
+ selectedMode: IntegrationOwnershipMode;
42
+ modes: CredentialSetupModeOption[];
43
+ fields: CredentialSetupFieldRow[];
44
+ aliases: CredentialSetupAliasRow[];
45
+ warnings: CredentialSetupWarning[];
46
+ }
47
+ export interface BuildIntegrationCredentialSetupModelInput {
48
+ integration?: IntegrationSpec;
49
+ credentialManifest?: IntegrationCredentialManifest;
50
+ supportedModes?: IntegrationOwnershipMode[];
51
+ selectedMode?: IntegrationOwnershipMode;
52
+ environment?: EnvironmentConfig;
53
+ configValues?: Record<string, unknown>;
54
+ secretRefs?: Record<string, string | undefined>;
55
+ targetIds?: string[];
56
+ profile?: string;
57
+ }
58
+ export declare function buildIntegrationCredentialSetupModel(input: BuildIntegrationCredentialSetupModelInput): IntegrationCredentialSetupModel;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var h=Object.defineProperty;var v=(r)=>r;function P(r,t){this[r]=v.bind(null,t)}var X=(r,t)=>{for(var o in t)h(r,o,{get:t[o],enumerable:!0,configurable:!0,set:P.bind(t,o)})};var $=(r,t)=>()=>(r&&(t=r(r=0)),t);function b(r,t,o,e){return[...B(r?.envAliases??[],o,e),...K(t.environment,t,o,e)]}function B(r,t,o){return r.flatMap((e)=>{if(t.has(e.logicalKey)&&I(e.envVar,e.public))return o.push({level:"error",fieldKey:e.logicalKey,message:`Unsafe public alias was omitted for secret field ${e.logicalKey}.`}),[];return[{logicalKey:e.logicalKey,envName:e.envVar,targetId:e.targetId,public:I(e.envVar,e.public),warning:e.public?"Public client alias":void 0}]})}function K(r,t,o,e){if(!r)return[];return Object.values(r?.variables??{}).flatMap((g)=>(g.aliases??[]).filter((c)=>W(c,r,t)).flatMap((c)=>{let a=I(c.name)||M(c.exposure);if(o.has(g.key)&&a)return e.push({level:"error",fieldKey:g.key,message:`Unsafe public alias was omitted for secret field ${g.key}.`}),[];return[{logicalKey:g.key,envName:c.name,targetId:c.targetId,targetLabel:k(r,c.targetId),profile:c.profile,framework:c.framework,public:a,warning:a?"Public client alias":void 0}]}))}function W(r,t,o){if(o.targetIds?.length&&r.targetId&&!o.targetIds.includes(r.targetId))return!1;if(o.profile&&r.profile&&r.profile!==o.profile)return!1;if(!o.targetIds?.length&&(r.targetId||r.profile||r.framework))return!1;if(r.framework&&r.targetId){let e=t.targets?.[r.targetId]?.framework;if(e&&e!==r.framework)return!1}return!0}function k(r,t){if(!t)return;let o=r.targets?.[t];return o?.packageName??o?.appId??o?.id??t}function M(r){return r==="public-client"||r==="native-client"}function I(r,t){return t===!0||r.startsWith("NEXT_PUBLIC_")||r.startsWith("EXPO_PUBLIC_")}import{getIntegrationCredentialManifest as N}from"@contractspec/lib.contracts-integrations";function w(r){let t=r.credentialManifest??U(r),o=V(r,t),e=r.selectedMode??o[0]??"managed",g=t.modes?.[e],c=new Set((g?.secretFields??[]).map((n)=>n.key)),a=[],y=p(g,r,a),E=b(g,r,c,a),u=o.map((n)=>_(n,t.modes?.[n],r));return{selectedMode:e,modes:u,fields:y,aliases:E,warnings:a}}function U(r){return r.integration?N(r.integration):{}}function V(r,t){return r.supportedModes??r.integration?.supportedModes??Object.keys(t.modes??{})}function _(r,t,o){let e=[...t?.configFields??[],...t?.secretFields??[]],g=e.filter((c)=>c.required&&!A(c,o)).length;return{mode:r,label:r==="byok"?"BYOK":"Managed",available:Boolean(t),fieldCount:e.length,missingRequiredCount:g,docsUrl:t?.docsUrl,setupSteps:t?.setupSteps}}function p(r,t,o){let e=(r?.configFields??[]).map((c)=>l("config",c,t,o)),g=(r?.secretFields??[]).map((c)=>l("secret",c,t,o));return[...e,...g]}function l(r,t,o,e){let g=A(t,o),c=r==="secret"?x(t,o,e):void 0;if(r==="secret"&&t.required===!0&&!g)e.push({level:"warning",fieldKey:t.key,message:`${C(t.key)} is required for BYOK secret reference setup.`});return{kind:r,key:t.key,label:C(t.key),description:t.description,required:t.required===!0,status:g?"configured":t.required?"missing":"optional",secretRef:c,envVar:t.envVar}}function A(r,t){let o=t.configValues?.[r.key],e=t.secretRefs?.[r.key]??t.secretRefs?.[r.envVar??""];return S(o)||S(e)}function x(r,t,o){let e=t.secretRefs?.[r.key]??t.secretRefs?.[r.envVar??""];if(!e)return;if(/^[a-z][a-z0-9+.-]*:\/\//i.test(e)||/^[A-Z][A-Z0-9_]*$/.test(e))return e;o.push({level:"warning",fieldKey:r.key,message:`${C(r.key)} has a value, but it is hidden because it is not a secret reference.`});return}function S(r){return r!==void 0&&r!==null&&r!==""}function C(r){return r.replace(/[_-]+/g," ").replace(/\b\w/g,(t)=>t.toUpperCase())}export{w as buildIntegrationCredentialSetupModel};
@@ -1,3 +1,8 @@
1
+ export * from './atoms/IntegrationCredentialFieldList';
2
+ export * from './atoms/IntegrationCredentialModeTabs';
3
+ export * from './atoms/IntegrationEnvAliasPreview';
4
+ export * from './blocks/IntegrationCredentialSetupBlock';
5
+ export * from './helpers/credentialSetupModel';
1
6
  export * from './molecules/IntegrationCard';
2
7
  export * from './organisms/IntegrationMarketplace';
3
8
  export * from './organisms/IntegrationSettings';