@xyd-js/atlas 0.0.0-build-6ec168f-20250911194551 → 0.0.0-build-566e14f-20250911200523

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/xydPlugin.js CHANGED
@@ -1,2 +1,2 @@
1
- import{SurfaceTarget as e}from"@xyd-js/framework";import{a as t,b as i}from"./VideoGuide-BotGSjJW-BWu_u92C.js";import o from"react";import"radix-ui";import"lucide-react";import"openux-js";function r(e){var r,a=(null===(r=null==e?void 0:e.pageMeta)||void 0===r?void 0:r.openapi)||"",n=a.includes("#")?a.split("#"):["",a],u=t(n,2);u[0];var d=u[1],l=(void 0===d?"":d).split(" "),s=t(l,1)[0],m=void 0===s?"":s;if(!m)return null;if(m.includes("components/schemas"))return null;var p=m.toUpperCase();return"DELETE"===m&&(p="DEL"),o.createElement("div",{"data-active":(null==e?void 0:e.active)?"true":void 0,"data-atlas-oas-method":m},o.createElement(i,{size:"xs"},p))}function a(){return function(t){return{name:"atlas-xyd-plugin",customComponents:{AtlasSidebarItemRight:{component:r,surface:e.SidebarItemRight}}}}}export{a as default};
1
+ import{SurfaceTarget as e}from"@xyd-js/framework";import{a as t,b as i}from"./VideoGuide-e4aaw3Q_-BWu_u92C.js";import a from"react";import"radix-ui";import"lucide-react";import"openux-js";function r(e){var r,o=(null===(r=null==e?void 0:e.pageMeta)||void 0===r?void 0:r.openapi)||"",n=o.includes("#")?o.split("#"):["",o],u=t(n,2);u[0];var d=u[1],l=(void 0===d?"":d).split(" "),s=t(l,1)[0],m=void 0===s?"":s;if(!m)return null;if(m.includes("components/schemas"))return null;var p=m.toUpperCase();return"DELETE"===m&&(p="DEL"),a.createElement("div",{"data-active":(null==e?void 0:e.active)?"true":void 0,"data-atlas-oas-method":m},a.createElement(i,{size:"xs"},p))}function o(){return function(t){return{name:"atlas-xyd-plugin",customComponents:{AtlasSidebarItemRight:{component:r,surface:e.SidebarItemRight}}}}}export{o as default};
2
2
  //# sourceMappingURL=xydPlugin.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyd-js/atlas",
