@scalar/api-reference 1.39.2 → 1.40.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 (66) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +1 -1
  3. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  4. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
  5. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +2 -1
  6. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
  7. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.d.ts +1 -1
  8. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.d.ts.map +1 -1
  9. package/dist/blocks/scalar-info-block/components/InfoDescription.vue.js +1 -1
  10. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts +1 -1
  11. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.d.ts.map +1 -1
  12. package/dist/blocks/scalar-info-block/components/IntroductionLayout.vue.js +1 -1
  13. package/dist/browser/standalone.js +17286 -16971
  14. package/dist/browser/webpack-stats.json +1 -1
  15. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  16. package/dist/components/ApiReference.vue.js +1 -1
  17. package/dist/components/ApiReference.vue2.js +10 -2
  18. package/dist/components/Content/Content.vue.d.ts +2 -1
  19. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  20. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +1 -1
  22. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +8 -3
  23. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Schema/SchemaHeading.vue.js +1 -1
  25. package/dist/components/Content/Schema/SchemaHeading.vue2.js +7 -4
  26. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +17 -5
  29. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  31. package/dist/components/Content/Schema/helpers/sort-property-names.d.ts +1 -1
  32. package/dist/components/Content/Schema/helpers/sort-property-names.d.ts.map +1 -1
  33. package/dist/features/Operation/components/ContentTypeSelect.vue.d.ts.map +1 -1
  34. package/dist/features/Operation/components/ContentTypeSelect.vue.js +14 -10
  35. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  36. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  37. package/dist/features/Operation/components/ParameterListItem.vue2.js +40 -25
  38. package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts +1 -1
  39. package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts.map +1 -1
  40. package/dist/features/toolbar/ApiReferenceToolbar.vue.js +4 -4
  41. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts +1 -1
  42. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts.map +1 -1
  43. package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts +1 -1
  44. package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -1
  45. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts.map +1 -1
  46. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.js +29 -8
  47. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +1 -1
  48. package/dist/helpers/color-mode.d.ts +8 -0
  49. package/dist/helpers/color-mode.d.ts.map +1 -0
  50. package/dist/helpers/color-mode.js +9 -0
  51. package/dist/helpers/map-config-to-client-store.d.ts +2 -1
  52. package/dist/helpers/map-config-to-client-store.d.ts.map +1 -1
  53. package/dist/helpers/map-config-to-workspace-store.d.ts +1 -1
  54. package/dist/helpers/map-config-to-workspace-store.d.ts.map +1 -1
  55. package/dist/helpers/map-config-to-workspace-store.js +2 -2
  56. package/dist/helpers/map-configuration.d.ts +1 -1
  57. package/dist/helpers/map-configuration.d.ts.map +1 -1
  58. package/dist/helpers/normalize-configurations.d.ts +1 -1
  59. package/dist/helpers/normalize-configurations.d.ts.map +1 -1
  60. package/dist/helpers/normalize-configurations.js +1 -1
  61. package/dist/hooks/use-workspace-store-events.js +1 -1
  62. package/dist/index.d.ts +2 -1
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/standalone/lib/html-api.d.ts.map +1 -1
  65. package/dist/style.css +582 -633
  66. package/package.json +20 -20
@@ -1,4 +1,4 @@
1
- import type { ApiReferenceConfigurationRaw } from '@scalar/types';
1
+ import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
2
2
  import type { WorkspaceStore } from '@scalar/workspace-store/client';
3
3
  import { type MaybeRefOrGetter, type Ref } from 'vue';
