@scalar/api-client 2.2.8 → 2.2.9

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 (141) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  3. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  4. package/dist/components/CodeInput/CodeInput.vue2.js +65 -65
  5. package/dist/components/CodeInput/codeVariableWidget.d.ts +6 -4
  6. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  7. package/dist/components/CodeInput/codeVariableWidget.js +72 -68
  8. package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
  9. package/dist/components/DataTable/DataTable.vue.js +20 -15
  10. package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
  11. package/dist/components/DataTable/DataTableCell.vue.js +16 -11
  12. package/dist/components/DataTable/DataTableHeader.vue.d.ts.map +1 -1
  13. package/dist/components/DataTable/DataTableHeader.vue.js +11 -12
  14. package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -1
  15. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  16. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  17. package/dist/components/DataTable/DataTableInput.vue2.js +9 -9
  18. package/dist/components/DataTable/index.js +14 -14
  19. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  20. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +87 -67
  21. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
  22. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +2 -2
  23. package/dist/components/Sidebar/SidebarList.vue.d.ts.map +1 -1
  24. package/dist/components/Sidebar/SidebarList.vue.js +4 -4
  25. package/dist/components/Sidebar/SidebarListElement.vue.d.ts +8 -4
  26. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  27. package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
  28. package/dist/components/Sidebar/SidebarListElement.vue2.js +52 -32
  29. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +3 -0
  30. package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
  31. package/dist/components/Sidebar/SidebarListElementActions.vue.js +43 -31
  32. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  33. package/dist/components/TopNav/TopNav.vue.js +32 -31
  34. package/dist/layouts/App/create-api-client-app.d.ts +49 -42
  35. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  36. package/dist/layouts/Modal/create-api-client-modal.d.ts +103 -89
  37. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  38. package/dist/layouts/Modal/create-api-client-modal.js +31 -19
  39. package/dist/layouts/Web/create-api-client-web.d.ts +49 -42
  40. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  41. package/dist/libs/create-client.d.ts +50 -44
  42. package/dist/libs/create-client.d.ts.map +1 -1
  43. package/dist/libs/env-helpers.d.ts +9 -0
  44. package/dist/libs/env-helpers.d.ts.map +1 -0
  45. package/dist/libs/env-helpers.js +4 -0
  46. package/dist/libs/environment-parser.d.ts +3 -4
  47. package/dist/libs/environment-parser.d.ts.map +1 -1
  48. package/dist/libs/environment-parser.js +5 -4
  49. package/dist/libs/index.d.ts +1 -0
  50. package/dist/libs/index.d.ts.map +1 -1
  51. package/dist/libs/index.js +24 -22
  52. package/dist/libs/send-request/send-request.d.ts +5 -2
  53. package/dist/libs/send-request/send-request.d.ts.map +1 -1
  54. package/dist/libs/send-request/send-request.js +106 -104
  55. package/dist/routes.d.ts +11 -0
  56. package/dist/routes.d.ts.map +1 -1
  57. package/dist/routes.js +13 -7
  58. package/dist/store/active-entities.d.ts +18 -11
  59. package/dist/store/active-entities.d.ts.map +1 -1
  60. package/dist/store/active-entities.js +108 -69
  61. package/dist/store/collections.d.ts +17 -15
  62. package/dist/store/collections.d.ts.map +1 -1
  63. package/dist/store/collections.js +62 -41
  64. package/dist/store/environment.d.ts +4 -4
  65. package/dist/store/import-spec.d.ts +2 -2
  66. package/dist/store/import-spec.d.ts.map +1 -1
  67. package/dist/store/index.d.ts +1 -0
  68. package/dist/store/index.d.ts.map +1 -1
  69. package/dist/store/index.js +7 -3
  70. package/dist/store/requests.d.ts +4 -4
  71. package/dist/store/router-params.d.ts +1 -1
  72. package/dist/store/router-params.d.ts.map +1 -1
  73. package/dist/store/router-params.js +7 -7
  74. package/dist/store/store.d.ts +49 -42
  75. package/dist/store/store.d.ts.map +1 -1
  76. package/dist/store/store.js +76 -72
  77. package/dist/store/workspace.d.ts +12 -12
  78. package/dist/store/workspace.d.ts.map +1 -1
  79. package/dist/style.css +1 -1
  80. package/dist/types/index.d.ts +2 -0
  81. package/dist/types/index.d.ts.map +1 -0
  82. package/dist/types/index.js +1 -0
  83. package/dist/types/vue.d.ts +10 -0
  84. package/dist/types/vue.d.ts.map +1 -0
  85. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  86. package/dist/views/Cookies/Cookies.vue2.js +75 -70
  87. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  88. package/dist/views/Environment/Environment.vue2.js +308 -152
  89. package/dist/views/Environment/EnvironmentColorModal.vue.d.ts.map +1 -1
  90. package/dist/views/Environment/EnvironmentColorModal.vue.js +20 -18
  91. package/dist/views/Environment/EnvironmentColors.vue.d.ts +4 -1
  92. package/dist/views/Environment/EnvironmentColors.vue.d.ts.map +1 -1
  93. package/dist/views/Environment/EnvironmentColors.vue.js +83 -58
  94. package/dist/views/Environment/EnvironmentModal.vue.d.ts +7 -0
  95. package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
  96. package/dist/views/Environment/EnvironmentModal.vue.js +119 -37
  97. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +4 -5
  98. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  99. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +73 -63
  100. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  101. package/dist/views/Request/Request.vue.js +2 -2
  102. package/dist/views/Request/Request.vue2.js +60 -61
  103. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -0
  104. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  105. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +185 -187
  106. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -0
  107. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  108. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +27 -24
  109. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  110. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
  111. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +35 -187
  112. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +7 -0
  113. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -0
  114. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +7 -0
  115. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +207 -0
  116. package/dist/views/Request/RequestSection/{RequestAuthDataTableInput.vue.d.ts → RequestAuth/RequestAuthDataTableInput.vue.d.ts} +2 -2
  117. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -0
  118. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +43 -0
  119. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +1 -0
  120. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  121. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +5 -134
  122. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +176 -2
  123. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +2 -0
  124. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -0
  125. package/dist/views/Request/RequestSection/RequestAuth/index.js +4 -0
  126. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  127. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  128. package/dist/views/Request/RequestSidebar.vue2.js +129 -109
  129. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  130. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  131. package/dist/views/Request/RequestSidebarItem.vue2.js +32 -38
  132. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  133. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  134. package/dist/views/Request/libs/auth.js +3 -3
  135. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  136. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  137. package/dist/views/Servers/Servers.vue2.js +9 -8
  138. package/package.json +19 -9
  139. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +0 -1
  140. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.js +0 -46
  141. /package/dist/views/Request/RequestSection/{RequestAuthDataTableInput.vue2.js → RequestAuth/RequestAuthDataTableInput.vue2.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 3eb0d11: feat: apply specific OAuth 2.0 security schemes
8
+ - b66a85c: updates environment sidebar to welcome collection environment
9
+ - 3eb0d11: feat: moved api-client auth into references
10
+ - 62e80cd: fix: filters out first request example
11
+ - bccfa3a: fix: scopes scalar button danger overload style
12
+ - 66c1573: fix: edits collection on watch mode toggle from sidebar
13
+ - b66a85c: feat: adds collection environments logic
14
+ - Updated dependencies [3eb0d11]
15
+ - Updated dependencies [b66a85c]
16
+ - Updated dependencies [b66a85c]
17
+ - Updated dependencies [b66a85c]
18
+ - @scalar/oas-utils@0.2.86
19
+ - @scalar/use-codemirror@0.11.47
20
+ - @scalar/components@0.13.3
21
+ - @scalar/import@0.2.4
22
+ - @scalar/postman-to-openapi@0.1.9
23
+
3
24
  ## 2.2.8
4
25
 
5
26
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OA6cO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAA;;kBAkBb,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;;;kBApBX,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;gBAjBZ,OAAO;iBAHN,OAAO;sBAMF,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;gBAEV,OAAO;;qBAmZM,GAAG;kBACN,GAAG;;AA1a9B,wBAweC;AAgBD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AAAA,OA8cO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAA;;kBAkBb,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;;;kBApBX,OAAO;gBACT,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;kBACN,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;WACR,MAAM;eACF,OAAO;oBACF,OAAO;iBACV,OAAO;iBACP,OAAO;cACV,MAAM,GAAG,MAAM;;;;;;gBAjBZ,OAAO;iBAHN,OAAO;sBAMF,OAAO;kBAMX,OAAO;0BACC,OAAO;cAGnB,OAAO;mBACF,OAAO;gBAEV,OAAO;;qBAqZM,GAAG;kBACN,GAAG;;AA5a9B,wBAweC;AAgBD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c2f7308b"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4b3bb606"]]);
6
6
  export {
7
- _ as default
7
+ a as default
8
8
  };
