@scalar/api-client 2.29.3 → 2.31.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 (82) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/dist/hooks/useClientConfig.d.ts +3 -0
  3. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  4. package/dist/style.css +1 -1
  5. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +9 -69
  6. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  7. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +74 -76
  8. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +15 -8
  9. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  10. package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
  11. package/dist/v2/blocks/operation-block/components/Header.vue2.js +29 -28
  12. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +1 -1
  13. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -1
  14. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +18 -21
  15. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  16. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +2 -2
  17. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +12 -0
  18. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  19. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +12 -0
  20. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  21. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  22. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +13 -8
  23. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  24. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  25. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +97 -85
  26. package/dist/v2/components/server/ServerDropdown.vue.d.ts +16 -5
  27. package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
  28. package/dist/v2/components/server/ServerDropdown.vue.js +27 -24
  29. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  30. package/dist/v2/features/app/app-events.js +29 -14
  31. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  32. package/dist/v2/features/app/app-state.js +57 -57
  33. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  34. package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
  35. package/dist/v2/features/app/components/AppSidebar.vue2.js +171 -148
  36. package/dist/v2/features/app/helpers/routes.d.ts +42 -12
  37. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  38. package/dist/v2/features/app/helpers/routes.js +57 -26
  39. package/dist/v2/features/collection/OperationCollection.vue.d.ts +6 -0
  40. package/dist/v2/features/collection/OperationCollection.vue.d.ts.map +1 -0
  41. package/dist/v2/features/collection/OperationCollection.vue.js +83 -0
  42. package/dist/v2/features/collection/OperationCollection.vue2.js +4 -0
  43. package/dist/v2/features/collection/components/Authentication.vue.d.ts +2 -2
  44. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  45. package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
  46. package/dist/v2/features/collection/components/Authentication.vue2.js +99 -49
  47. package/dist/v2/features/collection/components/Cookies.vue.d.ts +9 -4
  48. package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
  49. package/dist/v2/features/collection/components/Cookies.vue.js +12 -10
  50. package/dist/v2/features/collection/components/Environment.vue.d.ts +9 -4
  51. package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
  52. package/dist/v2/features/collection/components/Environment.vue.js +18 -16
  53. package/dist/v2/features/collection/components/LabelInput.vue.d.ts +6 -2
  54. package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
  55. package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
  56. package/dist/v2/features/collection/components/LabelInput.vue2.js +20 -18
  57. package/dist/v2/features/collection/components/Overview.vue.d.ts +2 -2
  58. package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
  59. package/dist/v2/features/collection/components/Overview.vue.js +1 -1
  60. package/dist/v2/features/collection/components/Overview.vue2.js +177 -75
  61. package/dist/v2/features/collection/components/Servers.vue.d.ts +2 -2
  62. package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
  63. package/dist/v2/features/collection/components/Servers.vue.js +154 -98
  64. package/dist/v2/features/collection/components/Settings.vue.d.ts +2 -2
  65. package/dist/v2/features/collection/components/Tabs.vue.d.ts +2 -1
  66. package/dist/v2/features/collection/components/Tabs.vue.d.ts.map +1 -1
  67. package/dist/v2/features/collection/components/Tabs.vue.js +25 -27
  68. package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.d.ts +12 -0
  69. package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.d.ts.map +1 -0
  70. package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js +13 -0
  71. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  72. package/dist/v2/features/operation/Operation.vue.js +61 -63
  73. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +5 -3
  74. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
  75. package/dist/v2/features/operation/helpers/get-selected-security.js +7 -8
  76. package/dist/v2/features/operation/helpers/get-selected-server.d.ts +8 -6
  77. package/dist/v2/features/operation/helpers/get-selected-server.d.ts.map +1 -1
  78. package/dist/v2/features/operation/helpers/get-selected-server.js +2 -2
  79. package/dist/v2/workspace-events.d.ts.map +1 -1
  80. package/dist/v2/workspace-events.js +25 -15
  81. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  82. package/package.json +13 -13
@@ -4,7 +4,7 @@ import { type AvailableClients } from '@scalar/types/snippetz';
4
4
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
5
5
  import type { SelectedSecurity } from '@scalar/workspace-store/entities/auth';
6
6
  import type { HistoryEntry } from '@scalar/workspace-store/entities/history/schema';