4
4
  export declare const mapConfigToWorkspaceStore: ({ config, store, isDarkMode, }: {
@@ -1 +1 @@
1
- {"version":3,"file":"map-config-to-workspace-store.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-to-workspace-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAGpE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAA2C,MAAM,KAAK,CAAA;AAE9F,eAAO,MAAM,yBAAyB,GAAI,gCAIvC;IACD,MAAM,EAAE,gBAAgB,CAAC,4BAA4B,CAAC,CAAA;IACtD,KAAK,EAAE,cAAc,CAAA;IACrB,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CACzB,SA4CA,CAAA"}
1
+ {"version":3,"file":"map-config-to-workspace-store.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-to-workspace-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAGpE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAA2C,MAAM,KAAK,CAAA;AAE9F,eAAO,MAAM,yBAAyB,GAAI,gCAIvC;IACD,MAAM,EAAE,gBAAgB,CAAC,4BAA4B,CAAC,CAAA;IACtD,KAAK,EAAE,cAAc,CAAA;IACrB,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;CACzB,SA4CA,CAAA"}
@@ -29,11 +29,11 @@ const mapConfigToWorkspaceStore = ({
29
29
  );
30
30
  watch(
31
31
  () => toValue(config).darkMode,
32
- (isDark) => store.update("x-scalar-dark-mode", !!isDark)
32
+ (isDark) => store.update("x-scalar-color-mode", isDark ? "dark" : "light")
33
33
  );
34
34
  watch(
35
35
  () => isDarkMode.value,
36
- (newValue) => store.update("x-scalar-dark-mode", newValue),
36
+ (newIsDark) => store.update("x-scalar-color-mode", newIsDark ? "dark" : "light"),
37
37
  { immediate: true }
38
38
  );
39
39
  if (toValue(config).metaData) {
@@ -1,4 +1,4 @@
1
- import type { ApiReferenceConfiguration } from '@scalar/types';
1
+ import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
2
2
  /**
3
3
  * Maps a partial ApiReferenceConfigurationWithMultipleSources object to a DocumentConfiguration
4
4
  * for use in the API Reference. This function transforms configuration options
@@ -1 +1 @@
1
- {"version":3,"file":"map-configuration.d.ts","sourceRoot":"","sources":["../../src/helpers/map-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAG9D;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD1E,CAAA"}
1
+ {"version":3,"file":"map-configuration.d.ts","sourceRoot":"","sources":["../../src/helpers/map-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD1E,CAAA"}
@@ -1,4 +1,4 @@
1
- import { type AnyApiReferenceConfiguration, type ApiReferenceConfigurationRaw, type ApiReferenceConfigurationWithSource } from '@scalar/types';
1
+ import { type AnyApiReferenceConfiguration, type ApiReferenceConfigurationRaw, type ApiReferenceConfigurationWithSource } from '@scalar/types/api-reference';
2
2
  import GithubSlugger from 'github-slugger';
3
3
  /** Processed API Reference Configuration
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-configurations.d.ts","sourceRoot":"","sources":["../../src/helpers/normalize-configurations.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EAGzC,MAAM,eAAe,CAAA;AACtB,OAAO,aAAa,MAAM,gBAAgB,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,4BAA4B,CAAA;IACpC,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAE,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,GAAG,CAAC,EAAE,KAAK,CAAA;KAAE,CAAA;CAC7F,CAAA;AAED,KAAK,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAA;AAEvE,KAAK,wBAAwB,GAAG,IAAI,CAAC,mCAAmC,EAAE,KAAK,GAAG,SAAS,CAAC,GAC1F,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,eAAe,4BAA4B,GAAG,SAAS,KACtD,wBAmDF,CAAA;AAED,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,GAC3B,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,KACnF,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAc5B,CAAA;AAED,4EAA4E;AAC5E,eAAO,MAAM,eAAe,GAC1B,QAAQ,wBAAwB,EAChC,yBAAS,EACT,SAAS,aAAa,KACrB,wBAAwB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAyB1D,CAAA"}
1
+ {"version":3,"file":"normalize-configurations.d.ts","sourceRoot":"","sources":["../../src/helpers/normalize-configurations.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EAGzC,MAAM,6BAA6B,CAAA;AACpC,OAAO,aAAa,MAAM,gBAAgB,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EA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SourceSchema } from "@scalar/types";
2
+ import { isConfigurationWithSources, apiReferenceConfigurationWithSourceSchema } from "@scalar/types/api-reference";
3
3
  import GitHubSlugger from "github-slugger";
4
4
  const normalizeConfigurations = (configuration) => {
5
5
  const slugger = new GitHubSlugger();
@@ -4,7 +4,7 @@ import { onCustomEvent } from "@scalar/workspace-store/events";
4
4
  const useWorkspaceStoreEvents = (store, root) => {
5
5
  const mutators = generateClientMutators(store);
6
6
  onCustomEvent(root, "scalar-update-dark-mode", (event) => {
7
- store.update("x-scalar-dark-mode", event.detail.value);
7
+ store.update("x-scalar-color-mode", event.detail.value ? "dark" : "light");
8
8
  });
9
9
  onCustomEvent(root, "scalar-update-active-document", (event) => {
10
10
  store.update("x-scalar-active-document", event.detail.value);
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { AnyApiReferenceConfiguration } from '@scalar/types';
1
+ /** biome-ignore-all lint/performance/noBarrelFile: entrypoint */
2
+ import type { AnyApiReferenceConfiguration } from '@scalar/types/api-reference';
2
3
  export type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
3
4
  export { default as ApiReference } from './components/ApiReference.vue.js';
4
5
  export { default as GettingStarted } from './components/GettingStarted.vue.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAEjE,YAAY,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAE5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE/E,YAAY,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAE5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"html-api.d.ts","sourceRoot":"","sources":["../../../src/standalone/lib/html-api.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,mCAAmC,EACnC,kBAAkB,EACnB,MAAM,6BAA6B,CAAA;AAQpC;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,QAAQ,GAAG,mCAAmC,CA+GrG;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,aAAa,EAAE,mCAAmC,QAiBnG;AAID,eAAO,MAAM,eAAe,GAAI,KAAK,QAAQ,EAAE,UAAU,OAAO,GAAG,IAAI,mBAatE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAwHhC,CAAA"}
1
+ {"version":3,"file":"html-api.d.ts","sourceRoot":"","sources":["../../../src/standalone/lib/html-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mCAAmC,EACnC,kBAAkB,EACnB,MAAM,6BAA6B,CAAA;AASpC;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,QAAQ,GAAG,mCAAmC,CA+GrG;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,aAAa,EAAE,mCAAmC,QAiBnG;AAID,eAAO,MAAM,eAAe,GAAI,KAAK,QAAQ,EAAE,UAAU,OAAO,GAAG,IAAI,mBAatE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAwHhC,CAAA"}