@chargebee/code-sample-generator 0.5.4 → 0.5.5

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/browser.js CHANGED
@@ -1,5 +1,5 @@
1
- import { t as getOperationIdsForVersion, r as getOperationIds, c as getOperation, g as generateFromSample } from "./generate-from-sample-BR8meI75.js";
2
- import { n, A, i, j, k, h, D, o, G, q, l, T, u, m } from "./generate-from-sample-BR8meI75.js";
1
+ import { t as getOperationIdsForVersion, r as getOperationIds, c as getOperation, g as generateFromSample } from "./generate-from-sample-BMaG9lks.js";
2
+ import { n, A, i, j, k, h, D, o, G, q, l, T, u, m } from "./generate-from-sample-BMaG9lks.js";
3
3
  function validateOperationId(id, version) {
4
4
  if (version) {
5
5
  const ops = getOperationIdsForVersion(version);
@@ -84,5 +84,5 @@ import type { CodeSamplesPropsInterface } from "../types";
84
84
  * ```
85
85
  */
86
86
  export declare function CodeSamples({ codeString, language, samples, responseData, initialLanguage, theme: themeProp, responseTheme: responseThemeProp, highlighter, features, className, style, onLanguageChange, onCopy: _onCopy, // Reserved for future use - copy handled by Shiki transformer
87
- onSampleChange, replacements, codeHighlightLanguage, }: CodeSamplesPropsInterface): import("react/jsx-runtime").JSX.Element;
87
+ onSampleChange, replacements, codeHighlightLanguage, requestFooter, }: CodeSamplesPropsInterface): import("react/jsx-runtime").JSX.Element;
88
88
  //# sourceMappingURL=CodeSamples.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeSamples.d.ts","sourceRoot":"","sources":["../../src/components/CodeSamples.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAMH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AA8K1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,eAAwB,EACxB,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,iBAAiB,EAChC,WAAW,EACX,QAAa,EACb,SAAc,EACd,KAAK,EACL,gBAAgB,EAChB,MAAM,EAAE,OAAO,EAAE,8DAA8D;AAC/E,cAAc,EACd,YAAY,EACZ,qBAAqB,GACtB,EAAE,yBAAyB,2CAyf3B"}
1
+ {"version":3,"file":"CodeSamples.d.ts","sourceRoot":"","sources":["../../src/components/CodeSamples.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAMH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AA8K1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,eAAwB,EACxB,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,iBAAiB,EAChC,WAAW,EACX,QAAa,EACb,SAAc,EACd,KAAK,EACL,gBAAgB,EAChB,MAAM,EAAE,OAAO,EAAE,8DAA8D;AAC/E,cAAc,EACd,YAAY,EACZ,qBAAqB,EACrB,aAAa,GACd,EAAE,yBAAyB,2CA8f3B"}
@@ -14,7 +14,12 @@ interface GoToApiExplorerProps {
14
14
  protocol?: string;
15
15
  className?: string;
16
16
  activeSite?: ActiveSite | null;
17
+ /**
18
+ * Optional callback invoked on every click, before navigation.
19
+ * Fires even when `params` is absent (no tab is opened in that case).
20
+ */
21
+ onClick?: () => void;
17
22
  }
18
- export declare function GoToApiExplorer({ resourceKey, operation, language, params, domainName, protocol, className, activeSite, }: GoToApiExplorerProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function GoToApiExplorer({ resourceKey, operation, language, params, domainName, protocol, className, activeSite, onClick, }: GoToApiExplorerProps): import("react/jsx-runtime").JSX.Element;
19
24
  export {};
20
25
  //# sourceMappingURL=GoToApiExplorer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GoToApiExplorer.d.ts","sourceRoot":"","sources":["../../src/components/GoToApiExplorer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,mBAAmB,CAAC;AAE9D,UAAU,oBAAoB;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;CAChC;AAED,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,SAAS,EACT,QAAQ,EACR,MAAM,EACN,UAA4B,EAC5B,QAAkB,EAClB,SAAc,EACd,UAAU,GACX,EAAE,oBAAoB,2CAsCtB"}
1
+ {"version":3,"file":"GoToApiExplorer.d.ts","sourceRoot":"","sources":["../../src/components/GoToApiExplorer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,mBAAmB,CAAC;AAE9D,UAAU,oBAAoB;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC/B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,SAAS,EACT,QAAQ,EACR,MAAM,EACN,UAA4B,EAC5B,QAAkB,EAClB,SAAc,EACd,UAAU,EACV,OAAO,GACR,EAAE,oBAAoB,2CAuCtB"}
@@ -9874,7 +9874,8 @@ function CodeSamples({
9874
9874
  // Reserved for future use - copy handled by Shiki transformer
9875
9875
  onSampleChange,
9876
9876
  replacements,
9877
- codeHighlightLanguage
9877
+ codeHighlightLanguage,
9878
+ requestFooter
9878
9879
  }) {
9879
9880
  const codeSamplesTheme = themeProp || "github-dark";
9880
9881
  const themeNameString = typeof codeSamplesTheme === "string" ? codeSamplesTheme : "github-dark";
@@ -10131,6 +10132,7 @@ function CodeSamples({
10131
10132
  )
10132
10133
  }
10133
10134
  ),
10135
+ requestFooter,
10134
10136
  responseData && /* @__PURE__ */ jsx(
10135
10137
  ResponseDisplay,
10136
10138
  {
@@ -10254,10 +10256,12 @@ function GoToApiExplorer({
10254
10256
  domainName = "chargebee.com",
10255
10257
  protocol = "https",
10256
10258
  className = "",
10257
- activeSite
10259
+ activeSite,
10260
+ onClick
10258
10261
  }) {
10259
10262
  const cleanLanguage = language.replace(/-v\d+$/, "");
10260
10263
  const redirectToExplorer = () => {
10264
+ onClick?.();
10261
10265
  if (params) {
10262
10266
  const base64EncodedUseCase = btoa(JSON.stringify(params));
10263
10267
  const operationName = snakeCase(operation.name);
@@ -31459,7 +31463,8 @@ const descriptor$9i = {
31459
31463
  "rupay",
31460
31464
  "maestro",
31461
31465
  "dankort",
31462
- "cartes_bancaires"
31466
+ "cartes_bancaires",
31467
+ "mada"
31463
31468
  ],
31464
31469
  "n": "Brand",
31465
31470
  "s": true,
@@ -80672,7 +80677,8 @@ const descriptor$4v = {
80672
80677
  "rupay",
80673
80678
  "maestro",
80674
80679
  "dankort",
80675
- "cartes_bancaires"
80680
+ "cartes_bancaires",
80681
+ "mada"
80676
80682
  ],
80677
80683
  "n": "Brand",
80678
80684
  "s": true,
@@ -90766,6 +90772,9 @@ const descriptor$3I = {
90766
90772
  "f": "S",
90767
90773
  "fn": "StringFilter",
90768
90774
  "p": {
90775
+ "is": {
90776
+ "t": "str"
90777
+ },
90769
90778
  "is_present": {
90770
90779
  "t": "str",
90771
90780
  "e": [
@@ -90773,9 +90782,6 @@ const descriptor$3I = {
90773
90782
  "false"
90774
90783
  ],
90775
90784
  "fm": "boolean"
90776
- },
90777
- "is": {
90778
- "t": "str"
90779
90785
  }
90780
90786
  }
90781
90787
  },
@@ -90989,6 +90995,9 @@ const descriptor$3H = {
90989
90995
  "f": "S",
90990
90996
  "fn": "StringFilter",
90991
90997
  "p": {
90998
+ "is": {
90999
+ "t": "str"
91000
+ },
90992
91001
  "is_present": {
90993
91002
  "t": "str",
90994
91003
  "e": [
@@ -90996,9 +91005,6 @@ const descriptor$3H = {
90996
91005
  "false"
90997
91006
  ],
90998
91007
  "fm": "boolean"
90999
- },
91000
- "is": {
91001
- "t": "str"
91002
91008
  }
91003
91009
  }
91004
91010
  },
@@ -91491,6 +91497,9 @@ const descriptor$3G = {
91491
91497
  "f": "S",
91492
91498
  "fn": "StringFilter",
91493
91499
  "p": {
91500
+ "is": {
91501
+ "t": "str"
91502
+ },
91494
91503
  "is_present": {
91495
91504
  "t": "str",
91496
91505
  "e": [
@@ -91498,9 +91507,6 @@ const descriptor$3G = {
91498
91507
  "false"
91499
91508
  ],
91500
91509
  "fm": "boolean"
91501
- },
91502
- "is": {
91503
- "t": "str"
91504
91510
  }
91505
91511
  }
91506
91512
  },
@@ -92566,6 +92572,9 @@ const descriptor$3D = {
92566
92572
  "f": "S",
92567
92573
  "fn": "StringFilter",
92568
92574
  "p": {
92575
+ "is": {
92576
+ "t": "str"
92577
+ },
92569
92578
  "is_present": {
92570
92579
  "t": "str",
92571
92580
  "e": [
@@ -92573,9 +92582,6 @@ const descriptor$3D = {
92573
92582
  "false"
92574
92583
  ],
92575
92584
  "fm": "boolean"
92576
- },
92577
- "is": {
92578
- "t": "str"
92579
92585
  }
92580
92586
  }
92581
92587
  },
@@ -106011,6 +106017,9 @@ const descriptor$2T = {
106011
106017
  "f": "S",
106012
106018
  "fn": "StringFilter",
106013
106019
  "p": {
106020
+ "is": {
106021
+ "t": "str"
106022
+ },
106014
106023
  "is_present": {
106015
106024
  "t": "str",
106016
106025
  "e": [
@@ -106018,9 +106027,6 @@ const descriptor$2T = {
106018
106027
  "false"
106019
106028
  ],
106020
106029
  "fm": "boolean"
106021
- },
106022
- "is": {
106023
- "t": "str"
106024
106030
  }
106025
106031
  }
106026
106032
  },
@@ -106463,6 +106469,9 @@ const descriptor$2S = {
106463
106469
  "f": "S",
106464
106470
  "fn": "StringFilter",
106465
106471
  "p": {
106472
+ "is": {
106473
+ "t": "str"
106474
+ },
106466
106475
  "is_present": {
106467
106476
  "t": "str",
106468
106477
  "e": [
@@ -106470,9 +106479,6 @@ const descriptor$2S = {
106470
106479
  "false"
106471
106480
  ],
106472
106481
  "fm": "boolean"
106473
- },
106474
- "is": {
106475
- "t": "str"
106476
106482
  }
106477
106483
  }
106478
106484
  },
@@ -107055,6 +107061,9 @@ const descriptor$2R = {
107055
107061
  "f": "S",
107056
107062
  "fn": "StringFilter",
107057
107063
  "p": {
107064
+ "is": {
107065
+ "t": "str"
107066
+ },
107058
107067
  "is_present": {
107059
107068
  "t": "str",
107060
107069
  "e": [
@@ -107062,9 +107071,6 @@ const descriptor$2R = {
107062
107071
  "false"
107063
107072
  ],
107064
107073
  "fm": "boolean"
107065
- },
107066
- "is": {
107067
- "t": "str"
107068
107074
  }
107069
107075
  }
107070
107076
  },
@@ -108631,6 +108637,9 @@ const descriptor$2H = {
108631
108637
  "f": "S",
108632
108638
  "fn": "StringFilter",
108633
108639
  "p": {
108640
+ "is": {
108641
+ "t": "str"
108642
+ },
108634
108643
  "is_present": {
108635
108644
  "t": "str",
108636
108645
  "e": [
@@ -108638,9 +108647,6 @@ const descriptor$2H = {
108638
108647
  "false"
108639
108648
  ],
108640
108649
  "fm": "boolean"
108641
- },
108642
- "is": {
108643
- "t": "str"
108644
108650
  }
108645
108651
  }
108646
108652
  },
@@ -128856,4 +128862,4 @@ export {
128856
128862
  isValid as y,
128857
128863
  validateParams as z
128858
128864
  };
128859
- //# sourceMappingURL=generate-from-sample-BR8meI75.js.map
128865
+ //# sourceMappingURL=generate-from-sample-BMaG9lks.js.map