@kya-os/consent 0.1.13 → 0.1.15

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 (131) hide show
  1. package/dist/bundle/inline.d.ts.map +1 -1
  2. package/dist/bundle/inline.js +2 -2
  3. package/dist/bundle/inline.js.map +1 -1
  4. package/dist/bundle/shell.d.ts +5 -0
  5. package/dist/bundle/shell.d.ts.map +1 -1
  6. package/dist/bundle/shell.js +3 -1
  7. package/dist/bundle/shell.js.map +1 -1
  8. package/dist/cjs/bundle/index.js +57 -0
  9. package/dist/cjs/bundle/index.js.map +1 -0
  10. package/dist/cjs/bundle/inline.js +22 -0
  11. package/dist/cjs/bundle/inline.js.map +1 -0
  12. package/dist/cjs/bundle/shell.js +291 -0
  13. package/dist/cjs/bundle/shell.js.map +1 -0
  14. package/dist/cjs/components/consent-button.js +180 -0
  15. package/dist/cjs/components/consent-button.js.map +1 -0
  16. package/dist/cjs/components/consent-checkbox.js +223 -0
  17. package/dist/cjs/components/consent-checkbox.js.map +1 -0
  18. package/dist/cjs/components/consent-input.js +335 -0
  19. package/dist/cjs/components/consent-input.js.map +1 -0
  20. package/dist/cjs/components/consent-oauth-button.js +392 -0
  21. package/dist/cjs/components/consent-oauth-button.js.map +1 -0
  22. package/dist/cjs/components/consent-otp-input.js +388 -0
  23. package/dist/cjs/components/consent-otp-input.js.map +1 -0
  24. package/dist/cjs/components/consent-permissions.js +433 -0
  25. package/dist/cjs/components/consent-permissions.js.map +1 -0
  26. package/dist/cjs/components/consent-shell.js +234 -0
  27. package/dist/cjs/components/consent-shell.js.map +1 -0
  28. package/dist/cjs/components/consent-terms.js +287 -0
  29. package/dist/cjs/components/consent-terms.js.map +1 -0
  30. package/dist/cjs/components/index.js +37 -0
  31. package/dist/cjs/components/index.js.map +1 -0
  32. package/dist/cjs/components/mcp-consent.js +1034 -0
  33. package/dist/cjs/components/mcp-consent.js.map +1 -0
  34. package/dist/cjs/constants/auth-modes.js +128 -0
  35. package/dist/cjs/constants/auth-modes.js.map +1 -0
  36. package/dist/cjs/constants/colors.js +40 -0
  37. package/dist/cjs/constants/colors.js.map +1 -0
  38. package/dist/cjs/constants/defaults.js +146 -0
  39. package/dist/cjs/constants/defaults.js.map +1 -0
  40. package/dist/cjs/constants/index.js +40 -0
  41. package/dist/cjs/constants/index.js.map +1 -0
  42. package/dist/cjs/index.js +49 -0
  43. package/dist/cjs/index.js.map +1 -0
  44. package/dist/cjs/package.json +1 -0
  45. package/dist/cjs/react/index.js +190 -0
  46. package/dist/cjs/react/index.js.map +1 -0
  47. package/dist/cjs/resolution/index.js +28 -0
  48. package/dist/cjs/resolution/index.js.map +1 -0
  49. package/dist/cjs/resolution/resolve-branding.js +159 -0
  50. package/dist/cjs/resolution/resolve-branding.js.map +1 -0
  51. package/dist/cjs/resolution/resolve-config.js +270 -0
  52. package/dist/cjs/resolution/resolve-config.js.map +1 -0
  53. package/dist/cjs/resolution/resolve-copy.js +136 -0
  54. package/dist/cjs/resolution/resolve-copy.js.map +1 -0
  55. package/dist/cjs/schemas/api.schemas.js +162 -0
  56. package/dist/cjs/schemas/api.schemas.js.map +1 -0
  57. package/dist/cjs/schemas/branding.schemas.js +57 -0
  58. package/dist/cjs/schemas/branding.schemas.js.map +1 -0
  59. package/dist/cjs/schemas/config.schemas.js +147 -0
  60. package/dist/cjs/schemas/config.schemas.js.map +1 -0
  61. package/dist/cjs/schemas/index.js +29 -0
  62. package/dist/cjs/schemas/index.js.map +1 -0
  63. package/dist/cjs/schemas/modes.schemas.js +107 -0
  64. package/dist/cjs/schemas/modes.schemas.js.map +1 -0
  65. package/dist/cjs/security/escape.js +206 -0
  66. package/dist/cjs/security/escape.js.map +1 -0
  67. package/dist/cjs/security/index.js +26 -0
  68. package/dist/cjs/security/index.js.map +1 -0
  69. package/dist/cjs/security/validators.js +210 -0
  70. package/dist/cjs/security/validators.js.map +1 -0
  71. package/dist/cjs/styles/css-variables.js +129 -0
  72. package/dist/cjs/styles/css-variables.js.map +1 -0
  73. package/dist/cjs/styles/index.js +28 -0
  74. package/dist/cjs/styles/index.js.map +1 -0
  75. package/dist/cjs/styles/stylesheet.js +204 -0
  76. package/dist/cjs/styles/stylesheet.js.map +1 -0
  77. package/dist/cjs/styles/tokens.js +183 -0
  78. package/dist/cjs/styles/tokens.js.map +1 -0
  79. package/dist/cjs/templates/base/base-template.js +282 -0
  80. package/dist/cjs/templates/base/base-template.js.map +1 -0
  81. package/dist/cjs/templates/base/components.js +295 -0
  82. package/dist/cjs/templates/base/components.js.map +1 -0
  83. package/dist/cjs/templates/base/index.js +26 -0
  84. package/dist/cjs/templates/base/index.js.map +1 -0
  85. package/dist/cjs/templates/index.js +34 -0
  86. package/dist/cjs/templates/index.js.map +1 -0
  87. package/dist/cjs/templates/modes/consent-only.template.js +74 -0
  88. package/dist/cjs/templates/modes/consent-only.template.js.map +1 -0
  89. package/dist/cjs/templates/modes/credentials.template.js +414 -0
  90. package/dist/cjs/templates/modes/credentials.template.js.map +1 -0
  91. package/dist/cjs/templates/modes/index.js +24 -0
  92. package/dist/cjs/templates/modes/index.js.map +1 -0
  93. package/dist/cjs/templates/modes/magic-link.template.js +196 -0
  94. package/dist/cjs/templates/modes/magic-link.template.js.map +1 -0
  95. package/dist/cjs/templates/modes/oauth.template.js +153 -0
  96. package/dist/cjs/templates/modes/oauth.template.js.map +1 -0
  97. package/dist/cjs/templates/modes/otp.template.js +316 -0
  98. package/dist/cjs/templates/modes/otp.template.js.map +1 -0
  99. package/dist/cjs/templates/modes/success.template.js +140 -0
  100. package/dist/cjs/templates/modes/success.template.js.map +1 -0
  101. package/dist/cjs/templates/registry.js +133 -0
  102. package/dist/cjs/templates/registry.js.map +1 -0
  103. package/dist/cjs/types/api.types.js +10 -0
  104. package/dist/cjs/types/api.types.js.map +1 -0
  105. package/dist/cjs/types/branding.types.js +10 -0
  106. package/dist/cjs/types/branding.types.js.map +1 -0
  107. package/dist/cjs/types/config.types.js +10 -0
  108. package/dist/cjs/types/config.types.js.map +1 -0
  109. package/dist/cjs/types/copy.types.js +10 -0
  110. package/dist/cjs/types/copy.types.js.map +1 -0
  111. package/dist/cjs/types/index.js +31 -0
  112. package/dist/cjs/types/index.js.map +1 -0
  113. package/dist/cjs/types/modes.types.js +140 -0
  114. package/dist/cjs/types/modes.types.js.map +1 -0
  115. package/dist/cjs/types/page.types.js +10 -0
  116. package/dist/cjs/types/page.types.js.map +1 -0
  117. package/dist/components/mcp-consent.d.ts +6 -0
  118. package/dist/components/mcp-consent.d.ts.map +1 -1
  119. package/dist/components/mcp-consent.js +14 -0
  120. package/dist/components/mcp-consent.js.map +1 -1
  121. package/dist/consent.js +7 -0
  122. package/dist/consent.min.js +2 -2
  123. package/dist/schemas/api.schemas.d.ts +177 -169
  124. package/dist/schemas/api.schemas.d.ts.map +1 -1
  125. package/dist/schemas/api.schemas.js +6 -0
  126. package/dist/schemas/api.schemas.js.map +1 -1
  127. package/dist/schemas/config.schemas.d.ts +116 -116
  128. package/dist/schemas/modes.schemas.d.ts +28 -28
  129. package/dist/types/api.types.d.ts +6 -0
  130. package/dist/types/api.types.d.ts.map +1 -1
  131. package/package.json +29 -15