7
- import type { AuthMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
7
+ import type { AuthMeta, ServerMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
8
8
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
9
9
  import type { OpenApiDocument, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
10
10
  import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation';
@@ -26,11 +26,11 @@ import type { MergedSecuritySchemes } from '../../../v2/blocks/scalar-auth-selec
26
26
  */
27
27
  declare const _default: typeof __VLS_export;
28
28
  export default _default;
29
- declare const __VLS_export: import("vue").DefineComponent<{
29
+ export type OperationBlockProps = {
30
30
  /** Event bus */
31
31
  eventBus: WorkspaceEventBus;
32
32
  /** Document defined security */
33
- documentSecurity: OpenApiDocument["security"];
33
+ documentSecurity: OpenApiDocument['security'];
34
34
  /** Document selected security */
35
35
  documentSelectedSecurity: SelectedSecurity | undefined;
36
36
  /** Application version */
@@ -50,9 +50,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
50
50
  /** Currently selected server */
51
51
  server: ServerObject | null;
52
52
  /** Currently selected client */
53
- selectedClient: WorkspaceStore["workspace"]["x-scalar-default-client"];
53
+ selectedClient: WorkspaceStore['workspace']['x-scalar-default-client'];
54
54
  /** Server list available for operation/document */
55
55
  servers: ServerObject[];
56
+ /** Meta information for the server */
57
+ serverMeta: ServerMeta;
56
58
  /** Hides the client button on the header */
57
59
  hideClientButton?: boolean;
58
60
  /** Client integration */
@@ -60,13 +62,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
60
62
  /** Openapi document url for `modal` mode to open the client app */
61
63
  documentUrl?: string;
62
64
  /** Client source */
63
- source?: "gitbook" | "api-reference";
65
+ source?: 'gitbook' | 'api-reference';
64
66
  /** Operation object */
65
67
  operation: OperationObject;
66
68
  /** Operation selected security */
67
69
  operationSelectedSecurity: SelectedSecurity | undefined;
68
- /** Whether to set security at the operation level */
69
- setOperationSecurity: boolean;
70
70
  /** Currently selected example key for the current operation */
71
71
  exampleKey: string;
72
72
  /** Meta information for the auth update */
@@ -83,66 +83,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
83
83
  environment: XScalarEnvironment;
84
84
  /** The proxy URL for sending requests */
85
85
  proxyUrl: string;
86
- }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
87
- "update:servers": () => any;
88
- }, string, import("vue").PublicProps, Readonly<{
89
- /** Event bus */
90
- eventBus: WorkspaceEventBus;
91
- /** Document defined security */
92
- documentSecurity: OpenApiDocument["security"];
93
- /** Document selected security */
94
- documentSelectedSecurity: SelectedSecurity | undefined;
95
- /** Application version */
96
- appVersion: string;
97
- /** Workspace/document cookies */
98
- globalCookies: ExtendedScalarCookie[];
99
- /** Current request path */
100
- path: string;
101
- /** Current request method */
102
- method: HttpMethodType;
103
- /** HTTP clients */
104
- httpClients: AvailableClients;
105
- /** The history for the operation */
106
- history?: HistoryEntry[];
107
- /** Client layout */
108
- layout: ClientLayout;
109
- /** Currently selected server */
110
- server: ServerObject | null;
111
- /** Currently selected client */
112
- selectedClient: WorkspaceStore["workspace"]["x-scalar-default-client"];
113
- /** Server list available for operation/document */
114
- servers: ServerObject[];
115
- /** Hides the client button on the header */
116
- hideClientButton?: boolean;
117
- /** Client integration */
118
- integration?: string | null;
119
- /** Openapi document url for `modal` mode to open the client app */
120
- documentUrl?: string;
121
- /** Client source */
122
- source?: "gitbook" | "api-reference";
123
- /** Operation object */
124
- operation: OperationObject;
125
- /** Operation selected security */
126
- operationSelectedSecurity: SelectedSecurity | undefined;
127
- /** Whether to set security at the operation level */
128
- setOperationSecurity: boolean;
129
- /** Currently selected example key for the current operation */
130
- exampleKey: string;
131
- /** Meta information for the auth update */
132
- authMeta: AuthMeta;
133
- /** Document defined security schemes */
134
- securitySchemes: MergedSecuritySchemes;
135
- /** Client plugins */
136
- plugins: ClientPlugin[];
137
- /** Environment list */
138
- environments?: string[];
139
- /** Currently selected environment */
140
- activeEnvironment?: string;
141
- /** For environment variables in the inputs */
142
- environment: XScalarEnvironment;
143
- /** The proxy URL for sending requests */
144
- proxyUrl: string;
145
- }> & Readonly<{
146
- "onUpdate:servers"?: (() => any) | undefined;
147
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
86
+ };
87
+ declare const __VLS_export: import("vue").DefineComponent<OperationBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OperationBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
148
88
  //# sourceMappingURL=OperationBlock.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"AAsZA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAA;AACnF,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,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,MAAM;IAC1B,8CAA8C;iBACjC,kBAAkB;IAC/B,yCAAyC;cAC/B,MAAM;;;;IAvDhB,gBAAgB;cACN,iBAAiB;IAC3B,gCAAgC;sBACd,eAAe,CAAC,UAAU,CAAC;IAC7C,iCAAiC;8BACP,gBAAgB,GAAG,SAAS;IACtD,0BAA0B;gBACd,MAAM;IAClB,iCAAiC;mBAClB,oBAAoB,EAAE;IACrC,2BAA2B;UACrB,MAAM;IACZ,6BAA6B;YACrB,cAAc;IACtB,mBAAmB;iBACN,gBAAgB;IAC7B,oCAAoC;cAC1B,YAAY,EAAE;IACxB,oBAAoB;YACZ,YAAY;IACpB,gCAAgC;YACxB,YAAY,GAAG,IAAI;IAC3B,gCAAgC;oBAChB,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC;IACtE,mDAAmD;aAC1C,YAAY,EAAE;IACvB,4CAA4C;uBACzB,OAAO;IAC1B,0BAA0B;kBACZ,MAAM,GAAG,IAAI;IAC3B,mEAAmE;kBACrD,MAAM;IACpB,oBAAoB;aACX,SAAS,GAAG,eAAe;IACpC,uBAAuB;eACZ,eAAe;IAC1B,kCAAkC;+BACP,gBAAgB,GAAG,SAAS;IACvD,qDAAqD;0BAC/B,OAAO;IAC7B,+DAA+D;gBACnD,MAAM;IAClB,2CAA2C;cACjC,QAAQ;IAClB,wCAAwC;qBACvB,qBAAqB;IACtC,qBAAqB;aACZ,YAAY,EAAE;IACvB,uBAAuB;mBACR,MAAM,EAAE;IACvB,qCAAqC;wBACjB,MAAM;IAC1B,8CAA8C;iBACjC,kBAAkB;IAC/B,yCAAyC;cAC/B,MAAM;;;kFA6ad,CAAC"}
1
+ {"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"AAmZA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAAE,KAAK,YAAY,EAAE,MA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EAAE,YAAY,EAAE,CAAA;IACxB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,gCAAgC;IAChC,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,sCAAsC;IACtC,UAAU,EAAE,UAAU,CAAA;IACtB,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oBAAoB;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,eAAe,CAAA;IACpC,uBAAuB;IACvB,SAAS,EAAE,eAAe,CAAA;IAC1B,kCAAkC;IAClC,yBAAyB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACvD,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,2CAA2C;IAC3C,QAAQ,EAAE,QAAQ,CAAA;IAClB,wCAAwC;IACxC,eAAe,EAAE,qBAAqB,CAAA;IACtC,qBAAqB;IACrB,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,uBAAuB;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,qCAAqC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,8CAA8C;IAC9C,WAAW,EAAE,kBAAkB,CAAA;IAC/B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AACD,QAAA,MAAM,YAAY,kTA2Zd,CAAC"}
@@ -1,24 +1,24 @@
1
- import { defineComponent as K, computed as a, ref as c, onMounted as O, onBeforeUnmount as g, watch as V, createElementBlock as w, openBlock as T, createElementVNode as I, createVNode as l, withCtx as x, unref as B } from "vue";
2
- import { AVAILABLE_CLIENTS as M } from "@scalar/types/snippetz";
3
- import { useToasts as A } from "@scalar/use-toasts";
4
- import L from "../../../components/ViewLayout/ViewLayout.vue.js";
5
- import N from "../../../components/ViewLayout/ViewLayoutContent.vue.js";
6
- import { ERRORS as P } from "../../../libs/errors.js";
7
- import { buildRequest as H } from "./helpers/build-request.js";
8
- import { getSecuritySchemes as F } from "./helpers/build-request-security.js";
9
- import { harToFetchRequest as $ } from "./helpers/har-to-fetch-request.js";
10
- import { harToFetchResponse as j } from "./helpers/har-to-fetch-response.js";
11
- import { sendRequest as D } from "./helpers/send-request.js";
12
- import Q from "./components/Header.vue.js";
13
- import { generateClientOptions as z } from "../operation-code-sample/helpers/generate-client-options.js";
14
- import { getSecurityRequirements as G } from "../../features/operation/helpers/get-security-requirements.js";
15
- import { getSelectedSecurity as J } from "../../features/operation/helpers/get-selected-security.js";
16
- import W from "../request-block/RequestBlock.vue.js";
17
- import X from "../response-block/ResponseBlock.vue.js";
18
- const Y = { class: "bg-b-1 flex h-full flex-col" }, Z = { class: "lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0" }, p = {
1
+ import { defineComponent as b, computed as i, ref as m, onMounted as U, onBeforeUnmount as g, watch as K, createElementBlock as M, openBlock as V, createElementVNode as O, createVNode as l, withCtx as x, unref as q } from "vue";
2
+ import { AVAILABLE_CLIENTS as w } from "@scalar/types/snippetz";
3
+ import { useToasts as T } from "@scalar/use-toasts";
4
+ import I from "../../../components/ViewLayout/ViewLayout.vue.js";
5
+ import A from "../../../components/ViewLayout/ViewLayoutContent.vue.js";
6
+ import { ERRORS as L } from "../../../libs/errors.js";
7
+ import { buildRequest as N } from "./helpers/build-request.js";
8
+ import { getSecuritySchemes as P } from "./helpers/build-request-security.js";
9
+ import { harToFetchRequest as H } from "./helpers/har-to-fetch-request.js";
10
+ import { harToFetchResponse as F } from "./helpers/har-to-fetch-response.js";
11
+ import { sendRequest as j } from "./helpers/send-request.js";
12
+ import D from "./components/Header.vue.js";
13
+ import { generateClientOptions as Q } from "../operation-code-sample/helpers/generate-client-options.js";
14
+ import { getSecurityRequirements as $ } from "../../features/operation/helpers/get-security-requirements.js";
15
+ import { getSelectedSecurity as z } from "../../features/operation/helpers/get-selected-security.js";
16
+ import G from "../request-block/RequestBlock.vue.js";
17
+ import J from "../response-block/ResponseBlock.vue.js";
18
+ const W = { class: "bg-b-1 flex h-full flex-col" }, X = { class: "lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0" }, Y = {
19
19
  name: "OperationBlock"
20
- }, fe = /* @__PURE__ */ K({
21
- ...p,
20
+ }, ve = /* @__PURE__ */ b({
21
+ ...Y,
22
22
  props: {
23
23
  eventBus: {},
24
24
  documentSecurity: {},
@@ -27,19 +27,19 @@ const Y = { class: "bg-b-1 flex h-full flex-col" }, Z = { class: "lg:min-h-heade
27
27
  globalCookies: { default: () => [] },
28
28
  path: {},
29
29
  method: {},
30
- httpClients: { default: () => M },
30
+ httpClients: { default: () => w },
31
31
  history: { default: () => [] },
32
32
  layout: {},
33
33
  server: {},
34
34
  selectedClient: {},
35
35
  servers: {},
36
+ serverMeta: {},
36
37
  hideClientButton: { type: Boolean },
37
38
  integration: {},
38
39
  documentUrl: {},
39
40
  source: {},
40
41
  operation: {},
41
42
  operationSelectedSecurity: {},
42
- setOperationSecurity: { type: Boolean },
43
43
  exampleKey: {},
44
44
  authMeta: {},
45
45
  securitySchemes: {},
@@ -49,21 +49,19 @@ const Y = { class: "bg-b-1 flex h-full flex-col" }, Z = { class: "lg:min-h-heade
49
49
  environment: {},
50
50
  proxyUrl: {}
51
51
  },
52
- emits: ["update:servers"],
53
- setup(e, { emit: q }) {
54
- const R = q, C = a(() => z(e.httpClients)), d = a(
55
- () => G(e.documentSecurity, e.operation.security)
56
- ), h = a(
57
- () => J(
52
+ setup(e) {
53
+ const B = i(() => Q(e.httpClients)), h = i(
54
+ () => $(e.documentSecurity, e.operation.security)
55
+ ), d = i(
56
+ () => z(
58
57
  e.documentSelectedSecurity,
59
58
  e.operationSelectedSecurity,
60
- d.value,
61
- e.setOperationSecurity
59
+ h.value
62
60
  )
63
- ), v = a(
64
- () => F(e.securitySchemes, h.value.selectedSchemes)
65
- ), { toast: y } = A(), f = c(null), i = c(null), u = c(null), s = () => f.value?.abort(P.REQUEST_ABORTED), m = async () => {
66
- const [t, n] = H({
61
+ ), v = i(
62
+ () => P(e.securitySchemes, d.value.selectedSchemes)
63
+ ), { toast: y } = T(), f = m(null), r = m(null), u = m(null), s = () => f.value?.abort(L.REQUEST_ABORTED), c = async () => {
64
+ const [t, a] = N({
67
65
  environment: e.environment,
68
66
  exampleKey: e.exampleKey,
69
67
  globalCookies: e.globalCookies,
@@ -78,25 +76,25 @@ const Y = { class: "bg-b-1 flex h-full flex-col" }, Z = { class: "lg:min-h-heade
78
76
  y(t.message, "error");
79
77
  return;
80
78
  }
81
- f.value = n.controller, i.value && "reader" in i.value && i.value.reader.cancel(), e.eventBus.emit("hooks:on:request:sent", {
79
+ f.value = a.controller, r.value && "reader" in r.value && r.value.reader.cancel(), e.eventBus.emit("hooks:on:request:sent", {
82
80
  meta: {
83
81
  method: e.method,
84
82
  path: e.path,
85
83
  exampleKey: e.exampleKey
86
84
  }
87
85
  });
88
- const [o, r] = await D({
89
- isUsingProxy: n.isUsingProxy,
86
+ const [o, n] = await j({
87
+ isUsingProxy: a.isUsingProxy,
90
88
  operation: e.operation,
91
89
  plugins: e.plugins,
92
- request: n.request
90
+ request: a.request
93
91
  });
94
92
  if (e.eventBus.emit("hooks:on:request:complete", {
95
- payload: r ? {
96
- response: r.originalResponse,
97
- request: r.request.clone(),
98
- duration: r.response.duration,
99
- timestamp: r.timestamp
93
+ payload: n ? {
94
+ response: n.originalResponse,
95
+ request: n.request.clone(),
96
+ duration: n.response.duration,
97
+ timestamp: n.timestamp
100
98
  } : void 0,
101
99
  meta: {
102
100
  method: e.method,
@@ -107,42 +105,42 @@ const Y = { class: "bg-b-1 flex h-full flex-col" }, Z = { class: "lg:min-h-heade
107
105
  y(o.message, "error");
108
106
  return;
109
107
  }
110
- i.value = r.response, u.value = r.request;
108
+ r.value = n.response, u.value = n.request;
111
109
  };
112
- O(() => {
113
- e.eventBus.on("operation:send:request:hotkey", m), e.eventBus.on("operation:cancel:request", s);
110
+ U(() => {
111
+ e.eventBus.on("operation:send:request:hotkey", c), e.eventBus.on("operation:cancel:request", s);
114
112
  }), g(() => {
115
- e.eventBus.off("operation:send:request:hotkey", m), e.eventBus.off("operation:cancel:request", s);
113
+ e.eventBus.off("operation:send:request:hotkey", c), e.eventBus.off("operation:cancel:request", s);
116
114
  });
117
- const S = a(
115
+ const S = i(
118
116
  () => e.history.map((t) => ({
119
117
  method: t.request.method,
120
118
  path: t.request.url,
121
119
  duration: t.time,
122
120
  status: t.response.status
123
121
  })).reverse()
124
- ), k = ({ index: t }) => {
125
- const n = (e.history.length ?? 0) - t - 1, o = e.history[n];
122
+ ), R = ({ index: t }) => {
123
+ const a = (e.history.length ?? 0) - t - 1, o = e.history[a];
126
124
  if (!o)
127
125
  return;
128
- const r = () => e.eventBus.emit("ui:navigate", {
126
+ const n = () => e.eventBus.emit("ui:navigate", {
129
127
  page: "example",
130
128
  method: e.method,
131
129
  path: e.path,
132
130
  exampleName: "draft",
133
- callback: (E) => {
134
- if (E !== "success")
131
+ callback: (C) => {
132
+ if (C !== "success")
135
133
  return;
136
- const U = j({
134
+ const k = F({
137
135
  harResponse: o.response,
138
136
  url: o.request.url,
139
137
  method: e.method,
140
138
  path: e.path,
141
139
  duration: o.time
142
- }), b = $({
140
+ }), E = H({
143
141
  harRequest: o.request
144
142
  });
145
- i.value = U, u.value = b;
143
+ r.value = k, u.value = E;
146
144
  }
147
145
  });
148
146
  e.eventBus.emit("operation:reload:history", {
@@ -150,17 +148,17 @@ const Y = { class: "bg-b-1 flex h-full flex-col" }, Z = { class: "lg:min-h-heade
150
148
  path: e.path,
151
149
  method: e.method
152
150
  },
153
- index: n,
154
- callback: r
151
+ index: a,
152
+ callback: n
155
153
  });
156
154
  };
157
- return V([() => e.path, () => e.method, () => e.exampleKey], () => {
158
- i.value = null, u.value = null, s();
155
+ return K([() => e.path, () => e.method, () => e.exampleKey], () => {
156
+ r.value = null, u.value = null, s();
159
157
  }), g(() => {
160
158
  s();
161
- }), (t, n) => (T(), w("div", Y, [
162
- I("div", Z, [
163
- l(Q, {
159
+ }), (t, a) => (V(), M("div", W, [
160
+ O("div", X, [
161
+ l(D, {
164
162
  activeEnvironment: e.activeEnvironment,
165
163
  documentUrl: e.documentUrl,
166
164
  environment: e.environment,
@@ -173,20 +171,20 @@ const Y = { class: "bg-b-1 flex h-full flex-col" }, Z = { class: "lg:min-h-heade
173
171
  method: e.method,
174
172
  path: e.path,
175
173
  server: e.server,
174
+ serverMeta: e.serverMeta,
176
175
  servers: e.servers,
177
176
  source: e.source,
178
- onExecute: m,
179
- "onSelect:history:item": k,
180
- "onUpdate:servers": n[0] || (n[0] = (o) => R("update:servers"))
181
- }, null, 8, ["activeEnvironment", "documentUrl", "environment", "environments", "eventBus", "hideClientButton", "history", "integration", "layout", "method", "path", "server", "servers", "source"])
177
+ onExecute: c,
178
+ "onSelect:history:item": R
179
+ }, null, 8, ["activeEnvironment", "documentUrl", "environment", "environments", "eventBus", "hideClientButton", "history", "integration", "layout", "method", "path", "server", "serverMeta", "servers", "source"])
182
180
  ]),
183
- l(L, { class: "border-t" }, {
181
+ l(I, { class: "border-t" }, {
184
182
  default: x(() => [
185
- l(N, { class: "flex-1" }, {
183
+ l(A, { class: "flex-1" }, {
186
184
  default: x(() => [
187
- l(B(W), {
185
+ l(q(G), {
188
186
  authMeta: e.authMeta,
189
- clientOptions: C.value,
187
+ clientOptions: B.value,
190
188
  environment: e.environment,
191
189
  eventBus: e.eventBus,
192
190
  exampleKey: e.exampleKey,
@@ -197,20 +195,20 @@ const Y = { class: "bg-b-1 flex h-full flex-col" }, Z = { class: "lg:min-h-heade
197
195
  path: e.path,
198
196
  plugins: e.plugins,
199
197
  proxyUrl: e.proxyUrl,
200
- securityRequirements: d.value,
198
+ securityRequirements: h.value,
201
199
  securitySchemes: e.securitySchemes,
202
200
  selectedClient: e.selectedClient,
203
- selectedSecurity: h.value,
201
+ selectedSecurity: d.value,
204
202
  selectedSecuritySchemes: v.value,
205
203
  server: e.server
206
204
  }, null, 8, ["authMeta", "clientOptions", "environment", "eventBus", "exampleKey", "globalCookies", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securityRequirements", "securitySchemes", "selectedClient", "selectedSecurity", "selectedSecuritySchemes", "server"]),
207
- l(B(X), {
205
+ l(q(J), {
208
206
  appVersion: e.appVersion,
209
207
  eventBus: e.eventBus,
210
208
  layout: e.layout,
211
209
  plugins: e.plugins,
212
210
  request: u.value,
213
- response: i.value,
211
+ response: r.value,
214
212
  totalPerformedRequests: S.value.length
215
213
  }, null, 8, ["appVersion", "eventBus", "layout", "plugins", "request", "response", "totalPerformedRequests"])
216
214
  ]),
@@ -223,5 +221,5 @@ const Y = { class: "bg-b-1 flex h-full flex-col" }, Z = { class: "lg:min-h-heade
223
221
  }
224
222
  });
225
223
  export {
226
- fe as default
224
+ ve as default
227
225
  };
@@ -1,10 +1,17 @@
1
1
  import type { HttpMethod } from '@scalar/helpers/http/http-methods';
2
- import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
2
+ import type { ServerMeta, WorkspaceEventBus } from '@scalar/workspace-store/events';
3
3
  import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
4
4
  import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
5
5
  import type { ClientLayout } from '../../../../hooks/index.js';
6
6
  import { type History } from '../../../../v2/blocks/scalar-address-bar-block/index.js';
7
- type __VLS_Props = {
7
+ /**
8
+ Operation block header: address bar, environment selector, and modal controls.
9
+
10
+ Renders the top bar for the API client operation view: URL/method (AddressBar),
11
+ optional environment selector, optional "Open API Client" button in modal layout,
12
+ and close button for modal. Layout and visibility depend on `layout` and `source` props.
13
+ */
14
+ export type HeaderProps = {
8
15
  /** Current request path */
9
16
  path: string;
10
17
  /** Current request method */
@@ -33,22 +40,22 @@ type __VLS_Props = {
33
40
  activeEnvironment?: string;
34
41
  /** Environment variables */
35
42
  environment: XScalarEnvironment;
43
+ /** Meta information for the server */
44
+ serverMeta: ServerMeta;
36
45
  };
37
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
46
+ declare const _default: typeof __VLS_export;
47
+ export default _default;
48
+ declare const __VLS_export: import("vue").DefineComponent<HeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
38
49
  execute: () => any;
39
- "update:servers": () => any;
40
50
  "select:history:item": (payload: {
41
51
  index: number;
42
52
  }) => any;
43
53
  "add:environment": () => any;
44
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
54
+ }, string, import("vue").PublicProps, Readonly<HeaderProps> & Readonly<{
45
55
  onExecute?: (() => any) | undefined;
46
- "onUpdate:servers"?: (() => any) | undefined;
47
56
  "onSelect:history:item"?: ((payload: {
48
57
  index: number;
49
58
  }) => any) | undefined;
50
59
  "onAdd:environment"?: (() => any) | undefined;
51
60
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
52
- declare const _default: typeof __VLS_export;
53
- export default _default;
54
61
  //# sourceMappingURL=Header.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/components/Header.vue"],"names":[],"mappings":"AAmKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGhG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAc,KAAK,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAG/E,KAAK,WAAW,GAAG;IACjB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,UAAU,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oBAAoB;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,eAAe,CAAA;IACpC,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,uBAAuB;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,qCAAqC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,4BAA4B;IAC5B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AAwRF,QAAA,MAAM,YAAY;;;;eAhR6B,MAAM;;;;;;;eAAN,MAAM;;;kFAmRnD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/components/Header.vue"],"names":[],"mappings":"AAqLA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EAClB,MA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"./Header.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7b4b0249"]]);
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-192fe698"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as g, createElementBlock as s, openBlock as o, createElementVNode as i, createVNode as a, unref as l, createBlock as v, createCommentVNode as m } from "vue";
1
+ import { defineComponent as g, createElementBlock as s, openBlock as o, createElementVNode as i, createVNode as a, unref as r, createBlock as u, createCommentVNode as l } from "vue";
2
2
  import { ScalarIcon as d } from "@scalar/components";
3
3
  import x from "../../scalar-address-bar-block/components/EnvironmentSelector.vue.js";
4
4
  import B from "../../scalar-address-bar-block/components/AddressBar.vue.js";
5
5
  import k from "../../../../components/OpenApiClientButton.vue.js";
6
- const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, C = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-2 lg:mb-0 lg:flex-1 lg:px-2.5" }, A = /* @__PURE__ */ g({
6
+ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, h = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-2 lg:mb-0 lg:flex-1 lg:px-2.5" }, S = /* @__PURE__ */ g({
7
7
  __name: "Header",
8
8
  props: {
9
9
  path: {},
@@ -19,20 +19,21 @@ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
19
19
  eventBus: {},
20
20
  environments: {},
21
21
  activeEnvironment: {},
22
- environment: {}
22
+ environment: {},
23
+ serverMeta: {}
23
24
  },
24
- emits: ["execute", "update:servers", "select:history:item", "add:environment"],
25
+ emits: ["execute", "select:history:item", "add:environment"],
25
26
  setup(e, { emit: c }) {
26
- const r = c, f = (u) => {
27
- e.eventBus.emit("workspace:update:active-environment", u);
27
+ const m = c, f = (v) => {
28
+ e.eventBus.emit("workspace:update:active-environment", v);
28
29
  }, y = () => {
29
30
  e.eventBus.emit("ui:navigate", { page: "workspace", path: "environment" });
30
31
  };
31
- return (u, t) => (o(), s("div", b, [
32
- t[8] || (t[8] = i("div", { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, [
32
+ return (v, t) => (o(), s("div", b, [
33
+ t[7] || (t[7] = i("div", { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, [
33
34
  i("div", { class: "size-8" })
34
35
  ], -1)),
35
- a(l(B), {
36
+ a(r(B), {
36
37
  activeEnvironment: e.activeEnvironment,
37
38
  environment: e.environment,
38
39
  environments: e.environments,
@@ -42,58 +43,58 @@ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
42
43
  method: e.method,
43
44
  path: e.path,
44
45
  server: e.server,
46
+ serverMeta: e.serverMeta,
45
47
  servers: e.servers,
46
- "onAdd:environment": t[0] || (t[0] = (n) => r("add:environment")),
47
- onExecute: t[1] || (t[1] = (n) => r("execute")),
48
- "onSelect:history:item": t[2] || (t[2] = (n) => r("select:history:item", n)),
49
- "onUpdate:servers": t[3] || (t[3] = (n) => r("update:servers"))
50
- }, null, 8, ["activeEnvironment", "environment", "environments", "eventBus", "history", "layout", "method", "path", "server", "servers"]),
51
- i("div", C, [
52
- e.layout !== "modal" ? (o(), v(x, {
48
+ "onAdd:environment": t[0] || (t[0] = (n) => m("add:environment")),
49
+ onExecute: t[1] || (t[1] = (n) => m("execute")),
50
+ "onSelect:history:item": t[2] || (t[2] = (n) => m("select:history:item", n))
51
+ }, null, 8, ["activeEnvironment", "environment", "environments", "eventBus", "history", "layout", "method", "path", "server", "serverMeta", "servers"]),
52
+ i("div", h, [
53
+ e.layout !== "modal" ? (o(), u(x, {
53
54
  key: 0,
54
55
  activeEnvironment: e.activeEnvironment,
55
56
  environments: e.environments,
56
57
  "onAdd:environment": y,
57
58
  "onSelect:environment": f
58
- }, null, 8, ["activeEnvironment", "environments"])) : m("", !0),
59
- e.layout === "modal" && e.documentUrl && !e.hideClientButton ? (o(), v(l(k), {
59
+ }, null, 8, ["activeEnvironment", "environments"])) : l("", !0),
60
+ e.layout === "modal" && e.documentUrl && !e.hideClientButton ? (o(), u(r(k), {
60
61
  key: 1,
61
62
  buttonSource: "modal",
62
63
  class: "!w-fit lg:-mr-1",
63
64
  integration: e.integration ?? null,
64
65
  source: e.source ?? "api-reference",
65
66
  url: e.documentUrl
66
- }, null, 8, ["integration", "source", "url"])) : m("", !0),
67
+ }, null, 8, ["integration", "source", "url"])) : l("", !0),
67
68
  e.layout === "modal" && e.source !== "gitbook" ? (o(), s("button", {
68
69
  key: 2,
69
70
  class: "app-exit-button zoomed:static zoomed:p-1 fixed top-2 right-2 rounded-full p-2",
70
71
  type: "button",
71
- onClick: t[4] || (t[4] = (n) => e.eventBus.emit("ui:close:client-modal"))
72
+ onClick: t[3] || (t[3] = (n) => e.eventBus.emit("ui:close:client-modal"))
72
73
  }, [
73
- a(l(d), {
74
+ a(r(d), {
74
75
  icon: "Close",
75
76
  size: "lg",
76
77
  thickness: "2"
77
78
  }),
78
- t[6] || (t[6] = i("span", { class: "sr-only" }, "Close Client", -1))
79
- ])) : m("", !0),
79
+ t[5] || (t[5] = i("span", { class: "sr-only" }, "Close Client", -1))
80
+ ])) : l("", !0),
80
81
  e.layout === "modal" && e.source === "gitbook" ? (o(), s("button", {
81
82
  key: 3,
82
83
  class: "text-c-1 hover:bg-b-2 active:text-c-1 -mr-1.5 rounded p-2",
83
84
  type: "button",
84
- onClick: t[5] || (t[5] = (n) => e.eventBus.emit("ui:close:client-modal"))
85
+ onClick: t[4] || (t[4] = (n) => e.eventBus.emit("ui:close:client-modal"))
85
86
  }, [
86
- a(l(d), {
87
+ a(r(d), {
87
88
  icon: "Close",
88
89
  size: "md",
89
90
  thickness: "1.75"
90
91
  }),
91
- t[7] || (t[7] = i("span", { class: "sr-only" }, "Close Client", -1))
92
- ])) : m("", !0)
92
+ t[6] || (t[6] = i("span", { class: "sr-only" }, "Close Client", -1))
93
+ ])) : l("", !0)
93
94
  ])
94
95
  ]));
95
96
  }
96
97
  });
97
98
  export {
98
- A as default
99
+ S as default
99
100
  };
@@ -1,4 +1,4 @@
1
- import type { Dereference } from '@scalar/workspace-store/helpers/get-resolved-ref';
1
+ import { type Dereference } from '@scalar/workspace-store/helpers/get-resolved-ref';
2
2
  type RefNode<Node> = Partial<Node> & {
3
3
  $ref: string;
4
4
  '$ref-value': Node | RefNode<Node>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-resolved-ref-deep.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAA;AAEnF,KAAK,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAA;AACzF,KAAK,SAAS,CAAC,IAAI,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAE3C;;;;GAIG;AACH,KAAK,eAAe,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,GAC9C,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAC5B,eAAe,CAAC,CAAC,CAAC,EAAE,GACpB,CAAC,SAAS,MAAM,GACd;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAC5G,CAAC,GACL,WAAW,CAAC,CAAC,CAAC,SAAS,MAAM,GAC3B;KACG,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,GAC/D,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,GACjD,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACvC,GACD,WAAW,CAAC,CAAC,CAAC,CAAA;AAEpB;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,EAAE,MAAM,SAAS,CAAC,IAAI,CAAC,KAAG,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CA0D/F,CAAA"}
1
+ {"version":3,"file":"get-resolved-ref-deep.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,kDAAkD,CAAA;AAGnG,KAAK,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAA;AACzF,KAAK,SAAS,CAAC,IAAI,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAE3C;;;;GAIG;AACH,KAAK,eAAe,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,GAC9C,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAC5B,eAAe,CAAC,CAAC,CAAC,EAAE,GACpB,CAAC,SAAS,MAAM,GACd;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAA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