3
- "version": "0.0.0-build-6ec168f-20250911194551",
3
+ "version": "0.0.0-build-566e14f-20250911200523",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -25,11 +25,11 @@
25
25
  "peerDependencies": {
26
26
  "react": "^19.1.0",
27
27
  "openux-js": "0.0.0-pre.1",
28
- "@xyd-js/framework": "0.0.0-build-6ec168f-20250911194551",
29
- "@xyd-js/plugins": "0.0.0-build-6ec168f-20250911194551",
30
- "@xyd-js/core": "0.0.0-build-6ec168f-20250911194551",
31
- "@xyd-js/uniform": "0.0.0-build-6ec168f-20250911194551",
32
- "@xyd-js/components": "0.0.0-build-6ec168f-20250911194551"
28
+ "@xyd-js/framework": "0.0.0-build-566e14f-20250911200523",
29
+ "@xyd-js/plugins": "0.0.0-build-566e14f-20250911200523",
30
+ "@xyd-js/core": "0.0.0-build-566e14f-20250911200523",
31
+ "@xyd-js/uniform": "0.0.0-build-566e14f-20250911200523",
32
+ "@xyd-js/components": "0.0.0-build-566e14f-20250911200523"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/react": "^19.1.0",
@@ -1,9 +1,9 @@
1
- import React, { useContext, useState } from "react";
2
- import { DEFINED_DEFINITION_PROPERTY_TYPE, DefinitionProperty, DefinitionPropertyMeta } from "@xyd-js/uniform";
1
+ import React, {useContext, useState} from "react";
2
+ import {DEFINED_DEFINITION_PROPERTY_TYPE, DefinitionProperty, DefinitionPropertyMeta} from "@xyd-js/uniform";
3
3
 
4
4
  import * as cn from "./ApiRefProperties.styles";
5
- import { AtlasContext, useBaseMatch } from "@/components/Atlas/AtlasContext";
6
- import { Badge } from "@xyd-js/components/writer";
5
+ import {AtlasContext, useBaseMatch} from "@/components/Atlas/AtlasContext";
6
+ import {Badge} from "@xyd-js/components/writer";
7
7
 
8
8
  export interface ApiRefPropertiesProps {
9
9
  properties: DefinitionProperty[]
@@ -12,7 +12,7 @@ export interface ApiRefPropertiesProps {
12
12
  // TODO: in the future configurable
13
13
  const HIDE_INTERNAL = true
14
14
 
15
- export function ApiRefProperties({ properties }: ApiRefPropertiesProps) {
15
+ export function ApiRefProperties({properties}: ApiRefPropertiesProps) {
16
16
  return <ul className={cn.ApiRefPropertiesUlHost}>
17
17
  {
18
18
  filterProperties(properties)?.map((property, i) => {
@@ -26,7 +26,7 @@ export function ApiRefProperties({ properties }: ApiRefPropertiesProps) {
26
26
  {
27
27
  propName || propValue ?
28
28
  <dl className={cn.ApiRefPropertiesDlHost}>
29
- <PropName property={property} meta={property.meta || []} />
29
+ <PropName property={property} meta={property.meta || []}/>
30
30
  <PropType
31
31
  property={property}
32
32
  />
@@ -90,8 +90,8 @@ interface PropTypeProps {
90
90
  property: DefinitionProperty
91
91
  }
92
92
 
93
- function PropType({ property }: PropTypeProps) {
94
- const { Link = "a" } = useContext(AtlasContext)
93
+ function PropType({property}: PropTypeProps) {
94
+ const {Link = "a"} = useContext(AtlasContext)
95
95
  const href = useSymbolLink(property)
96
96
 
97
97
  const symbol = resolvePropertySymbol(property)
@@ -167,8 +167,8 @@ export interface PropMetaListProps {
167
167
  metas: PropMetaProps[]
168
168
  }
169
169
 
170
- function PropMetaList({ metas }: PropMetaListProps) {
171
- const order = { deprecated: 0, required: 1, defaults: 2 };
170
+ function PropMetaList({metas}: PropMetaListProps) {
171
+ const order = {deprecated: 0, required: 1, defaults: 2};
172
172
 
173
173
  const sortedMetas = [...metas].sort((a, b) => {
174
174
  return (order[a.name as keyof typeof order] ?? 3) - (order[b.name as keyof typeof order] ?? 3);
@@ -192,7 +192,7 @@ interface SubPropertiesProps {
192
192
  properties: DefinitionProperty[]
193
193
  }
194
194
 
195
- function SubProperties({ parent, properties }: SubPropertiesProps) {
195
+ function SubProperties({parent, properties}: SubPropertiesProps) {
196
196
  const [expanded, setExpanded] = useState(false)
197
197
 
198
198
  // Get the actual properties to display
@@ -201,8 +201,8 @@ function SubProperties({ parent, properties }: SubPropertiesProps) {
201
201
  const choiceType = isChoiceType(parent)
202
202
  const noChildProps = function () {
203
203
  if (
204
- (
205
- parent?.type === DEFINED_DEFINITION_PROPERTY_TYPE.ARRAY &&
204
+ (
205
+ parent?.type === DEFINED_DEFINITION_PROPERTY_TYPE.ARRAY &&
206
206
  parent?.ofProperty?.type === DEFINED_DEFINITION_PROPERTY_TYPE.ENUM
207
207
  ) ||
208
208
  parent?.type === DEFINED_DEFINITION_PROPERTY_TYPE.ENUM
@@ -346,7 +346,7 @@ function PropToggle(
346
346
 
347
347
  function isChoiceType(property: DefinitionProperty) {
348
348
  if (
349
- property.type === DEFINED_DEFINITION_PROPERTY_TYPE.ARRAY &&
349
+ property.type === DEFINED_DEFINITION_PROPERTY_TYPE.ARRAY &&
350
350
  property.ofProperty?.type === DEFINED_DEFINITION_PROPERTY_TYPE.ENUM
351
351
  ) {
352
352
  return true
@@ -468,6 +468,7 @@ function resolvePropertySymbol(property: DefinitionProperty): string {
468
468
  type: DEFINED_DEFINITION_PROPERTY_TYPE.UNION,
469
469
  properties: property.ofProperty.properties || [],
470
470
  })
471
+ }
471
472
 
472
473
  if (unionSymbol?.length && unionSymbol.includes("$$")) {
473
474
  return [atomicDefinedSymbol]
@@ -643,24 +644,24 @@ function renderMetaInfo(meta: DefinitionPropertyMeta[] | undefined) {
643
644
  rangeInfo.push(
644
645
  <div>
645
646
  Required range: <Badge>
646
- {`${minimum} <= x <= ${maximum}`}
647
- </Badge>
647
+ {`${minimum} <= x <= ${maximum}`}
648
+ </Badge>
648
649
  </div>
649
650
  );
650
651
  } else if (minimum !== undefined) {
651
652
  rangeInfo.push(
652
653
  <div>
653
654
  Required range: <Badge>
654
- {`x >= ${minimum}`}
655
- </Badge>
655
+ {`x >= ${minimum}`}
656
+ </Badge>
656
657
  </div>
657
658
  );
658
659
  } else if (maximum !== undefined) {
659
660
  rangeInfo.push(
660
661
  <div>
661
662
  Required range: <Badge>
662
- {`x <= ${maximum}`}
663
- </Badge>
663
+ {`x <= ${maximum}`}
664
+ </Badge>
664
665
  </div>
665
666
  );
666
667
  }
@@ -682,7 +683,7 @@ function renderMetaInfo(meta: DefinitionPropertyMeta[] | undefined) {
682
683
  if (!rangeInfo?.length && !exampleInfo) {
683
684
  return null
684
685
  }
685
-
686
+
686
687
  return <atlas-apiref-meta-info className={cn.ApiRefPropertiesMetaInfoHost}>
687
688
  {rangeInfo?.map((info, i) => (
688
689
  <div key={`range-${i}`}>{info}</div>