@@ -23,21 +23,21 @@ export declare const CredentialsConfigSchema: z.ZodObject<{
23
23
  showForgotPassword: z.ZodOptional<z.ZodBoolean>;
24
24
  forgotPasswordUrl: z.ZodOptional<z.ZodString>;
25
25
  }, "strip", z.ZodTypeAny, {
26
- showForgotPassword?: boolean | undefined;
27
- forgotPasswordUrl?: string | undefined;
28
26
  usernameLabel?: string | undefined;
29
27
  usernamePlaceholder?: string | undefined;
30
28
  passwordLabel?: string | undefined;
31
29
  passwordPlaceholder?: string | undefined;
32
30
  showRememberMe?: boolean | undefined;
33
- }, {
34
31
  showForgotPassword?: boolean | undefined;
35
32
  forgotPasswordUrl?: string | undefined;
33
+ }, {
36
34
  usernameLabel?: string | undefined;
37
35
  usernamePlaceholder?: string | undefined;
38
36
  passwordLabel?: string | undefined;
39
37
  passwordPlaceholder?: string | undefined;
40
38
  showRememberMe?: boolean | undefined;
39
+ showForgotPassword?: boolean | undefined;
40
+ forgotPasswordUrl?: string | undefined;
41
41
  }>;
42
42
  export type CredentialsConfigSchemaType = z.infer<typeof CredentialsConfigSchema>;