@@ -1,14 +1,14 @@
1
- import { defineComponent as J, useAttrs as L, ref as u, toRef as a, watch as Q, computed as v, openBlock as i, createElementBlock as p, Fragment as G, createBlock as h, mergeProps as H, unref as n, withKeys as w, withModifiers as D, createElementVNode as $, createVNode as X, createCommentVNode as f, renderSlot as q } from "vue";
1
+ import { defineComponent as j, useAttrs as J, ref as u, toRef as a, watch as L, computed as Q, openBlock as r, createElementBlock as p, Fragment as G, createBlock as v, mergeProps as H, unref as s, withKeys as h, withModifiers as D, createElementVNode as E, createVNode as X, createCommentVNode as f, renderSlot as $ } from "vue";
2
2
  import { useCodeMirror as Y, useDropdown as Z, colorPicker as ee } from "@scalar/use-codemirror";
3
3
  import { nanoid as oe } from "nanoid";
4
- import R from "../DataTable/DataTableInputSelect.vue.js";
4
+ import q from "../DataTable/DataTableInputSelect.vue.js";
5
5
  import { pillPlugin as te, backspaceCommand as le } from "./codeVariableWidget.js";
6
6
  import ne from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
7
- import { useClipboard as re } from "@scalar/use-hooks/useClipboard";
8
- import { ScalarIcon as ae } from "@scalar/components";
9
- import { prettyPrintJson as ie } from "@scalar/oas-utils/helpers";
7
+ import { useClipboard as ae } from "@scalar/use-hooks/useClipboard";
8
+ import { ScalarIcon as re } from "@scalar/components";
9
+ import { prettyPrintJson as se } from "@scalar/oas-utils/helpers";
10
10
  import { useActiveEntities as ue } from "../../store/active-entities.js";
