@scalar/api-client 2.39.1 → 2.39.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.39.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#8599](https://github.com/scalar/scalar/pull/8599): fix(api-client): truncate long table tooltip content
8
+ - [#8590](https://github.com/scalar/scalar/pull/8590): Group analytic events by api-client product
9
+ - [#8601](https://github.com/scalar/scalar/pull/8601): fix: stringify nested form body example values for table rows
10
+
3
11
  ## 2.39.1
4
12
 
5
13
  ### Patch Changes
package/dist/style.css CHANGED
@@ -5666,10 +5666,6 @@ input[data-v-c1a50a6e]::placeholder {
5666
5666
  max-width: 14px;
5667
5667
  }
5668
5668
 
5669
- .scalar-app .max-w-\[16rem\] {
5670
- max-width: 16rem;
5671
- }
5672
-
5673
5669
  .scalar-app .max-w-\[37px\] {
5674
5670
  max-width: 37px;
5675
5671
  }
@@ -7383,6 +7379,10 @@ input[data-v-c1a50a6e]::placeholder {
7383
7379
  height: 32px;
7384
7380
  }
7385
7381
 
7382
+ :is(.scalar-app .\*\:max-w-64 > *) {
7383
+ max-width: 256px;
7384
+ }
7385
+
7386
7386
  :is(.scalar-app .\*\:cursor-pointer > *) {
7387
7387
  cursor: pointer;
7388
7388
  }
@@ -7661,6 +7661,11 @@ input[data-v-c1a50a6e]::placeholder {
7661
7661
  background-color: var(--scalar-border-color);
7662
7662
  }
7663
7663
 
7664
+ :is(.scalar-app .\*\:not-first\:before\:content-\[\'_·_\'\] > *):not(:first-child):before {
7665
+ --tw-content: " · ";
7666
+ content: var(--tw-content);
7667
+ }
7668
+
7664
7669
  .scalar-app .after\:content-\[\'\:\'\]:after {
7665
7670
  --tw-content: ":";
7666
7671
  content: var(--tw-content);
@@ -8857,16 +8862,6 @@ input[data-v-c1a50a6e]::placeholder {
8857
8862
  display: none;
8858
8863
  }
8859
8864
 
8860
- .schema > span[data-v-f2ab7aa3]:not(:first-child)::before {
8861
- content: '·';
8862
- display: block;
8863
- margin: 0 0.5ch;
8864
- }
8865
- .schema > span[data-v-f2ab7aa3] {
8866
- display: flex;
8867
- white-space: nowrap;
8868
- }
8869
-
8870
8865
  [data-v-36811e28] .cm-editor {
8871
8866
  padding: 0;
8872
8867
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC;AAmLF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"names":[],"mappings":"AAsEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC;AA8KF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,8 +1,6 @@
1
- import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.js";
2
1
  import RequestTableTooltip_vue_vue_type_script_setup_true_lang_default from "./RequestTableTooltip.vue.script.js";
3
- /* empty css */
4
2
  //#region src/v2/blocks/request-block/components/RequestTableTooltip.vue
5
- var RequestTableTooltip_default = /* @__PURE__ */ _plugin_vue_export_helper_default(RequestTableTooltip_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-f2ab7aa3"]]);
3
+ var RequestTableTooltip_default = RequestTableTooltip_vue_vue_type_script_setup_true_lang_default;
6
4
  //#endregion
7
5
  export { RequestTableTooltip_default as default };
8
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.js","names":[],"sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown, ScalarPopover } from '@scalar/components'\nimport { ScalarIconInfo, ScalarIconWarning } from '@scalar/icons'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { validateParameter } from '@/v2/blocks/request-block/helpers/validate-parameter'\n\nconst { schema, value, description } = defineProps<{\n schema?: SchemaObject\n value: string | File | null\n description?: string\n}>()\n\nconst invalidParameterMessage = computed(() => validateParameter(schema, value))\nconst isInvalid = computed(() => invalidParameterMessage.value.ok === false)\n</script>\n<template>\n <ScalarPopover\n :offset=\"4\"\n placement=\"left\"\n teleport>\n <button\n :aria-label=\"isInvalid ? 'Input is invalid' : 'More Information'\"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1\"\n :role=\"isInvalid ? 'alert' : 'none'\"\n type=\"button\">\n <ScalarIconWarning\n v-if=\"isInvalid\"\n class=\"text-orange size-3.5 brightness-90 hover:brightness-75\" />\n <ScalarIconInfo\n v-else\n class=\"text-c-2 hover:text-c-1 size-3.5\" />\n </button>\n <template #popover>\n <div\n class=\"w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none\">\n <div\n v-if=\"invalidParameterMessage.ok === false\"\n class=\"text-error-1\">\n {{ invalidParameterMessage.message }}\n </div>\n <div\n v-else-if=\"\n schema &&\n ('type' in schema ||\n 'format' in schema ||\n 'minimum' in schema ||\n 'maximum' in schema ||\n 'default' in schema)\n \"\n class=\"schema text-c-2 flex items-center\">\n <span v-if=\"'type' in schema\">{{ schema.type }}</span>\n <span v-if=\"'format' in schema\">{{ schema.format }}</span>\n <span v-if=\"'minimum' in schema\">min: {{ schema.minimum }}</span>\n <span v-if=\"'maximum' in schema\">max: {{ schema.maximum }}</span>\n <span v-if=\"'default' in schema\">default: {{ schema.default }}</span>\n </div>\n <ScalarMarkdown\n v-if=\"description && !isInvalid\"\n class=\"max-w-[16rem]\"\n :value=\"description\" />\n </div>\n </template>\n </ScalarPopover>\n</template>\n<style scoped>\n.schema > span:not(:first-child)::before {\n content: '·';\n display: block;\n margin: 0 0.5ch;\n}\n\n.schema > span {\n display: flex;\n white-space: nowrap;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"RequestTableTooltip.vue.js","names":[],"sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown, ScalarPopover } from '@scalar/components'\nimport { ScalarIconInfo, ScalarIconWarning } from '@scalar/icons'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { validateParameter } from '@/v2/blocks/request-block/helpers/validate-parameter'\n\nconst { schema, value, description } = defineProps<{\n schema?: SchemaObject\n value: string | File | null\n description?: string\n}>()\n\nconst invalidParameterMessage = computed(() => validateParameter(schema, value))\nconst isInvalid = computed(() => invalidParameterMessage.value.ok === false)\n</script>\n<template>\n <ScalarPopover\n :offset=\"4\"\n placement=\"left\"\n teleport>\n <button\n :aria-label=\"isInvalid ? 'Input is invalid' : 'More Information'\"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1\"\n :role=\"isInvalid ? 'alert' : 'none'\"\n type=\"button\">\n <ScalarIconWarning\n v-if=\"isInvalid\"\n class=\"text-orange size-3.5 brightness-90 hover:brightness-75\" />\n <ScalarIconInfo\n v-else\n class=\"text-c-2 hover:text-c-1 size-3.5\" />\n </button>\n <template #popover>\n <div\n class=\"w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none *:max-w-64\">\n <div\n v-if=\"invalidParameterMessage.ok === false\"\n class=\"text-error-1\">\n {{ invalidParameterMessage.message }}\n </div>\n <div\n v-else-if=\"\n schema &&\n ('type' in schema ||\n 'format' in schema ||\n 'minimum' in schema ||\n 'maximum' in schema ||\n 'default' in schema)\n \"\n class=\"schema text-c-2 truncate *:not-first:before:content-['_·_']\">\n <span v-if=\"'type' in schema\">{{ schema.type }}</span>\n <span v-if=\"'format' in schema\">{{ schema.format }}</span>\n <span v-if=\"'minimum' in schema\">min: {{ schema.minimum }}</span>\n <span v-if=\"'maximum' in schema\">max: {{ schema.maximum }}</span>\n <span v-if=\"'default' in schema\">default: {{ schema.default }}</span>\n </div>\n <ScalarMarkdown\n v-if=\"description && !isInvalid\"\n :value=\"description\" />\n </div>\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":""}
@@ -4,14 +4,14 @@ import { ScalarMarkdown, ScalarPopover } from "@scalar/components";
4
4
  import { ScalarIconInfo, ScalarIconWarning } from "@scalar/icons";
5
5
  //#region src/v2/blocks/request-block/components/RequestTableTooltip.vue?vue&type=script&setup=true&lang.ts
6
6
  var _hoisted_1 = ["aria-label", "role"];
7
- var _hoisted_2 = { class: "w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none" };
7
+ var _hoisted_2 = { class: "w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none *:max-w-64" };
8
8
  var _hoisted_3 = {
9
9
  key: 0,
10
10
  class: "text-error-1"
11
11
  };
12
12
  var _hoisted_4 = {
13
13
  key: 1,
14
- class: "schema text-c-2 flex items-center"
14
+ class: "schema text-c-2 truncate *:not-first:before:content-['_·_']"
15
15
  };
16
16
  var _hoisted_5 = { key: 0 };
17
17
  var _hoisted_6 = { key: 1 };
@@ -42,7 +42,6 @@ var RequestTableTooltip_vue_vue_type_script_setup_true_lang_default = /* @__PURE
42
42
  "default" in __props.schema ? (openBlock(), createElementBlock("span", _hoisted_9, "default: " + toDisplayString(__props.schema.default), 1)) : createCommentVNode("", true)
43
43
  ])) : createCommentVNode("", true), __props.description && !isInvalid.value ? (openBlock(), createBlock(unref(ScalarMarkdown), {
44
44
  key: 2,
45
- class: "max-w-[16rem]",
46
45
  value: __props.description
47
46
  }, null, 8, ["value"])) : createCommentVNode("", true)])]),
48
47
  default: withCtx(() => [createElementVNode("button", {
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableTooltip.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown, ScalarPopover } from '@scalar/components'\nimport { ScalarIconInfo, ScalarIconWarning } from '@scalar/icons'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { validateParameter } from '@/v2/blocks/request-block/helpers/validate-parameter'\n\nconst { schema, value, description } = defineProps<{\n schema?: SchemaObject\n value: string | File | null\n description?: string\n}>()\n\nconst invalidParameterMessage = computed(() => validateParameter(schema, value))\nconst isInvalid = computed(() => invalidParameterMessage.value.ok === false)\n</script>\n<template>\n <ScalarPopover\n :offset=\"4\"\n placement=\"left\"\n teleport>\n <button\n :aria-label=\"isInvalid ? 'Input is invalid' : 'More Information'\"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1\"\n :role=\"isInvalid ? 'alert' : 'none'\"\n type=\"button\">\n <ScalarIconWarning\n v-if=\"isInvalid\"\n class=\"text-orange size-3.5 brightness-90 hover:brightness-75\" />\n <ScalarIconInfo\n v-else\n class=\"text-c-2 hover:text-c-1 size-3.5\" />\n </button>\n <template #popover>\n <div\n class=\"w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none\">\n <div\n v-if=\"invalidParameterMessage.ok === false\"\n class=\"text-error-1\">\n {{ invalidParameterMessage.message }}\n </div>\n <div\n v-else-if=\"\n schema &&\n ('type' in schema ||\n 'format' in schema ||\n 'minimum' in schema ||\n 'maximum' in schema ||\n 'default' in schema)\n \"\n class=\"schema text-c-2 flex items-center\">\n <span v-if=\"'type' in schema\">{{ schema.type }}</span>\n <span v-if=\"'format' in schema\">{{ schema.format }}</span>\n <span v-if=\"'minimum' in schema\">min: {{ schema.minimum }}</span>\n <span v-if=\"'maximum' in schema\">max: {{ schema.maximum }}</span>\n <span v-if=\"'default' in schema\">default: {{ schema.default }}</span>\n </div>\n <ScalarMarkdown\n v-if=\"description && !isInvalid\"\n class=\"max-w-[16rem]\"\n :value=\"description\" />\n </div>\n </template>\n </ScalarPopover>\n</template>\n<style scoped>\n.schema > span:not(:first-child)::before {\n content: '·';\n display: block;\n margin: 0 0.5ch;\n}\n\n.schema > span {\n display: flex;\n white-space: nowrap;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcA,MAAM,0BAA0B,eAAe,kBAAkB,QAAA,QAAQ,QAAA,MAAM,CAAA;EAC/E,MAAM,YAAY,eAAe,wBAAwB,MAAM,OAAO,MAAK;;uBAGzE,YA8CgB,MAAA,cAAA,EAAA;IA7Cb,QAAQ;IACT,WAAU;IACV,UAAA;;IAaW,SAAO,cA4BV,CA3BN,mBA2BM,OA3BN,YA2BM,CAxBI,wBAAA,MAAwB,OAAE,SAAA,WAAA,EADlC,mBAIM,OAJN,YAIM,gBADD,wBAAA,MAAwB,QAAO,EAAA,EAAA,IAGV,QAAA,WAAA,UAAiC,QAAA,UAAA,YAAoC,QAAA,UAAA,aAAqC,QAAA,UAAA,aAAqC,QAAA,UAAA,aAAqC,QAAA,WAAA,WAAA,EAD9M,mBAeM,OAfN,YAeM;eALkB,QAAA,UAAA,WAAA,EAAtB,mBAAsD,QAAA,YAAA,gBAArB,QAAA,OAAO,KAAI,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;iBACpB,QAAA,UAAA,WAAA,EAAxB,mBAA0D,QAAA,YAAA,gBAAvB,QAAA,OAAO,OAAM,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;kBACvB,QAAA,UAAA,WAAA,EAAzB,mBAAiE,QAAA,YAAhC,UAAK,gBAAG,QAAA,OAAO,QAAO,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;kBAC9B,QAAA,UAAA,WAAA,EAAzB,mBAAiE,QAAA,YAAhC,UAAK,gBAAG,QAAA,OAAO,QAAO,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;kBAC9B,QAAA,UAAA,WAAA,EAAzB,mBAAqE,QAAA,YAApC,cAAS,gBAAG,QAAA,OAAO,QAAO,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;wCAGrD,QAAA,eAAW,CAAK,UAAA,SAAA,WAAA,EADxB,YAGyB,MAAA,eAAA,EAAA;;KADvB,OAAM;KACL,OAAO,QAAA;;2BA5BL,CAXT,mBAWS,UAAA;KAVN,cAAY,UAAA,QAAS,qBAAA;KACtB,OAAM;KACL,MAAM,UAAA,QAAS,UAAA;KAChB,MAAK;QAEG,UAAA,SAAA,WAAA,EADR,YAEmE,MAAA,kBAAA,EAAA;;KAAjE,OAAM;wBACR,YAE6C,MAAA,eAAA,EAAA;;KAA3C,OAAM"}
1
+ {"version":3,"file":"RequestTableTooltip.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/request-block/components/RequestTableTooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdown, ScalarPopover } from '@scalar/components'\nimport { ScalarIconInfo, ScalarIconWarning } from '@scalar/icons'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { validateParameter } from '@/v2/blocks/request-block/helpers/validate-parameter'\n\nconst { schema, value, description } = defineProps<{\n schema?: SchemaObject\n value: string | File | null\n description?: string\n}>()\n\nconst invalidParameterMessage = computed(() => validateParameter(schema, value))\nconst isInvalid = computed(() => invalidParameterMessage.value.ok === false)\n</script>\n<template>\n <ScalarPopover\n :offset=\"4\"\n placement=\"left\"\n teleport>\n <button\n :aria-label=\"isInvalid ? 'Input is invalid' : 'More Information'\"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1\"\n :role=\"isInvalid ? 'alert' : 'none'\"\n type=\"button\">\n <ScalarIconWarning\n v-if=\"isInvalid\"\n class=\"text-orange size-3.5 brightness-90 hover:brightness-75\" />\n <ScalarIconInfo\n v-else\n class=\"text-c-2 hover:text-c-1 size-3.5\" />\n </button>\n <template #popover>\n <div\n class=\"w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none *:max-w-64\">\n <div\n v-if=\"invalidParameterMessage.ok === false\"\n class=\"text-error-1\">\n {{ invalidParameterMessage.message }}\n </div>\n <div\n v-else-if=\"\n schema &&\n ('type' in schema ||\n 'format' in schema ||\n 'minimum' in schema ||\n 'maximum' in schema ||\n 'default' in schema)\n \"\n class=\"schema text-c-2 truncate *:not-first:before:content-['_·_']\">\n <span v-if=\"'type' in schema\">{{ schema.type }}</span>\n <span v-if=\"'format' in schema\">{{ schema.format }}</span>\n <span v-if=\"'minimum' in schema\">min: {{ schema.minimum }}</span>\n <span v-if=\"'maximum' in schema\">max: {{ schema.maximum }}</span>\n <span v-if=\"'default' in schema\">default: {{ schema.default }}</span>\n </div>\n <ScalarMarkdown\n v-if=\"description && !isInvalid\"\n :value=\"description\" />\n </div>\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcA,MAAM,0BAA0B,eAAe,kBAAkB,QAAA,QAAQ,QAAA,MAAM,CAAA;EAC/E,MAAM,YAAY,eAAe,wBAAwB,MAAM,OAAO,MAAK;;uBAGzE,YA6CgB,MAAA,cAAA,EAAA;IA5Cb,QAAQ;IACT,WAAU;IACV,UAAA;;IAaW,SAAO,cA2BV,CA1BN,mBA0BM,OA1BN,YA0BM,CAvBI,wBAAA,MAAwB,OAAE,SAAA,WAAA,EADlC,mBAIM,OAJN,YAIM,gBADD,wBAAA,MAAwB,QAAO,EAAA,EAAA,IAGV,QAAA,WAAA,UAAiC,QAAA,UAAA,YAAoC,QAAA,UAAA,aAAqC,QAAA,UAAA,aAAqC,QAAA,UAAA,aAAqC,QAAA,WAAA,WAAA,EAD9M,mBAeM,OAfN,YAeM;eALkB,QAAA,UAAA,WAAA,EAAtB,mBAAsD,QAAA,YAAA,gBAArB,QAAA,OAAO,KAAI,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;iBACpB,QAAA,UAAA,WAAA,EAAxB,mBAA0D,QAAA,YAAA,gBAAvB,QAAA,OAAO,OAAM,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;kBACvB,QAAA,UAAA,WAAA,EAAzB,mBAAiE,QAAA,YAAhC,UAAK,gBAAG,QAAA,OAAO,QAAO,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;kBAC9B,QAAA,UAAA,WAAA,EAAzB,mBAAiE,QAAA,YAAhC,UAAK,gBAAG,QAAA,OAAO,QAAO,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;kBAC9B,QAAA,UAAA,WAAA,EAAzB,mBAAqE,QAAA,YAApC,cAAS,gBAAG,QAAA,OAAO,QAAO,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;wCAGrD,QAAA,eAAW,CAAK,UAAA,SAAA,WAAA,EADxB,YAEyB,MAAA,eAAA,EAAA;;KAAtB,OAAO,QAAA;;2BA3BL,CAXT,mBAWS,UAAA;KAVN,cAAY,UAAA,QAAS,qBAAA;KACtB,OAAM;KACL,MAAM,UAAA,QAAS,UAAA;KAChB,MAAK;QAEG,UAAA,SAAA,WAAA,EADR,YAEmE,MAAA,kBAAA,EAAA;;KAAjE,OAAM;wBACR,YAE6C,MAAA,eAAA,EAAA;;KAA3C,OAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-form-body-rows.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-form-body-rows.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAG/G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0DAA0D,CAAA;AAExF,uGAAuG;AACvG,eAAO,MAAM,eAAe,GAC1B,SAAS,aAAa,GAAG,SAAS,GAAG,IAAI,EACzC,aAAa,MAAM,EACnB,iBAAiB,YAAY,KAC5B,QAAQ,EAqDV,CAAA"}
1
+ {"version":3,"file":"get-form-body-rows.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-form-body-rows.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAG/G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0DAA0D,CAAA;AAYxF,uGAAuG;AACvG,eAAO,MAAM,eAAe,GAC1B,SAAS,aAAa,GAAG,SAAS,GAAG,IAAI,EACzC,aAAa,MAAM,EACnB,iBAAiB,YAAY,KAC5B,QAAQ,EAuDV,CAAA"}
@@ -3,6 +3,11 @@ import { resolve } from "@scalar/workspace-store/resolve";
3
3
  import { objectEntries } from "@scalar/helpers/object/object-entries";
4
4
  import { isObjectSchema } from "@scalar/workspace-store/schemas/v3.1/strict/type-guards";
5
5
  //#region src/v2/blocks/request-block/helpers/get-form-body-rows.ts
6
+ var stringifyValue = (value) => {
7
+ if (value instanceof File) return value.name;
8
+ if (typeof value === "object" && value !== null) return JSON.stringify(value);
9
+ return String(value);
10
+ };
6
11
  /** Build the table rows for the form data, optionally enriched with schema (e.g. enum) per property */
7
12
  var getFormBodyRows = (example, contentType, formBodySchema) => {
8
13
  if (!example?.value || contentType !== "multipart/form-data" && contentType !== "application/x-www-form-urlencoded") return [];
@@ -36,7 +41,7 @@ var getFormBodyRows = (example, contentType, formBodySchema) => {
36
41
  });
37
42
  if (typeof example.value === "object" && example.value) return objectEntries(example.value).map(([key, value]) => mapRow({
38
43
  name: String(key),
39
- value
44
+ value: stringifyValue(value)
40
45
  }));
41
46
  return [];
42
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-form-body-rows.js","names":[],"sources":["../../../../../src/v2/blocks/request-block/helpers/get-form-body-rows.ts"],"sourcesContent":["import { isObject } from '@scalar/helpers/object/is-object'\nimport { objectEntries } from '@scalar/helpers/object/object-entries'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { ExampleObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isObjectSchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\nimport type { TableRow } from '@/v2/blocks/request-block/components/RequestTableRow.vue'\n\n/** Build the table rows for the form data, optionally enriched with schema (e.g. enum) per property */\nexport const getFormBodyRows = (\n example: ExampleObject | undefined | null,\n contentType: string,\n formBodySchema?: SchemaObject,\n): TableRow[] => {\n // We only need the rows for formData\n if (\n !example?.value ||\n (contentType !== 'multipart/form-data' && contentType !== 'application/x-www-form-urlencoded')\n ) {\n return []\n }\n\n // Get all the schema properties if the schema is an object schema\n const schemaWithProperties = formBodySchema && isObjectSchema(formBodySchema) ? formBodySchema : undefined\n const requiredSet = schemaWithProperties ? new Set(schemaWithProperties.required ?? []) : undefined\n\n const mapRow = ({\n name,\n value,\n isDisabled = false,\n }: {\n name: string\n value: string | File\n isDisabled?: boolean\n }): TableRow => {\n const row: TableRow = { name, value, isDisabled }\n if (!schemaWithProperties || !name) {\n return row\n }\n const propSchema = resolve.schema(schemaWithProperties.properties?.[name])\n row.schema = propSchema\n row.description = propSchema?.description\n row.isRequired = requiredSet?.has(name)\n row.isDisabled = isDisabled\n return row\n }\n\n // We have form data stored as an array\n if (Array.isArray(example.value)) {\n return example.value.map((exampleValue) => {\n if (isObject(exampleValue)) {\n const name = String(exampleValue.name)\n const value = exampleValue.value instanceof File ? exampleValue.value : String(exampleValue.value)\n const isDisabled = Boolean(exampleValue.isDisabled)\n return mapRow({ name, value, isDisabled })\n }\n return { name: '', value: exampleValue, isDisabled: false }\n })\n }\n\n // We got an object try to convert it to an array of rows\n if (typeof example.value === 'object' && example.value) {\n return objectEntries(example.value).map(([key, value]) => mapRow({ name: String(key), value }))\n }\n\n return []\n}\n"],"mappings":";;;;;;AASA,IAAa,mBACX,SACA,aACA,mBACe;AAEf,KACE,CAAC,SAAS,SACT,gBAAgB,yBAAyB,gBAAgB,oCAE1D,QAAO,EAAE;CAIX,MAAM,uBAAuB,kBAAkB,eAAe,eAAe,GAAG,iBAAiB,KAAA;CACjG,MAAM,cAAc,uBAAuB,IAAI,IAAI,qBAAqB,YAAY,EAAE,CAAC,GAAG,KAAA;CAE1F,MAAM,UAAU,EACd,MACA,OACA,aAAa,YAKC;EACd,MAAM,MAAgB;GAAE;GAAM;GAAO;GAAY;AACjD,MAAI,CAAC,wBAAwB,CAAC,KAC5B,QAAO;EAET,MAAM,aAAa,QAAQ,OAAO,qBAAqB,aAAa,MAAM;AAC1E,MAAI,SAAS;AACb,MAAI,cAAc,YAAY;AAC9B,MAAI,aAAa,aAAa,IAAI,KAAK;AACvC,MAAI,aAAa;AACjB,SAAO;;AAIT,KAAI,MAAM,QAAQ,QAAQ,MAAM,CAC9B,QAAO,QAAQ,MAAM,KAAK,iBAAiB;AACzC,MAAI,SAAS,aAAa,CAIxB,QAAO,OAAO;GAAE,MAHH,OAAO,aAAa,KAAK;GAGhB,OAFR,aAAa,iBAAiB,OAAO,aAAa,QAAQ,OAAO,aAAa,MAAM;GAErE,YADV,QAAQ,aAAa,WAAW;GACV,CAAC;AAE5C,SAAO;GAAE,MAAM;GAAI,OAAO;GAAc,YAAY;GAAO;GAC3D;AAIJ,KAAI,OAAO,QAAQ,UAAU,YAAY,QAAQ,MAC/C,QAAO,cAAc,QAAQ,MAAM,CAAC,KAAK,CAAC,KAAK,WAAW,OAAO;EAAE,MAAM,OAAO,IAAI;EAAE;EAAO,CAAC,CAAC;AAGjG,QAAO,EAAE"}
1
+ {"version":3,"file":"get-form-body-rows.js","names":[],"sources":["../../../../../src/v2/blocks/request-block/helpers/get-form-body-rows.ts"],"sourcesContent":["import { isObject } from '@scalar/helpers/object/is-object'\nimport { objectEntries } from '@scalar/helpers/object/object-entries'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { ExampleObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isObjectSchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\nimport type { TableRow } from '@/v2/blocks/request-block/components/RequestTableRow.vue'\n\nconst stringifyValue = (value: unknown) => {\n if (value instanceof File) {\n return value.name\n }\n if (typeof value === 'object' && value !== null) {\n return JSON.stringify(value)\n }\n return String(value)\n}\n\n/** Build the table rows for the form data, optionally enriched with schema (e.g. enum) per property */\nexport const getFormBodyRows = (\n example: ExampleObject | undefined | null,\n contentType: string,\n formBodySchema?: SchemaObject,\n): TableRow[] => {\n // We only need the rows for formData\n if (\n !example?.value ||\n (contentType !== 'multipart/form-data' && contentType !== 'application/x-www-form-urlencoded')\n ) {\n return []\n }\n\n // Get all the schema properties if the schema is an object schema\n const schemaWithProperties = formBodySchema && isObjectSchema(formBodySchema) ? formBodySchema : undefined\n const requiredSet = schemaWithProperties ? new Set(schemaWithProperties.required ?? []) : undefined\n\n const mapRow = ({\n name,\n value,\n isDisabled = false,\n }: {\n name: string\n value: string | File\n isDisabled?: boolean\n }): TableRow => {\n const row: TableRow = { name, value, isDisabled }\n if (!schemaWithProperties || !name) {\n return row\n }\n const propSchema = resolve.schema(schemaWithProperties.properties?.[name])\n row.schema = propSchema\n row.description = propSchema?.description\n row.isRequired = requiredSet?.has(name)\n row.isDisabled = isDisabled\n return row\n }\n\n // We have form data stored as an array\n if (Array.isArray(example.value)) {\n return example.value.map((exampleValue) => {\n if (isObject(exampleValue)) {\n const name = String(exampleValue.name)\n const value = exampleValue.value instanceof File ? exampleValue.value : String(exampleValue.value)\n const isDisabled = Boolean(exampleValue.isDisabled)\n return mapRow({ name, value, isDisabled })\n }\n return { name: '', value: exampleValue, isDisabled: false }\n })\n }\n\n // We got an object try to convert it to an array of rows\n if (typeof example.value === 'object' && example.value) {\n return objectEntries(example.value).map(([key, value]) =>\n mapRow({ name: String(key), value: stringifyValue(value) }),\n )\n }\n\n return []\n}\n"],"mappings":";;;;;AAQA,IAAM,kBAAkB,UAAmB;AACzC,KAAI,iBAAiB,KACnB,QAAO,MAAM;AAEf,KAAI,OAAO,UAAU,YAAY,UAAU,KACzC,QAAO,KAAK,UAAU,MAAM;AAE9B,QAAO,OAAO,MAAM;;;AAItB,IAAa,mBACX,SACA,aACA,mBACe;AAEf,KACE,CAAC,SAAS,SACT,gBAAgB,yBAAyB,gBAAgB,oCAE1D,QAAO,EAAE;CAIX,MAAM,uBAAuB,kBAAkB,eAAe,eAAe,GAAG,iBAAiB,KAAA;CACjG,MAAM,cAAc,uBAAuB,IAAI,IAAI,qBAAqB,YAAY,EAAE,CAAC,GAAG,KAAA;CAE1F,MAAM,UAAU,EACd,MACA,OACA,aAAa,YAKC;EACd,MAAM,MAAgB;GAAE;GAAM;GAAO;GAAY;AACjD,MAAI,CAAC,wBAAwB,CAAC,KAC5B,QAAO;EAET,MAAM,aAAa,QAAQ,OAAO,qBAAqB,aAAa,MAAM;AAC1E,MAAI,SAAS;AACb,MAAI,cAAc,YAAY;AAC9B,MAAI,aAAa,aAAa,IAAI,KAAK;AACvC,MAAI,aAAa;AACjB,SAAO;;AAIT,KAAI,MAAM,QAAQ,QAAQ,MAAM,CAC9B,QAAO,QAAQ,MAAM,KAAK,iBAAiB;AACzC,MAAI,SAAS,aAAa,CAIxB,QAAO,OAAO;GAAE,MAHH,OAAO,aAAa,KAAK;GAGhB,OAFR,aAAa,iBAAiB,OAAO,aAAa,QAAQ,OAAO,aAAa,MAAM;GAErE,YADV,QAAQ,aAAa,WAAW;GACV,CAAC;AAE5C,SAAO;GAAE,MAAM;GAAI,OAAO;GAAc,YAAY;GAAO;GAC3D;AAIJ,KAAI,OAAO,QAAQ,UAAU,YAAY,QAAQ,MAC/C,QAAO,cAAc,QAAQ,MAAM,CAAC,KAAK,CAAC,KAAK,WAC7C,OAAO;EAAE,MAAM,OAAO,IAAI;EAAE,OAAO,eAAe,MAAM;EAAE,CAAC,CAC5D;AAGH,QAAO,EAAE"}
@@ -1,6 +1,6 @@
1
1
  //#region src/v2/constants.ts
2
2
  /** The version number taken from the package.json. Consumers can override at build time via define (e.g. OVERRIDE_PACKAGE_VERSION: JSON.stringify('1.2.3')). */
3
- var APP_VERSION = typeof OVERRIDE_PACKAGE_VERSION !== "undefined" ? OVERRIDE_PACKAGE_VERSION : "2.39.1";
3
+ var APP_VERSION = typeof OVERRIDE_PACKAGE_VERSION !== "undefined" ? OVERRIDE_PACKAGE_VERSION : "2.39.2";
4
4
  //#endregion
5
5
  export { APP_VERSION };
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"posthog.d.ts","sourceRoot":"","sources":["../../src/v2/posthog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,GAAG,EAAS,MAAM,KAAK,CAAA;AASrC,eAAO,MAAM,UAAU,GAAI,SAAS,GAAG,CAAC,OAAO,CAAC,SAY/C,CAAA"}
1
+ {"version":3,"file":"posthog.d.ts","sourceRoot":"","sources":["../../src/v2/posthog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,GAAG,EAAS,MAAM,KAAK,CAAA;AAarC,eAAO,MAAM,UAAU,GAAI,SAAS,GAAG,CAAC,OAAO,CAAC,SAY/C,CAAA"}
@@ -7,6 +7,7 @@ var posthog = ph.init("phc_3elIjSOvGOo5aEwg6krzIY9IcQiRubsBtglOXsQ4Uu4", {
7
7
  defaults: "2025-11-30",
8
8
  opt_out_capturing_by_default: true
9
9
  });
10
+ posthog.register({ product: "api-client" });
10
11
  var usePosthog = (enabled) => {
11
12
  watch(enabled, (value) => {
12
13
  if (value) posthog.opt_in_capturing();
@@ -1 +1 @@
1
- {"version":3,"file":"posthog.js","names":[],"sources":["../../src/v2/posthog.ts"],"sourcesContent":["import ph from 'posthog-js'\nimport { type Ref, watch } from 'vue'\n\nconst posthog = ph.init('phc_3elIjSOvGOo5aEwg6krzIY9IcQiRubsBtglOXsQ4Uu4', {\n api_host: 'https://magic.scalar.com',\n ui_host: 'https://us.posthog.com',\n defaults: '2025-11-30',\n opt_out_capturing_by_default: true,\n})\n\nexport const usePosthog = (enabled: Ref<boolean>) => {\n watch(\n enabled,\n (value) => {\n if (value) {\n posthog.opt_in_capturing()\n } else {\n posthog.opt_out_capturing()\n }\n },\n { immediate: true },\n )\n}\n"],"mappings":";;;AAGA,IAAM,UAAU,GAAG,KAAK,mDAAmD;CACzE,UAAU;CACV,SAAS;CACT,UAAU;CACV,8BAA8B;CAC/B,CAAC;AAEF,IAAa,cAAc,YAA0B;AACnD,OACE,UACC,UAAU;AACT,MAAI,MACF,SAAQ,kBAAkB;MAE1B,SAAQ,mBAAmB;IAG/B,EAAE,WAAW,MAAM,CACpB"}
1
+ {"version":3,"file":"posthog.js","names":[],"sources":["../../src/v2/posthog.ts"],"sourcesContent":["import ph from 'posthog-js'\nimport { type Ref, watch } from 'vue'\n\nconst posthog = ph.init('phc_3elIjSOvGOo5aEwg6krzIY9IcQiRubsBtglOXsQ4Uu4', {\n api_host: 'https://magic.scalar.com',\n ui_host: 'https://us.posthog.com',\n defaults: '2025-11-30',\n opt_out_capturing_by_default: true,\n})\n\nposthog.register({\n product: 'api-client',\n})\n\nexport const usePosthog = (enabled: Ref<boolean>) => {\n watch(\n enabled,\n (value) => {\n if (value) {\n posthog.opt_in_capturing()\n } else {\n posthog.opt_out_capturing()\n }\n },\n { immediate: true },\n )\n}\n"],"mappings":";;;AAGA,IAAM,UAAU,GAAG,KAAK,mDAAmD;CACzE,UAAU;CACV,SAAS;CACT,UAAU;CACV,8BAA8B;CAC/B,CAAC;AAEF,QAAQ,SAAS,EACf,SAAS,cACV,CAAC;AAEF,IAAa,cAAc,YAA0B;AACnD,OACE,UACC,UAAU;AACT,MAAI,MACF,SAAQ,kBAAkB;MAE1B,SAAQ,mBAAmB;IAG/B,EAAE,WAAW,MAAM,CACpB"}
@@ -45,7 +45,7 @@ var ResponseEmpty_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
45
45
  const handleHotKey = (event) => {
46
46
  if (event?.createNew && route.name === "request") addRequest();
47
47
  };
48
- const packageVersion = "2.39.1";
48
+ const packageVersion = "2.39.2";
49
49
  onMounted(() => events.hotKeys.on(handleHotKey));
50
50
  onBeforeUnmount(() => events.hotKeys.off(handleHotKey));
51
51
  return (_ctx, _cache) => {
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.39.1",
21
+ "version": "2.39.2",
22
22
  "engines": {
23
23
  "node": ">=22"
24
24
  },
@@ -351,20 +351,20 @@
351
351
  "@scalar/draggable": "0.4.1",
352
352
  "@scalar/icons": "0.7.0",
353
353
  "@scalar/helpers": "0.4.2",
354
- "@scalar/import": "0.5.3",
355
- "@scalar/oas-utils": "0.10.12",
356
354
  "@scalar/json-magic": "0.12.4",
355
+ "@scalar/oas-utils": "0.10.13",
356
+ "@scalar/import": "0.5.3",
357
357
  "@scalar/object-utils": "1.3.3",
358
+ "@scalar/sidebar": "0.8.15",
358
359
  "@scalar/openapi-types": "0.6.1",
359
360
  "@scalar/postman-to-openapi": "0.6.0",
360
- "@scalar/sidebar": "0.8.14",
361
361
  "@scalar/snippetz": "0.7.7",
362
- "@scalar/themes": "0.15.1",
362
+ "@scalar/use-codemirror": "0.14.10",
363
363
  "@scalar/types": "0.7.5",
364
364
  "@scalar/use-hooks": "0.4.1",
365
365
  "@scalar/use-toasts": "0.10.1",
366
- "@scalar/workspace-store": "0.41.1",
367
- "@scalar/use-codemirror": "0.14.10"
366
+ "@scalar/themes": "0.15.1",
367
+ "@scalar/workspace-store": "0.41.2"
368
368
  },
369
369
  "devDependencies": {
370
370
  "@tailwindcss/vite": "^4.2.0",
@@ -379,8 +379,8 @@
379
379
  "vite": "8.0.0",
380
380
  "vite-svg-loader": "5.1.1",
381
381
  "vitest": "4.1.0",
382
- "@scalar/pre-post-request-scripts": "0.3.14",
383
- "@scalar/galaxy": "0.6.1"
382
+ "@scalar/galaxy": "0.6.1",
383
+ "@scalar/pre-post-request-scripts": "0.3.15"
384
384
  },
385
385
  "scripts": {
386
386
  "build": "vite build && vue-tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",