43
43
  /**
@@ -67,17 +67,17 @@ export declare const MagicLinkConfigSchema: z.ZodObject<{
67
67
  buttonText: z.ZodOptional<z.ZodString>;
68
68
  resendCooldown: z.ZodOptional<z.ZodNumber>;
69
69
  }, "strip", z.ZodTypeAny, {
70
- resendCooldown?: number | undefined;
71
70
  buttonText?: string | undefined;
72
71
  enabled?: boolean | undefined;
73
72
  emailLabel?: string | undefined;
74
73
  emailPlaceholder?: string | undefined;
75
- }, {
76
74
  resendCooldown?: number | undefined;
75
+ }, {
77
76
  buttonText?: string | undefined;
78
77
  enabled?: boolean | undefined;
79
78
  emailLabel?: string | undefined;
80
79
  emailPlaceholder?: string | undefined;
80
+ resendCooldown?: number | undefined;
81
81
  }>;
82
82
  export type MagicLinkConfigSchemaType = z.infer<typeof MagicLinkConfigSchema>;
83
83
  /**
@@ -91,19 +91,19 @@ export declare const OTPConfigSchema: z.ZodObject<{
91
91
  digits: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<4>, z.ZodLiteral<6>, z.ZodLiteral<8>]>>;
92
92
  resendCooldown: z.ZodOptional<z.ZodNumber>;
93
93
  }, "strip", z.ZodTypeAny, {
94
- resendCooldown?: number | undefined;
95
94
  enabled?: boolean | undefined;
95
+ resendCooldown?: number | undefined;
96
96
  phoneLabel?: string | undefined;
97
97
  phonePlaceholder?: string | undefined;
98
98
  instructions?: string | undefined;
99
- digits?: 4 | 6 | 8 | undefined;
99
+ digits?: 8 | 4 | 6 | undefined;
100
100
  }, {
101
- resendCooldown?: number | undefined;
102
101
  enabled?: boolean | undefined;
102
+ resendCooldown?: number | undefined;
103
103
  phoneLabel?: string | undefined;
104
104
  phonePlaceholder?: string | undefined;
105
105
  instructions?: string | undefined;
106
- digits?: 4 | 6 | 8 | undefined;
106
+ digits?: 8 | 4 | 6 | undefined;
107
107
  }>;
108
108
  export type OTPConfigSchemaType = z.infer<typeof OTPConfigSchema>;
109
109
  /**
@@ -182,21 +182,21 @@ export declare const ModeConfigsSchema: z.ZodObject<{
182
182
  showForgotPassword: z.ZodOptional<z.ZodBoolean>;
183
183
  forgotPasswordUrl: z.ZodOptional<z.ZodString>;
184
184
  }, "strip", z.ZodTypeAny, {
185
- showForgotPassword?: boolean | undefined;
186
- forgotPasswordUrl?: string | undefined;
187
185
  usernameLabel?: string | undefined;
188
186
  usernamePlaceholder?: string | undefined;
189
187
  passwordLabel?: string | undefined;
190
188
  passwordPlaceholder?: string | undefined;
191
189
  showRememberMe?: boolean | undefined;
192
- }, {
193
190
  showForgotPassword?: boolean | undefined;
194
191
  forgotPasswordUrl?: string | undefined;
192
+ }, {
195
193
  usernameLabel?: string | undefined;
196
194
  usernamePlaceholder?: string | undefined;
197
195
  passwordLabel?: string | undefined;
198
196
  passwordPlaceholder?: string | undefined;
199
197
  showRememberMe?: boolean | undefined;
198
+ showForgotPassword?: boolean | undefined;
199
+ forgotPasswordUrl?: string | undefined;
200
200
  }>>;
201
201
  oauth: z.ZodOptional<z.ZodObject<{
202
202
  providerId: z.ZodOptional<z.ZodString>;
@@ -218,17 +218,17 @@ export declare const ModeConfigsSchema: z.ZodObject<{
218
218
  buttonText: z.ZodOptional<z.ZodString>;
219
219
  resendCooldown: z.ZodOptional<z.ZodNumber>;
220
220
  }, "strip", z.ZodTypeAny, {
221
- resendCooldown?: number | undefined;
222
221
  buttonText?: string | undefined;
223
222
  enabled?: boolean | undefined;
224
223
  emailLabel?: string | undefined;
225
224
  emailPlaceholder?: string | undefined;
226
- }, {
227
225
  resendCooldown?: number | undefined;
226
+ }, {
228
227
  buttonText?: string | undefined;
229
228
  enabled?: boolean | undefined;
230
229
  emailLabel?: string | undefined;
231
230
  emailPlaceholder?: string | undefined;
231
+ resendCooldown?: number | undefined;
232
232
  }>>;
233
233
  otp: z.ZodOptional<z.ZodObject<{
234
234
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -238,19 +238,19 @@ export declare const ModeConfigsSchema: z.ZodObject<{
238
238
  digits: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<4>, z.ZodLiteral<6>, z.ZodLiteral<8>]>>;
239
239
  resendCooldown: z.ZodOptional<z.ZodNumber>;
240
240
  }, "strip", z.ZodTypeAny, {
241
- resendCooldown?: number | undefined;
242
241
  enabled?: boolean | undefined;
242
+ resendCooldown?: number | undefined;
243
243
  phoneLabel?: string | undefined;
244
244
  phonePlaceholder?: string | undefined;
245
245
  instructions?: string | undefined;
246
- digits?: 4 | 6 | 8 | undefined;
246
+ digits?: 8 | 4 | 6 | undefined;
247
247
  }, {
248
- resendCooldown?: number | undefined;
249
248
  enabled?: boolean | undefined;
249
+ resendCooldown?: number | undefined;
250
250
  phoneLabel?: string | undefined;
251
251
  phonePlaceholder?: string | undefined;
252
252
  instructions?: string | undefined;
253
- digits?: 4 | 6 | 8 | undefined;
253
+ digits?: 8 | 4 | 6 | undefined;
254
254
  }>>;
255
255
  qrCode: z.ZodOptional<z.ZodObject<{
256
256
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -305,13 +305,13 @@ export declare const ModeConfigsSchema: z.ZodObject<{
305
305
  }>>;
306
306
  }, "strip", z.ZodTypeAny, {
307
307
  credentials?: {
308
- showForgotPassword?: boolean | undefined;
309
- forgotPasswordUrl?: string | undefined;
310
308
  usernameLabel?: string | undefined;
311
309
  usernamePlaceholder?: string | undefined;
312
310
  passwordLabel?: string | undefined;
313
311
  passwordPlaceholder?: string | undefined;
314
312
  showRememberMe?: boolean | undefined;
313
+ showForgotPassword?: boolean | undefined;
314
+ forgotPasswordUrl?: string | undefined;
315
315
  } | undefined;
316
316
  oauth?: {
317
317
  providerId?: string | undefined;
@@ -319,12 +319,12 @@ export declare const ModeConfigsSchema: z.ZodObject<{
319
319
  buttonText?: string | undefined;
320
320
  } | undefined;
321
321
  otp?: {
322
- resendCooldown?: number | undefined;
323
322
  enabled?: boolean | undefined;
323
+ resendCooldown?: number | undefined;
324
324
  phoneLabel?: string | undefined;
325
325
  phonePlaceholder?: string | undefined;
326
326
  instructions?: string | undefined;
327
- digits?: 4 | 6 | 8 | undefined;
327
+ digits?: 8 | 4 | 6 | undefined;
328
328
  } | undefined;
329
329
  passkey?: {
330
330
  buttonText?: string | undefined;
@@ -340,11 +340,11 @@ export declare const ModeConfigsSchema: z.ZodObject<{
340
340
  estimatedTime?: string | undefined;
341
341
  } | undefined;
342
342
  magicLink?: {
343
- resendCooldown?: number | undefined;
344
343
  buttonText?: string | undefined;
345
344
  enabled?: boolean | undefined;
346
345
  emailLabel?: string | undefined;
347
346
  emailPlaceholder?: string | undefined;
347
+ resendCooldown?: number | undefined;
348
348
  } | undefined;
349
349
  qrCode?: {
350
350
  enabled?: boolean | undefined;
@@ -354,13 +354,13 @@ export declare const ModeConfigsSchema: z.ZodObject<{
354
354
  } | undefined;
355
355
  }, {
356
356
  credentials?: {
357
- showForgotPassword?: boolean | undefined;
358
- forgotPasswordUrl?: string | undefined;
359
357
  usernameLabel?: string | undefined;
360
358
  usernamePlaceholder?: string | undefined;
361
359
  passwordLabel?: string | undefined;
362
360
  passwordPlaceholder?: string | undefined;
363
361
  showRememberMe?: boolean | undefined;
362
+ showForgotPassword?: boolean | undefined;
363
+ forgotPasswordUrl?: string | undefined;
364
364
  } | undefined;
365
365
  oauth?: {
366
366
  providerId?: string | undefined;
@@ -368,12 +368,12 @@ export declare const ModeConfigsSchema: z.ZodObject<{
368
368
  buttonText?: string | undefined;
369
369
  } | undefined;
370
370
  otp?: {
371
- resendCooldown?: number | undefined;
372
371
  enabled?: boolean | undefined;
372
+ resendCooldown?: number | undefined;
373
373
  phoneLabel?: string | undefined;
374
374
  phonePlaceholder?: string | undefined;
375
375
  instructions?: string | undefined;
376
- digits?: 4 | 6 | 8 | undefined;
376
+ digits?: 8 | 4 | 6 | undefined;
377
377
  } | undefined;
378
378
  passkey?: {
379
379
  buttonText?: string | undefined;
@@ -389,11 +389,11 @@ export declare const ModeConfigsSchema: z.ZodObject<{
389
389
  estimatedTime?: string | undefined;
390
390
  } | undefined;
391
391
  magicLink?: {
392
- resendCooldown?: number | undefined;
393
392
  buttonText?: string | undefined;
394
393
  enabled?: boolean | undefined;
395
394
  emailLabel?: string | undefined;
396
395
  emailPlaceholder?: string | undefined;
396
+ resendCooldown?: number | undefined;
397
397
  } | undefined;
398
398
  qrCode?: {
399
399
  enabled?: boolean | undefined;
@@ -63,6 +63,12 @@ export interface ConsentApprovalRequest {
63
63
  oauth_identity?: OAuthIdentity | null;
64
64
  /** User DID for persistent identity (optional) */