11
- import { useWorkspace as se } from "../../store/store.js";
11
+ import { useWorkspace as ie } from "../../store/store.js";
12
12
  const de = ["id"], pe = {
13
13
  key: 0,
14
14
  class: "scalar-code-copy z-context"
@@ -20,7 +20,7 @@ const de = ["id"], pe = {
20
20
  class: "required absolute centered-y right-0 pt-px pr-2 text-xxs text-c-3 bg-b-1 shadow-[-8px_0_4px_var(--scalar-background-1)] opacity-100 duration-150 transition-opacity peer-has-[.cm-focused]:opacity-0 pointer-events-none"
21
21
  }, me = {
22
22
  inheritAttrs: !1
23
- }, Se = /* @__PURE__ */ J({
23
+ }, xe = /* @__PURE__ */ j({
24
24
  ...me,
25
25
  __name: "CodeInput",
26
26
  props: {
@@ -47,43 +47,44 @@ const de = ["id"], pe = {
47
47
  default: {}
48
48
  },
49
49
  emits: ["submit", "update:modelValue", "curl"],
50
- setup(N, { expose: O, emit: _ }) {
50
+ setup(R, { expose: N, emit: O }) {
51
51
  var P;
52
- const e = N, s = _, V = L(), A = V.id || `id-${oe()}`, g = u(!1), m = u(!1), B = u(""), C = u({ left: 0, top: 0 }), c = u(null), { activeEnvVariables: k, activeEnvironment: E, router: I } = ue(), { isReadOnly: S } = se(), { copyToClipboard: K } = re();
53
- function M(o) {
52
+ const e = R, i = O, w = J(), _ = w.id || `id-${oe()}`, V = u(!1), m = u(!1), g = u(""), B = u({ left: 0, top: 0 }), c = u(null), { activeEnvVariables: C, activeEnvironment: k, activeWorkspace: A } = ue(), { isReadOnly: S } = ie(), { copyToClipboard: I } = ae();
53
+ function K(o) {
54
54
  var t;
55
- return o === e.modelValue ? null : e.importCurl && o.trim().toLowerCase().startsWith("curl") ? (s("curl", o), (t = r.value) == null || t.dispatch({
55
+ return o === e.modelValue ? null : e.importCurl && o.trim().toLowerCase().startsWith("curl") ? (i("curl", o), (t = n.value) == null || t.dispatch({
56
56
  changes: {
57
57
  from: 0,
58
- to: r.value.state.doc.length,
58
+ to: n.value.state.doc.length,
59
59
  insert: String(e.modelValue)
60
60
  }
61
- }), null) : e.handleFieldChange ? e.handleFieldChange(o) : s("update:modelValue", o);
61
+ }), null) : e.handleFieldChange ? e.handleFieldChange(o) : i("update:modelValue", o);
62
62
  }
63
- function T(o) {
64
- return e.handleFieldSubmit ? e.handleFieldSubmit(o) : s("submit", o);
63
+ function M(o) {
64
+ return e.handleFieldSubmit ? e.handleFieldSubmit(o) : i("submit", o);
65
65
  }
66
- function z(o) {
67
- g.value = !1, e.emitOnBlur && e.modelValue && T(o);
66
+ function T(o) {
67
+ V.value = !1, e.emitOnBlur && e.modelValue && M(o);
68
68
  }
69
- const y = [];
70
- e.colorPicker && y.push(ee), y.push(
69
+ const b = [];
70
+ e.colorPicker && b.push(ee), b.push(
71
71
  te({
72
- activeEnvironment: E,
73
- activeEnvVariables: k,
72
+ environment: k.value,
73
+ envVariables: C.value,
74
+ workspace: A.value,
74
75
  isReadOnly: S
75
76
  }),
76
77
  le
77
78
  );
78
- const x = u(null), { codeMirror: r } = Y({
79
+ const x = u(null), { codeMirror: n } = Y({
79
80
  content: a(
80
81
  () => e.modelValue !== void 0 ? String(e.modelValue) : ""
81
82
  ),
82
83
  onChange: (o) => {
83
- M(o), W();
84
+ K(o), z();
84
85
  },
85
- onFocus: () => g.value = !0,
86
- onBlur: (o) => z(o),
86
+ onFocus: () => V.value = !0,
87
+ onBlur: (o) => T(o),
87
88
  codeMirrorRef: x,
88
89
  disableTabIndent: a(() => e.disableTabIndent),
89
90
  disableEnter: a(() => e.disableEnter),
@@ -91,49 +92,49 @@ const de = ["id"], pe = {
91
92
  lineNumbers: a(() => e.lineNumbers),
92
93
  language: a(() => e.language),
93
94
  lint: a(() => e.lint),
94
- extensions: y,
95
+ extensions: b,
95
96
  placeholder: a(() => e.placeholder)
96
97
  });
97
- (P = r.value) == null || P.focus(), Q(r, () => {
98
- r.value && Object.prototype.hasOwnProperty.call(V, "autofocus") && r.value.focus();
98
+ (P = n.value) == null || P.focus(), L(n, () => {
99
+ n.value && Object.prototype.hasOwnProperty.call(w, "autofocus") && n.value.focus();
99
100
  });
100
- const { handleDropdownSelect: U, updateDropdownVisibility: W } = Z({
101
- codeMirror: r,
102
- query: B,
101
+ const { handleDropdownSelect: W, updateDropdownVisibility: z } = Z({
102
+ codeMirror: n,
103
+ query: g,
103
104
  showDropdown: m,
104
- dropdownPosition: C
105
- }), j = v(() => {
105
+ dropdownPosition: B
106
+ }), U = Q(() => {
106
107
  var o;
107
108
  return e.type === "boolean" || (o = e.type) != null && o.includes("boolean") || e.nullable ? ["true", "false", "null"] : ["true", "false"];
108
109
  });
109
- O({
110
+ N({
110
111
  focus: () => {
111
112
  var o;
112
- (o = r.value) == null || o.focus();
113
+ (o = n.value) == null || o.focus();
113
114
  }
114
115
  });
115
- const b = (o, t) => {
116
+ const y = (o, t) => {
116
117
  var d, l, F;
117
118
  m.value && (o === "down" ? (t.preventDefault(), (d = c.value) == null || d.handleArrowKey("down")) : o === "up" ? (t.preventDefault(), (l = c.value) == null || l.handleArrowKey("up")) : o === "enter" && (t.preventDefault(), (F = c.value) == null || F.handleSelect()));
118
119
  };
119
120
  return (o, t) => {
120
121
  var d;
121
- return i(), p(G, null, [
122
- e.enum && e.enum.length ? (i(), h(R, {
122
+ return r(), p(G, null, [
123
+ e.enum && e.enum.length ? (r(), v(q, {
123
124
  key: 0,
124
125
  default: e.default,
125
126
  modelValue: e.modelValue,
126
127
  value: e.enum,
127
- "onUpdate:modelValue": t[0] || (t[0] = (l) => s("update:modelValue", l))
128
- }, null, 8, ["default", "modelValue", "value"])) : e.type === "boolean" || (d = e.type) != null && d.includes("boolean") ? (i(), h(R, {
128
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => i("update:modelValue", l))
129
+ }, null, 8, ["default", "modelValue", "value"])) : e.type === "boolean" || (d = e.type) != null && d.includes("boolean") ? (r(), v(q, {
129
130
  key: 1,
130
131
  default: e.default,
131
132
  modelValue: e.modelValue,
132
- value: j.value,
133
- "onUpdate:modelValue": t[1] || (t[1] = (l) => s("update:modelValue", l))
134
- }, null, 8, ["default", "modelValue", "value"])) : (i(), p("div", H({
133
+ value: U.value,
134
+ "onUpdate:modelValue": t[1] || (t[1] = (l) => i("update:modelValue", l))
135
+ }, null, 8, ["default", "modelValue", "value"])) : (r(), p("div", H({
135
136
  key: 2,
136
- id: n(A)
137
+ id: s(_)
137
138
  }, o.$attrs, {
138
139
  ref_key: "codeMirrorRef",
139
140
  ref: x,
@@ -141,45 +142,44 @@ const de = ["id"], pe = {
141
142
  "flow-code-input--error": o.error
142
143
  }],
143
144
  onKeydown: [
144
- t[3] || (t[3] = w(D((l) => b("down", l), ["stop"]), ["down"])),
145
- t[4] || (t[4] = w((l) => b("enter", l), ["enter"])),
146
- t[5] || (t[5] = w(D((l) => b("up", l), ["stop"]), ["up"]))
145
+ t[3] || (t[3] = h(D((l) => y("down", l), ["stop"]), ["down"])),
146
+ t[4] || (t[4] = h((l) => y("enter", l), ["enter"])),
147
+ t[5] || (t[5] = h(D((l) => y("up", l), ["stop"]), ["up"]))
147
148
  ]
148
149
  }), [
149
- o.isCopyable ? (i(), p("div", pe, [
150
- $("button", {
150
+ o.isCopyable ? (r(), p("div", pe, [
151
+ E("button", {
151
152
  class: "copy-button",
152
153
  type: "button",
153
- onClick: t[2] || (t[2] = (l) => n(K)(n(ie)(e.modelValue)))
154
+ onClick: t[2] || (t[2] = (l) => s(I)(s(se)(e.modelValue)))
154
155
  }, [
155
- t[6] || (t[6] = $("span", { class: "sr-only" }, "Copy content", -1)),
156
- X(n(ae), {
156
+ t[6] || (t[6] = E("span", { class: "sr-only" }, "Copy content", -1)),
157
+ X(s(re), {
157
158
  icon: "Clipboard",
158
159
  size: "md"
159
160
  })
160
161
  ])
161
162
  ])) : f("", !0)
162
163
  ], 16, de)),
163
- o.$slots.warning ? (i(), p("div", ce, [
164
- q(o.$slots, "warning", {}, void 0, !0)
164
+ o.$slots.warning ? (r(), p("div", ce, [
165
+ $(o.$slots, "warning", {}, void 0, !0)
165
166
  ])) : f("", !0),
166
- q(o.$slots, "icon", {}, void 0, !0),
167
- o.required ? (i(), p("div", fe, " Required ")) : f("", !0),
168
- m.value && e.withVariables && !n(S) ? (i(), h(ne, {
167
+ $(o.$slots, "icon", {}, void 0, !0),
168
+ o.required ? (r(), p("div", fe, " Required ")) : f("", !0),
169
+ m.value && e.withVariables && !s(S) ? (r(), v(ne, {
169
170
  key: 5,
170
171
  ref_key: "dropdownRef",
171
172
  ref: c,
172
- activeEnvVariables: v(() => n(k)),
173
- activeEnvironment: v(() => n(E)),
174
- dropdownPosition: C.value,
175
- query: B.value,
176
- router: n(I),
177
- onSelect: n(U)
178
- }, null, 8, ["activeEnvVariables", "activeEnvironment", "dropdownPosition", "query", "router", "onSelect"])) : f("", !0)
173
+ dropdownPosition: B.value,
174
+ envVariables: s(C),
175
+ environment: s(k),
176
+ query: g.value,
177
+ onSelect: s(W)
178
+ }, null, 8, ["dropdownPosition", "envVariables", "environment", "query", "onSelect"])) : f("", !0)
179
179
  ], 64);
180
180
  };
181
181
  }
182
182
  });
183
183
  export {
184
- Se as default
184
+ xe as default
185
185
  };
@@ -1,14 +1,16 @@
1
+ import { type EnvVariables } from '../../libs/env-helpers.js';
1
2
  import type { WorkspaceStore } from '../../store/index.js';
2
- import type { ActiveEntitiesStore } from '../../store/active-entities.js';
3
+ import type { Environment } from '@scalar/oas-utils/entities/environment';
4
+ import type { Workspace } from '@scalar/oas-utils/entities/workspace';
3
5
  import { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate } from '@scalar/use-codemirror';
4
- type ActiveParsedEnvironments = ActiveEntitiesStore['activeEnvVariables'];
5
6
  type IsReadOnly = WorkspaceStore['isReadOnly'];
6
7
  /**
7
8
  * Styles the active environment variable pill
8
9
  */
9
10
  export declare const pillPlugin: (props: {
10
- activeEnvironment: ActiveEntitiesStore["activeEnvironment"];
11
- activeEnvVariables: ActiveParsedEnvironments;
11
+ environment: Environment;
12
+ envVariables: EnvVariables;
13
+ workspace: Workspace;
12
14
  isReadOnly: IsReadOnly;
13
15
  }) => ViewPlugin<{
14
16
  decorations: DecorationSet;
@@ -1 +1 @@
1
- {"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAGlE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAI/B,KAAK,wBAAwB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAA;AACzE,KAAK,UAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAA;AAqI9C;;GAEG;AACH,eAAO,MAAM,UAAU,UAAW;IAChC,iBAAiB,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;IAC3D,kBAAkB,EAAE,wBAAwB,CAAA;IAC5C,UAAU,EAAE,UAAU,CAAA;CACvB;iBAGkB,aAAa;mBAMX,UAAU;2BAMF,UAAU;EAiCpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
1
+ {"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,oBAAoB,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAG/B,KAAK,UAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAA;AA+H9C;;GAEG;AACH,eAAO,MAAM,UAAU,UAAW;IAChC,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,YAAY,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,UAAU,EAAE,UAAU,CAAA;CACvB;iBAGkB,aAAa;mBAMX,UAAU;2BASF,UAAU;EAkCpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
@@ -1,56 +1,57 @@
1
- var m = Object.defineProperty;
2
- var v = (n, t, e) => t in n ? m(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var l = (n, t, e) => v(n, typeof t != "symbol" ? t + "" : t, e);
4
- import { ScalarButton as h, ScalarIcon as f, ScalarTooltip as b } from "@scalar/components";
5
- import { REGEX as g } from "@scalar/oas-utils/helpers";
6
- import { ViewPlugin as E, RangeSetBuilder as y, Decoration as x, EditorView as w, WidgetType as N } from "@scalar/use-codemirror";
7
- import { defineComponent as C, h as o, createApp as R } from "vue";
1
+ var h = Object.defineProperty;
2
+ var u = (i, t, e) => t in i ? h(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var r = (i, t, e) => u(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { getEnvColor as f } from "../../libs/env-helpers.js";
5
+ import { ScalarButton as b, ScalarIcon as v, ScalarTooltip as g } from "@scalar/components";
6
+ import { REGEX as w } from "@scalar/oas-utils/helpers";
7
+ import { ViewPlugin as y, RangeSetBuilder as x, Decoration as E, EditorView as N, WidgetType as k } from "@scalar/use-codemirror";
8
+ import { defineComponent as C, h as s, createApp as R } from "vue";
8
9
  import { parseEnvVariables as S } from "../../libs/environment-parser.js";
9
- const V = (n) => n.value ? n.value.color : "#8E8E8E";
10
- class d extends N {
11
- constructor(e, a, i, s) {
10
+ class d extends k {
11
+ constructor(e, o, n, l, a) {
12
12
  super();
13
- l(this, "app");
14
- l(this, "activeEnvironment");
15
- l(this, "activeEnvVariables");
16
- l(this, "isReadOnly");
17
- this.variableName = e, this.variableName = e, this.activeEnvironment = a, this.activeEnvVariables = i, this.isReadOnly = s;
13
+ r(this, "app");
14
+ r(this, "environment");
15
+ r(this, "envVariables");
16
+ r(this, "workspace");
17
+ r(this, "isReadOnly");
18
+ this.variableName = e, this.variableName = e, this.environment = o, this.envVariables = n, this.workspace = l, this.isReadOnly = a;
18
19
  }
19
20
  toDOM() {
20
21
  const e = document.createElement("span");
21
22
  e.className = "cm-pill", e.textContent = `${this.variableName}`;
22
- const a = C({
23
+ const o = C({
23
24
  props: { variableName: { type: String, default: null } },
24
25
  render: () => {
25
- const i = S(this.activeEnvVariables.value).find(
26
+ const n = S(this.envVariables).find(
26
27
  (c) => c.key === this.variableName
27
- ), s = i && this.activeEnvironment.value ? V(this.activeEnvironment) : "#8E8E8E";
28
- e.style.setProperty("--tw-bg-base", s), e.style.opacity = i != null && i.value ? "1" : "0.5";
29
- const r = i != null && i.value ? o("div", { class: "p-2" }, i.value) : o("div", { class: "divide-y divide-1/2 grid" }, [
30
- o("span", { class: "p-2 opacity-25" }, "No value"),
31
- !this.isReadOnly && o("div", { class: "p-1" }, [
32
- o(
33
- h,
28
+ ), l = n && this.environment ? f(this.environment) : "#8E8E8E";
29
+ e.style.setProperty("--tw-bg-base", l || "#8E8E8E"), e.style.opacity = n != null && n.value ? "1" : "0.5";
30
+ const a = n != null && n.value ? s("div", { class: "p-2" }, n.value) : s("div", { class: "divide-y divide-1/2 grid" }, [
31
+ s("span", { class: "p-2 opacity-25" }, "No value"),
32
+ !this.isReadOnly && s("div", { class: "p-1" }, [
33
+ s(
34
+ b,
34
35
  {
35
36
  class: "gap-1.5 justify-start font-normal px-1 py-1.5 h-auto transition-colors rounded no-underline text-xxs w-full hover:bg-b-2",
36
37
  variant: "ghost",
37
- onClick: () => {
38
- window.location.href = "/environment";
39
- }
38
+ onClick: () => window.location.href = `/workspace/${this.workspace.uid}/environment`
40
39
  },
41
- [
42
- o(f, {
43
- class: "w-2",
44
- icon: "Add",
45
- size: "xs"
46
- }),
47
- "Add variable"
48
- ]
40
+ {
41
+ default: () => [
42
+ s(v, {
43
+ class: "w-2",
44
+ icon: "Add",
45
+ size: "xs"
46
+ }),
47
+ "Add variable"
48
+ ]
49
+ }
49
50
  )
50
51
  ])
51
52
  ]);
52
- return o(
53
- b,
53
+ return s(
54
+ g,
54
55
  {
55
56
  align: "center",
56
57
  class: "w-full",
@@ -59,22 +60,22 @@ class d extends N {
59
60
  sideOffset: 6
60
61
  },
61
62
  {
62
- trigger: () => o("span", `${this.variableName}`),
63
- content: () => o(
63
+ trigger: () => s("span", `${this.variableName}`),
64
+ content: () => s(
64
65
  "div",
65
66
  {
66
67
  class: [
67
68
  "border w-content rounded bg-b-1 brightness-lifted text-xxs leading-5 text-c-1",
68
- i != null && i.value ? "border-solid" : "border-dashed"
69
+ n != null && n.value ? "border-solid" : "border-dashed"
69
70
  ]
70
71
  },
71
- r
72
+ a
72
73
  )
73
74
  }
74
75
  );
75
76
  }
76
77
  });
77
- return this.app = R(a, { variableName: this.variableName }), this.app.mount(e), e;
78
+ return this.app = R(o, { variableName: this.variableName }), this.app.mount(e), e;
78
79
  }
79
80
  destroy() {
80
81
  this.app && this.app.unmount();
@@ -86,31 +87,34 @@ class d extends N {
86
87
  return !1;
87
88
  }
88
89
  }
89
- const I = (n) => E.fromClass(
90
+ const q = (i) => y.fromClass(
90
91
  class {
91
92
  constructor(t) {
92
- l(this, "decorations");
93
+ r(this, "decorations");
93
94
  this.decorations = this.buildDecorations(t);
94
95
  }
95
96
  update(t) {
96
- (t.docChanged || t.viewportChanged) && (this.decorations = this.buildDecorations(t.view));
97
+ (t.docChanged || t.viewportChanged) && requestAnimationFrame(() => {
98
+ this.decorations = this.buildDecorations(t.view), t.view.update([]);
99
+ });
97
100
  }
98
101
  buildDecorations(t) {
99
- const e = new y();
100
- for (const { from: a, to: i } of t.visibleRanges) {
101
- const s = t.state.doc.sliceString(a, i);
102
- let r;
103
- for (; (r = g.VARIABLES.exec(s)) !== null; ) {
104
- const c = a + r.index, p = c + r[0].length, u = r[1];
102
+ const e = new x();
103
+ for (const { from: o, to: n } of t.visibleRanges) {
104
+ const l = t.state.doc.sliceString(o, n);
105
+ let a;
106
+ for (; (a = w.VARIABLES.exec(l)) !== null; ) {
107
+ const c = o + a.index, p = c + a[0].length, m = a[1];
105
108
  e.add(
106
109
  c,
107
110
  p,
108
- x.widget({
111
+ E.widget({
109
112
  widget: new d(
110
- u,
111
- n.activeEnvironment,
112
- n.activeEnvVariables,
113
- n.isReadOnly
113
+ m,
114
+ i.environment,
115
+ i.envVariables,
116
+ i.workspace,
117
+ i.isReadOnly
114
118
  ),
115
119
  side: 1
116
120
  })
@@ -123,25 +127,25 @@ const I = (n) => E.fromClass(
123
127
  {
124
128
  decorations: (t) => t.decorations
125
129
  }
126
- ), T = w.domEventHandlers({
127
- keydown(n, t) {
128
- if (n.key === "Backspace") {
129
- const { state: e } = t, { from: a, to: i } = e.selection.main;
130
- if (a === 0 && i === e.doc.length)
130
+ ), I = N.domEventHandlers({
131
+ keydown(i, t) {
132
+ if (i.key === "Backspace") {
133
+ const { state: e } = t, { from: o, to: n } = e.selection.main;
134
+ if (o === 0 && n === e.doc.length)
131
135
  return t.dispatch({
132
136
  changes: { from: 0, to: e.doc.length },
133
137
  selection: { anchor: 0 }
134
- }), n.preventDefault(), !0;
135
- if (a === i && a > 0 && e.doc.sliceString(a - 2, a) === "}}")
138
+ }), i.preventDefault(), !0;
139
+ if (o === n && o > 0 && e.doc.sliceString(o - 2, o) === "}}")
136
140
  return t.dispatch({
137
- changes: { from: a - 2, to: i },
138
- selection: { anchor: a - 2 }
139
- }), n.preventDefault(), !0;
141
+ changes: { from: o - 2, to: n },
142
+ selection: { anchor: o - 2 }
143
+ }), i.preventDefault(), !0;
140
144
  }
141
145
  return !1;
142
146
  }
143
147
  });
144
148
  export {
145
- T as backspaceCommand,
146
- I as pillPlugin
149
+ I as backspaceCommand,
150
+ q as pillPlugin
147
151
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTable.vue"],"names":[],"mappings":"AA8BA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAA;IAC/B,0BAA0B;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAQF,iBAAS,cAAc;WAqDT,OAAO,IAA6B;;yBATrB,GAAG;yBACH,GAAG;;;;EAa/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"DataTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTable.vue"],"names":[],"mappings":"AAuCA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAA;IAC/B,0BAA0B;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AASF,iBAAS,cAAc;WAuDT,OAAO,IAA6B;;yBATrB,GAAG;yBACH,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,31 +1,36 @@
1
- import { defineComponent as a, openBlock as e, createElementBlock as l, normalizeClass as s, createElementVNode as n, normalizeStyle as m, renderSlot as r, createCommentVNode as c } from "vue";
2
- const i = {
1
+ import { defineComponent as t, openBlock as e, createElementBlock as l, normalizeProps as n, guardReactiveProps as m, unref as c, createElementVNode as i, normalizeClass as p, normalizeStyle as u, renderSlot as r, createCommentVNode as d } from "vue";
2
+ import { useBindCx as f } from "@scalar/components";
3
+ const b = {
3
4
  key: 0,
4
5
  class: "sr-only"
5
- }, f = /* @__PURE__ */ a({
6
+ }, g = /* @__PURE__ */ t({
6
7
  __name: "DataTable",
7
8
  props: {
8
9
  columns: {},
9
10
  scroll: { type: Boolean }
10
11
  },
11
- setup(p) {
12
- return (o, u) => (e(), l("div", {
13
- class: s(["border-1/2 rounded bg-b-1", o.scroll ? "overflow-x-auto custom-scroll" : "overflow-visible"])
14
- }, [
15
- n("table", {
16
- class: s(["grid auto-rows-auto min-h-8 mb-0", { "min-w-full w-max": o.scroll }]),
17
- style: m({
18
- gridTemplateColumns: o.columns.map((t) => t || "1fr").join(" ")
12
+ setup(v) {
13
+ const { cx: s } = f();
14
+ return (o, w) => (e(), l("div", n(m(
15
+ c(s)(
16
+ o.scroll ? "overflow-x-auto custom-scroll" : "overflow-visible",
17
+ "scalar-data-table border-1/2 rounded bg-b-1"
18
+ )
19
+ )), [
20
+ i("table", {
21
+ class: p(["grid auto-rows-auto min-h-8 mb-0", { "min-w-full w-max": o.scroll }]),
22
+ style: u({
23
+ gridTemplateColumns: o.columns.map((a) => a || "1fr").join(" ")
19
24
  })
20
25
  }, [
21
- o.$slots.caption ? (e(), l("caption", i, [
26
+ o.$slots.caption ? (e(), l("caption", b, [
22
27
  r(o.$slots, "caption")
23
- ])) : c("", !0),
28
+ ])) : d("", !0),
24
29
  r(o.$slots, "default")
25
30
  ], 6)
26
- ], 2));
31
+ ], 16));
27
32
  }
28
33
  });
29
34
  export {
30
- f as default
35
+ g as default
31
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAIpC,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACxB,CAAC;AAYJ,iBAAS,cAAc;WAqDT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;QAjFZ,MAAM,GAAG,SAAS;6EAyFzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableCell.vue"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAIpC,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACxB,CAAC;AAeJ,iBAAS,cAAc;WA+CT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;QA/EZ,MAAM,GAAG,SAAS;6EAsFzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,21 +1,26 @@
1
- import { defineComponent as r, openBlock as t, createBlock as o, resolveDynamicComponent as l, withCtx as a, renderSlot as n } from "vue";
2
- const m = /* @__PURE__ */ r({
1
+ import { defineComponent as t, openBlock as o, createBlock as l, resolveDynamicComponent as n, mergeProps as s, unref as a, withCtx as i, renderSlot as p } from "vue";
2
+ import { useBindCx as d } from "@scalar/components";
3
+ const b = /* @__PURE__ */ t({
4
+ inheritAttrs: !1,
3
5
  __name: "DataTableCell",
4
6
  props: {
5
7
  is: { default: "td" }
6
8
  },
7
- setup(s) {
8
- return (e, d) => (t(), o(l(e.is), {
9
- class: "min-h-8 min-w-8 border-l-0 border-t-0 border-b-1/2 border-r-1/2 flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative",
10
- role: "cell"
11
- }, {
12
- default: a(() => [
13
- n(e.$slots, "default")
9
+ setup(m) {
10
+ const { cx: r } = d();
11
+ return (e, f) => (o(), l(n(e.is), s(
12
+ a(r)(
13
+ "max-h-8 min-h-8 min-w-8 border-l-0 group-[:not(:first-child)]:border-t-1/2 border-b-0 border-r-1/2 flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative"
14
+ ),
15
+ { role: "cell" }
16
+ ), {
17
+ default: i(() => [
18
+ p(e.$slots, "default")
14
19
  ]),
15
20
  _: 3
16
- }));
21
+ }, 16));
17
22
  }
18
23
  });
19
24
  export {
20
- m as default
25
+ b as default
21
26
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableHeader.vue"],"names":[],"mappings":"AAqBA,iBAAS,cAAc;WA8CT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"DataTableHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableHeader.vue"],"names":[],"mappings":"AA6BA,iBAAS,cAAc;WA0CT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}