65
65
  user_did?: string;
66
+ /**
67
+ * Human-readable user identifier from credential authentication.
68
+ * This is separate from user_did (cryptographic identity) and used for UX display.
69
+ * Examples: email address, username, or other provider-specific identifier.
70
+ */
71
+ credential_user_id?: string;
66
72
  }
67
73
  /**
68
74
  * Consent Approval Response
@@ -1 +1 @@
1
- {"version":3,"file":"api.types.d.ts","sourceRoot":"","sources":["../../src/types/api.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IAEb,sBAAsB;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAElB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IAEn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B;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IAEjB,oDAAoD;IACpD,cAAc,CAAC,EAAE,aAAa,CAAC;IAE/B,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/consent",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Canonical consent page types, styles, and utilities for MCP-I and AgentShield",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -8,61 +8,75 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
- "default": "./dist/index.js"
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/cjs/index.js"
12
13
  },
13
14
  "./types": {
14
15
  "types": "./dist/types/index.d.ts",
15
- "default": "./dist/types/index.js"
16
+ "import": "./dist/types/index.js",
17
+ "require": "./dist/cjs/types/index.js"
16
18
  },
17
19
  "./schemas": {
18
20
  "types": "./dist/schemas/index.d.ts",
19
- "default": "./dist/schemas/index.js"
21
+ "import": "./dist/schemas/index.js",
22
+ "require": "./dist/cjs/schemas/index.js"
20
23
  },
21
24
  "./constants": {
22
25
  "types": "./dist/constants/index.d.ts",
23
- "default": "./dist/constants/index.js"
26
+ "import": "./dist/constants/index.js",
27
+ "require": "./dist/cjs/constants/index.js"
24
28
  },
25
29
  "./styles": {
26
30
  "types": "./dist/styles/index.d.ts",
27
- "default": "./dist/styles/index.js"
31
+ "import": "./dist/styles/index.js",
32
+ "require": "./dist/cjs/styles/index.js"
28
33
  },
29
34
  "./resolution": {
30
35
  "types": "./dist/resolution/index.d.ts",
31
- "default": "./dist/resolution/index.js"
36
+ "import": "./dist/resolution/index.js",
37
+ "require": "./dist/cjs/resolution/index.js"
32
38
  },
33
39
  "./security": {
34
40
  "types": "./dist/security/index.d.ts",
35
- "default": "./dist/security/index.js"
41
+ "import": "./dist/security/index.js",
42
+ "require": "./dist/cjs/security/index.js"
36
43
  },
37
44
  "./templates": {
38
45
  "types": "./dist/templates/index.d.ts",
39
- "default": "./dist/templates/index.js"
46
+ "import": "./dist/templates/index.js",
47
+ "require": "./dist/cjs/templates/index.js"
40
48
  },
41
49
  "./components": {
42
50
  "types": "./dist/components/index.d.ts",
43
- "default": "./dist/components/index.js"
51
+ "import": "./dist/components/index.js",
52
+ "require": "./dist/cjs/components/index.js"
44
53
  },
45
54
  "./react": {
46
55
  "types": "./dist/react/index.d.ts",
47
- "default": "./dist/react/index.js"
56
+ "import": "./dist/react/index.js",
57
+ "require": "./dist/cjs/react/index.js"
48
58
  },
49
59
  "./bundle": {
50
60
  "types": "./dist/bundle/index.d.ts",
51
- "default": "./dist/bundle/index.js"
61
+ "import": "./dist/bundle/index.js",
62
+ "require": "./dist/cjs/bundle/index.js"
52
63
  },
53
64
  "./bundle/shell": {
54
65
  "types": "./dist/bundle/shell.d.ts",
55
- "default": "./dist/bundle/shell.js"
66
+ "import": "./dist/bundle/shell.js",
67
+ "require": "./dist/cjs/bundle/shell.js"
56
68
  },
57
69
  "./bundle/inline": {
58
70
  "types": "./dist/bundle/inline.d.ts",
59
- "default": "./dist/bundle/inline.js"
71
+ "import": "./dist/bundle/inline.js",
72
+ "require": "./dist/cjs/bundle/inline.js"
60
73
  },
61
74
  "./consent.js": "./dist/consent.js",
62
75
  "./consent.min.js": "./dist/consent.min.js"
63
76
  },
64
77
  "scripts": {
65
- "build": "tsc -p tsconfig.build.json && npm run build:bundle && npm run build:inline",
78
+ "build": "tsc -p tsconfig.build.json && npm run build:cjs && npm run build:bundle && npm run build:inline",
79
+ "build:cjs": "tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
66
80
  "build:bundle": "esbuild src/bundle/index.ts --bundle --format=esm --target=es2020 --outfile=dist/consent.js && esbuild src/bundle/index.ts --bundle --format=esm --target=es2020 --minify --outfile=dist/consent.min.js",
67
81
  "build:inline": "node scripts/generate-inline-bundle.js && tsc src/bundle/inline.ts --declaration --outDir dist/bundle --module esnext --moduleResolution bundler --target es2020",
68
82
  "preview": "npm run build && npx serve -l 3333 .",