@xyo-network/react-schema 2.82.0 → 2.83.1
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/browser/index.d.ts +117 -4
- package/package.json +15 -31
- package/xy.config.ts +12 -0
- package/dist/browser/components/Property/SchemaProperty.d.cts +0 -40
- package/dist/browser/components/Property/SchemaProperty.d.cts.map +0 -1
- package/dist/browser/components/Property/SchemaProperty.d.mts +0 -40
- package/dist/browser/components/Property/SchemaProperty.d.mts.map +0 -1
- package/dist/browser/components/Property/SchemaProperty.d.ts +0 -40
- package/dist/browser/components/Property/SchemaProperty.d.ts.map +0 -1
- package/dist/browser/components/Property/index.d.cts +0 -2
- package/dist/browser/components/Property/index.d.cts.map +0 -1
- package/dist/browser/components/Property/index.d.mts +0 -2
- package/dist/browser/components/Property/index.d.mts.map +0 -1
- package/dist/browser/components/Property/index.d.ts +0 -2
- package/dist/browser/components/Property/index.d.ts.map +0 -1
- package/dist/browser/components/SelectEx/SchemaSelectEx.d.cts +0 -5
- package/dist/browser/components/SelectEx/SchemaSelectEx.d.cts.map +0 -1
- package/dist/browser/components/SelectEx/SchemaSelectEx.d.mts +0 -5
- package/dist/browser/components/SelectEx/SchemaSelectEx.d.mts.map +0 -1
- package/dist/browser/components/SelectEx/SchemaSelectEx.d.ts +0 -5
- package/dist/browser/components/SelectEx/SchemaSelectEx.d.ts.map +0 -1
- package/dist/browser/components/SelectEx/index.d.cts +0 -2
- package/dist/browser/components/SelectEx/index.d.cts.map +0 -1
- package/dist/browser/components/SelectEx/index.d.mts +0 -2
- package/dist/browser/components/SelectEx/index.d.mts.map +0 -1
- package/dist/browser/components/SelectEx/index.d.ts +0 -2
- package/dist/browser/components/SelectEx/index.d.ts.map +0 -1
- package/dist/browser/components/index.d.cts +0 -3
- package/dist/browser/components/index.d.cts.map +0 -1
- package/dist/browser/components/index.d.mts +0 -3
- package/dist/browser/components/index.d.mts.map +0 -1
- package/dist/browser/components/index.d.ts +0 -3
- package/dist/browser/components/index.d.ts.map +0 -1
- package/dist/browser/contexts/Schema/Context.d.cts +0 -3
- package/dist/browser/contexts/Schema/Context.d.cts.map +0 -1
- package/dist/browser/contexts/Schema/Context.d.mts +0 -3
- package/dist/browser/contexts/Schema/Context.d.mts.map +0 -1
- package/dist/browser/contexts/Schema/Context.d.ts +0 -3
- package/dist/browser/contexts/Schema/Context.d.ts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/Memory.d.cts +0 -5
- package/dist/browser/contexts/Schema/Provider/Memory.d.cts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/Memory.d.mts +0 -5
- package/dist/browser/contexts/Schema/Provider/Memory.d.mts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/Memory.d.ts +0 -5
- package/dist/browser/contexts/Schema/Provider/Memory.d.ts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/Props.d.cts +0 -5
- package/dist/browser/contexts/Schema/Provider/Props.d.cts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/Props.d.mts +0 -5
- package/dist/browser/contexts/Schema/Provider/Props.d.mts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/Props.d.ts +0 -5
- package/dist/browser/contexts/Schema/Provider/Props.d.ts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/Route.d.cts +0 -5
- package/dist/browser/contexts/Schema/Provider/Route.d.cts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/Route.d.mts +0 -5
- package/dist/browser/contexts/Schema/Provider/Route.d.mts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/Route.d.ts +0 -5
- package/dist/browser/contexts/Schema/Provider/Route.d.ts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/index.d.cts +0 -4
- package/dist/browser/contexts/Schema/Provider/index.d.cts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/index.d.mts +0 -4
- package/dist/browser/contexts/Schema/Provider/index.d.mts.map +0 -1
- package/dist/browser/contexts/Schema/Provider/index.d.ts +0 -4
- package/dist/browser/contexts/Schema/Provider/index.d.ts.map +0 -1
- package/dist/browser/contexts/Schema/State.d.cts +0 -9
- package/dist/browser/contexts/Schema/State.d.cts.map +0 -1
- package/dist/browser/contexts/Schema/State.d.mts +0 -9
- package/dist/browser/contexts/Schema/State.d.mts.map +0 -1
- package/dist/browser/contexts/Schema/State.d.ts +0 -9
- package/dist/browser/contexts/Schema/State.d.ts.map +0 -1
- package/dist/browser/contexts/Schema/index.d.cts +0 -5
- package/dist/browser/contexts/Schema/index.d.cts.map +0 -1
- package/dist/browser/contexts/Schema/index.d.mts +0 -5
- package/dist/browser/contexts/Schema/index.d.mts.map +0 -1
- package/dist/browser/contexts/Schema/index.d.ts +0 -5
- package/dist/browser/contexts/Schema/index.d.ts.map +0 -1
- package/dist/browser/contexts/Schema/use.d.cts +0 -3
- package/dist/browser/contexts/Schema/use.d.cts.map +0 -1
- package/dist/browser/contexts/Schema/use.d.mts +0 -3
- package/dist/browser/contexts/Schema/use.d.mts.map +0 -1
- package/dist/browser/contexts/Schema/use.d.ts +0 -3
- package/dist/browser/contexts/Schema/use.d.ts.map +0 -1
- package/dist/browser/contexts/index.d.cts +0 -2
- package/dist/browser/contexts/index.d.cts.map +0 -1
- package/dist/browser/contexts/index.d.mts +0 -2
- package/dist/browser/contexts/index.d.mts.map +0 -1
- package/dist/browser/contexts/index.d.ts +0 -2
- package/dist/browser/contexts/index.d.ts.map +0 -1
- package/dist/browser/hooks/index.d.cts +0 -5
- package/dist/browser/hooks/index.d.cts.map +0 -1
- package/dist/browser/hooks/index.d.mts +0 -5
- package/dist/browser/hooks/index.d.mts.map +0 -1
- package/dist/browser/hooks/index.d.ts +0 -5
- package/dist/browser/hooks/index.d.ts.map +0 -1
- package/dist/browser/hooks/useGetSchema.d.cts +0 -26
- package/dist/browser/hooks/useGetSchema.d.cts.map +0 -1
- package/dist/browser/hooks/useGetSchema.d.mts +0 -26
- package/dist/browser/hooks/useGetSchema.d.mts.map +0 -1
- package/dist/browser/hooks/useGetSchema.d.ts +0 -26
- package/dist/browser/hooks/useGetSchema.d.ts.map +0 -1
- package/dist/browser/hooks/useSchemaDefinitions.d.cts +0 -6
- package/dist/browser/hooks/useSchemaDefinitions.d.cts.map +0 -1
- package/dist/browser/hooks/useSchemaDefinitions.d.mts +0 -6
- package/dist/browser/hooks/useSchemaDefinitions.d.mts.map +0 -1
- package/dist/browser/hooks/useSchemaDefinitions.d.ts +0 -6
- package/dist/browser/hooks/useSchemaDefinitions.d.ts.map +0 -1
- package/dist/browser/hooks/useSchemaList.d.cts +0 -4
- package/dist/browser/hooks/useSchemaList.d.cts.map +0 -1
- package/dist/browser/hooks/useSchemaList.d.mts +0 -4
- package/dist/browser/hooks/useSchemaList.d.mts.map +0 -1
- package/dist/browser/hooks/useSchemaList.d.ts +0 -4
- package/dist/browser/hooks/useSchemaList.d.ts.map +0 -1
- package/dist/browser/hooks/useSchemaStats.d.cts +0 -5
- package/dist/browser/hooks/useSchemaStats.d.cts.map +0 -1
- package/dist/browser/hooks/useSchemaStats.d.mts +0 -5
- package/dist/browser/hooks/useSchemaStats.d.mts.map +0 -1
- package/dist/browser/hooks/useSchemaStats.d.ts +0 -5
- package/dist/browser/hooks/useSchemaStats.d.ts.map +0 -1
- package/dist/browser/index.cjs +0 -453
- package/dist/browser/index.cjs.map +0 -1
- package/dist/browser/index.d.cts +0 -4
- package/dist/browser/index.d.cts.map +0 -1
- package/dist/browser/index.d.mts +0 -4
- package/dist/browser/index.d.mts.map +0 -1
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/neutral/components/Property/SchemaProperty.d.cts +0 -40
- package/dist/neutral/components/Property/SchemaProperty.d.cts.map +0 -1
- package/dist/neutral/components/Property/SchemaProperty.d.mts +0 -40
- package/dist/neutral/components/Property/SchemaProperty.d.mts.map +0 -1
- package/dist/neutral/components/Property/SchemaProperty.d.ts +0 -40
- package/dist/neutral/components/Property/SchemaProperty.d.ts.map +0 -1
- package/dist/neutral/components/Property/index.d.cts +0 -2
- package/dist/neutral/components/Property/index.d.cts.map +0 -1
- package/dist/neutral/components/Property/index.d.mts +0 -2
- package/dist/neutral/components/Property/index.d.mts.map +0 -1
- package/dist/neutral/components/Property/index.d.ts +0 -2
- package/dist/neutral/components/Property/index.d.ts.map +0 -1
- package/dist/neutral/components/SelectEx/SchemaSelectEx.d.cts +0 -5
- package/dist/neutral/components/SelectEx/SchemaSelectEx.d.cts.map +0 -1
- package/dist/neutral/components/SelectEx/SchemaSelectEx.d.mts +0 -5
- package/dist/neutral/components/SelectEx/SchemaSelectEx.d.mts.map +0 -1
- package/dist/neutral/components/SelectEx/SchemaSelectEx.d.ts +0 -5
- package/dist/neutral/components/SelectEx/SchemaSelectEx.d.ts.map +0 -1
- package/dist/neutral/components/SelectEx/index.d.cts +0 -2
- package/dist/neutral/components/SelectEx/index.d.cts.map +0 -1
- package/dist/neutral/components/SelectEx/index.d.mts +0 -2
- package/dist/neutral/components/SelectEx/index.d.mts.map +0 -1
- package/dist/neutral/components/SelectEx/index.d.ts +0 -2
- package/dist/neutral/components/SelectEx/index.d.ts.map +0 -1
- package/dist/neutral/components/index.d.cts +0 -3
- package/dist/neutral/components/index.d.cts.map +0 -1
- package/dist/neutral/components/index.d.mts +0 -3
- package/dist/neutral/components/index.d.mts.map +0 -1
- package/dist/neutral/components/index.d.ts +0 -3
- package/dist/neutral/components/index.d.ts.map +0 -1
- package/dist/neutral/contexts/Schema/Context.d.cts +0 -3
- package/dist/neutral/contexts/Schema/Context.d.cts.map +0 -1
- package/dist/neutral/contexts/Schema/Context.d.mts +0 -3
- package/dist/neutral/contexts/Schema/Context.d.mts.map +0 -1
- package/dist/neutral/contexts/Schema/Context.d.ts +0 -3
- package/dist/neutral/contexts/Schema/Context.d.ts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/Memory.d.cts +0 -5
- package/dist/neutral/contexts/Schema/Provider/Memory.d.cts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/Memory.d.mts +0 -5
- package/dist/neutral/contexts/Schema/Provider/Memory.d.mts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/Memory.d.ts +0 -5
- package/dist/neutral/contexts/Schema/Provider/Memory.d.ts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/Props.d.cts +0 -5
- package/dist/neutral/contexts/Schema/Provider/Props.d.cts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/Props.d.mts +0 -5
- package/dist/neutral/contexts/Schema/Provider/Props.d.mts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/Props.d.ts +0 -5
- package/dist/neutral/contexts/Schema/Provider/Props.d.ts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/Route.d.cts +0 -5
- package/dist/neutral/contexts/Schema/Provider/Route.d.cts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/Route.d.mts +0 -5
- package/dist/neutral/contexts/Schema/Provider/Route.d.mts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/Route.d.ts +0 -5
- package/dist/neutral/contexts/Schema/Provider/Route.d.ts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/index.d.cts +0 -4
- package/dist/neutral/contexts/Schema/Provider/index.d.cts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/index.d.mts +0 -4
- package/dist/neutral/contexts/Schema/Provider/index.d.mts.map +0 -1
- package/dist/neutral/contexts/Schema/Provider/index.d.ts +0 -4
- package/dist/neutral/contexts/Schema/Provider/index.d.ts.map +0 -1
- package/dist/neutral/contexts/Schema/State.d.cts +0 -9
- package/dist/neutral/contexts/Schema/State.d.cts.map +0 -1
- package/dist/neutral/contexts/Schema/State.d.mts +0 -9
- package/dist/neutral/contexts/Schema/State.d.mts.map +0 -1
- package/dist/neutral/contexts/Schema/State.d.ts +0 -9
- package/dist/neutral/contexts/Schema/State.d.ts.map +0 -1
- package/dist/neutral/contexts/Schema/index.d.cts +0 -5
- package/dist/neutral/contexts/Schema/index.d.cts.map +0 -1
- package/dist/neutral/contexts/Schema/index.d.mts +0 -5
- package/dist/neutral/contexts/Schema/index.d.mts.map +0 -1
- package/dist/neutral/contexts/Schema/index.d.ts +0 -5
- package/dist/neutral/contexts/Schema/index.d.ts.map +0 -1
- package/dist/neutral/contexts/Schema/use.d.cts +0 -3
- package/dist/neutral/contexts/Schema/use.d.cts.map +0 -1
- package/dist/neutral/contexts/Schema/use.d.mts +0 -3
- package/dist/neutral/contexts/Schema/use.d.mts.map +0 -1
- package/dist/neutral/contexts/Schema/use.d.ts +0 -3
- package/dist/neutral/contexts/Schema/use.d.ts.map +0 -1
- package/dist/neutral/contexts/index.d.cts +0 -2
- package/dist/neutral/contexts/index.d.cts.map +0 -1
- package/dist/neutral/contexts/index.d.mts +0 -2
- package/dist/neutral/contexts/index.d.mts.map +0 -1
- package/dist/neutral/contexts/index.d.ts +0 -2
- package/dist/neutral/contexts/index.d.ts.map +0 -1
- package/dist/neutral/hooks/index.d.cts +0 -5
- package/dist/neutral/hooks/index.d.cts.map +0 -1
- package/dist/neutral/hooks/index.d.mts +0 -5
- package/dist/neutral/hooks/index.d.mts.map +0 -1
- package/dist/neutral/hooks/index.d.ts +0 -5
- package/dist/neutral/hooks/index.d.ts.map +0 -1
- package/dist/neutral/hooks/useGetSchema.d.cts +0 -26
- package/dist/neutral/hooks/useGetSchema.d.cts.map +0 -1
- package/dist/neutral/hooks/useGetSchema.d.mts +0 -26
- package/dist/neutral/hooks/useGetSchema.d.mts.map +0 -1
- package/dist/neutral/hooks/useGetSchema.d.ts +0 -26
- package/dist/neutral/hooks/useGetSchema.d.ts.map +0 -1
- package/dist/neutral/hooks/useSchemaDefinitions.d.cts +0 -6
- package/dist/neutral/hooks/useSchemaDefinitions.d.cts.map +0 -1
- package/dist/neutral/hooks/useSchemaDefinitions.d.mts +0 -6
- package/dist/neutral/hooks/useSchemaDefinitions.d.mts.map +0 -1
- package/dist/neutral/hooks/useSchemaDefinitions.d.ts +0 -6
- package/dist/neutral/hooks/useSchemaDefinitions.d.ts.map +0 -1
- package/dist/neutral/hooks/useSchemaList.d.cts +0 -4
- package/dist/neutral/hooks/useSchemaList.d.cts.map +0 -1
- package/dist/neutral/hooks/useSchemaList.d.mts +0 -4
- package/dist/neutral/hooks/useSchemaList.d.mts.map +0 -1
- package/dist/neutral/hooks/useSchemaList.d.ts +0 -4
- package/dist/neutral/hooks/useSchemaList.d.ts.map +0 -1
- package/dist/neutral/hooks/useSchemaStats.d.cts +0 -5
- package/dist/neutral/hooks/useSchemaStats.d.cts.map +0 -1
- package/dist/neutral/hooks/useSchemaStats.d.mts +0 -5
- package/dist/neutral/hooks/useSchemaStats.d.mts.map +0 -1
- package/dist/neutral/hooks/useSchemaStats.d.ts +0 -5
- package/dist/neutral/hooks/useSchemaStats.d.ts.map +0 -1
- package/dist/neutral/index.cjs +0 -453
- package/dist/neutral/index.cjs.map +0 -1
- package/dist/neutral/index.d.cts +0 -4
- package/dist/neutral/index.d.cts.map +0 -1
- package/dist/neutral/index.d.mts +0 -4
- package/dist/neutral/index.d.mts.map +0 -1
- package/dist/neutral/index.d.ts +0 -4
- package/dist/neutral/index.d.ts.map +0 -1
- package/dist/neutral/index.mjs +0 -422
- package/dist/neutral/index.mjs.map +0 -1
- package/dist/node/components/Property/SchemaProperty.d.cts +0 -40
- package/dist/node/components/Property/SchemaProperty.d.cts.map +0 -1
- package/dist/node/components/Property/SchemaProperty.d.mts +0 -40
- package/dist/node/components/Property/SchemaProperty.d.mts.map +0 -1
- package/dist/node/components/Property/SchemaProperty.d.ts +0 -40
- package/dist/node/components/Property/SchemaProperty.d.ts.map +0 -1
- package/dist/node/components/Property/index.d.cts +0 -2
- package/dist/node/components/Property/index.d.cts.map +0 -1
- package/dist/node/components/Property/index.d.mts +0 -2
- package/dist/node/components/Property/index.d.mts.map +0 -1
- package/dist/node/components/Property/index.d.ts +0 -2
- package/dist/node/components/Property/index.d.ts.map +0 -1
- package/dist/node/components/SelectEx/SchemaSelectEx.d.cts +0 -5
- package/dist/node/components/SelectEx/SchemaSelectEx.d.cts.map +0 -1
- package/dist/node/components/SelectEx/SchemaSelectEx.d.mts +0 -5
- package/dist/node/components/SelectEx/SchemaSelectEx.d.mts.map +0 -1
- package/dist/node/components/SelectEx/SchemaSelectEx.d.ts +0 -5
- package/dist/node/components/SelectEx/SchemaSelectEx.d.ts.map +0 -1
- package/dist/node/components/SelectEx/index.d.cts +0 -2
- package/dist/node/components/SelectEx/index.d.cts.map +0 -1
- package/dist/node/components/SelectEx/index.d.mts +0 -2
- package/dist/node/components/SelectEx/index.d.mts.map +0 -1
- package/dist/node/components/SelectEx/index.d.ts +0 -2
- package/dist/node/components/SelectEx/index.d.ts.map +0 -1
- package/dist/node/components/index.d.cts +0 -3
- package/dist/node/components/index.d.cts.map +0 -1
- package/dist/node/components/index.d.mts +0 -3
- package/dist/node/components/index.d.mts.map +0 -1
- package/dist/node/components/index.d.ts +0 -3
- package/dist/node/components/index.d.ts.map +0 -1
- package/dist/node/contexts/Schema/Context.d.cts +0 -3
- package/dist/node/contexts/Schema/Context.d.cts.map +0 -1
- package/dist/node/contexts/Schema/Context.d.mts +0 -3
- package/dist/node/contexts/Schema/Context.d.mts.map +0 -1
- package/dist/node/contexts/Schema/Context.d.ts +0 -3
- package/dist/node/contexts/Schema/Context.d.ts.map +0 -1
- package/dist/node/contexts/Schema/Provider/Memory.d.cts +0 -5
- package/dist/node/contexts/Schema/Provider/Memory.d.cts.map +0 -1
- package/dist/node/contexts/Schema/Provider/Memory.d.mts +0 -5
- package/dist/node/contexts/Schema/Provider/Memory.d.mts.map +0 -1
- package/dist/node/contexts/Schema/Provider/Memory.d.ts +0 -5
- package/dist/node/contexts/Schema/Provider/Memory.d.ts.map +0 -1
- package/dist/node/contexts/Schema/Provider/Props.d.cts +0 -5
- package/dist/node/contexts/Schema/Provider/Props.d.cts.map +0 -1
- package/dist/node/contexts/Schema/Provider/Props.d.mts +0 -5
- package/dist/node/contexts/Schema/Provider/Props.d.mts.map +0 -1
- package/dist/node/contexts/Schema/Provider/Props.d.ts +0 -5
- package/dist/node/contexts/Schema/Provider/Props.d.ts.map +0 -1
- package/dist/node/contexts/Schema/Provider/Route.d.cts +0 -5
- package/dist/node/contexts/Schema/Provider/Route.d.cts.map +0 -1
- package/dist/node/contexts/Schema/Provider/Route.d.mts +0 -5
- package/dist/node/contexts/Schema/Provider/Route.d.mts.map +0 -1
- package/dist/node/contexts/Schema/Provider/Route.d.ts +0 -5
- package/dist/node/contexts/Schema/Provider/Route.d.ts.map +0 -1
- package/dist/node/contexts/Schema/Provider/index.d.cts +0 -4
- package/dist/node/contexts/Schema/Provider/index.d.cts.map +0 -1
- package/dist/node/contexts/Schema/Provider/index.d.mts +0 -4
- package/dist/node/contexts/Schema/Provider/index.d.mts.map +0 -1
- package/dist/node/contexts/Schema/Provider/index.d.ts +0 -4
- package/dist/node/contexts/Schema/Provider/index.d.ts.map +0 -1
- package/dist/node/contexts/Schema/State.d.cts +0 -9
- package/dist/node/contexts/Schema/State.d.cts.map +0 -1
- package/dist/node/contexts/Schema/State.d.mts +0 -9
- package/dist/node/contexts/Schema/State.d.mts.map +0 -1
- package/dist/node/contexts/Schema/State.d.ts +0 -9
- package/dist/node/contexts/Schema/State.d.ts.map +0 -1
- package/dist/node/contexts/Schema/index.d.cts +0 -5
- package/dist/node/contexts/Schema/index.d.cts.map +0 -1
- package/dist/node/contexts/Schema/index.d.mts +0 -5
- package/dist/node/contexts/Schema/index.d.mts.map +0 -1
- package/dist/node/contexts/Schema/index.d.ts +0 -5
- package/dist/node/contexts/Schema/index.d.ts.map +0 -1
- package/dist/node/contexts/Schema/use.d.cts +0 -3
- package/dist/node/contexts/Schema/use.d.cts.map +0 -1
- package/dist/node/contexts/Schema/use.d.mts +0 -3
- package/dist/node/contexts/Schema/use.d.mts.map +0 -1
- package/dist/node/contexts/Schema/use.d.ts +0 -3
- package/dist/node/contexts/Schema/use.d.ts.map +0 -1
- package/dist/node/contexts/index.d.cts +0 -2
- package/dist/node/contexts/index.d.cts.map +0 -1
- package/dist/node/contexts/index.d.mts +0 -2
- package/dist/node/contexts/index.d.mts.map +0 -1
- package/dist/node/contexts/index.d.ts +0 -2
- package/dist/node/contexts/index.d.ts.map +0 -1
- package/dist/node/hooks/index.d.cts +0 -5
- package/dist/node/hooks/index.d.cts.map +0 -1
- package/dist/node/hooks/index.d.mts +0 -5
- package/dist/node/hooks/index.d.mts.map +0 -1
- package/dist/node/hooks/index.d.ts +0 -5
- package/dist/node/hooks/index.d.ts.map +0 -1
- package/dist/node/hooks/useGetSchema.d.cts +0 -26
- package/dist/node/hooks/useGetSchema.d.cts.map +0 -1
- package/dist/node/hooks/useGetSchema.d.mts +0 -26
- package/dist/node/hooks/useGetSchema.d.mts.map +0 -1
- package/dist/node/hooks/useGetSchema.d.ts +0 -26
- package/dist/node/hooks/useGetSchema.d.ts.map +0 -1
- package/dist/node/hooks/useSchemaDefinitions.d.cts +0 -6
- package/dist/node/hooks/useSchemaDefinitions.d.cts.map +0 -1
- package/dist/node/hooks/useSchemaDefinitions.d.mts +0 -6
- package/dist/node/hooks/useSchemaDefinitions.d.mts.map +0 -1
- package/dist/node/hooks/useSchemaDefinitions.d.ts +0 -6
- package/dist/node/hooks/useSchemaDefinitions.d.ts.map +0 -1
- package/dist/node/hooks/useSchemaList.d.cts +0 -4
- package/dist/node/hooks/useSchemaList.d.cts.map +0 -1
- package/dist/node/hooks/useSchemaList.d.mts +0 -4
- package/dist/node/hooks/useSchemaList.d.mts.map +0 -1
- package/dist/node/hooks/useSchemaList.d.ts +0 -4
- package/dist/node/hooks/useSchemaList.d.ts.map +0 -1
- package/dist/node/hooks/useSchemaStats.d.cts +0 -5
- package/dist/node/hooks/useSchemaStats.d.cts.map +0 -1
- package/dist/node/hooks/useSchemaStats.d.mts +0 -5
- package/dist/node/hooks/useSchemaStats.d.mts.map +0 -1
- package/dist/node/hooks/useSchemaStats.d.ts +0 -5
- package/dist/node/hooks/useSchemaStats.d.ts.map +0 -1
- package/dist/node/index.cjs +0 -470
- package/dist/node/index.cjs.map +0 -1
- package/dist/node/index.d.cts +0 -4
- package/dist/node/index.d.cts.map +0 -1
- package/dist/node/index.d.mts +0 -4
- package/dist/node/index.d.mts.map +0 -1
- package/dist/node/index.d.ts +0 -4
- package/dist/node/index.d.ts.map +0 -1
- package/dist/node/index.mjs +0 -426
- package/dist/node/index.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSchemaStats.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSchemaStats.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EAEL,kBAAkB,EAGnB,MAAM,yCAAyC,CAAA;AAIhD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAqB,MAAM,OAAO,CAAA;AAEnE,eAAO,MAAM,cAAc,kBACV,OAAO,6BAErB,CAAC,kBAAkB,EAAE,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CA6CxF,CAAA"}
|
package/dist/node/index.cjs
DELETED
|
@@ -1,470 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/index.ts
|
|
32
|
-
var src_exports = {};
|
|
33
|
-
__export(src_exports, {
|
|
34
|
-
SchemaContext: () => SchemaContext,
|
|
35
|
-
SchemaMemoryProvider: () => SchemaMemoryProvider,
|
|
36
|
-
SchemaProperty: () => SchemaProperty,
|
|
37
|
-
SchemaRouteProvider: () => SchemaRouteProvider,
|
|
38
|
-
SchemaSelectEx: () => SchemaSelectEx,
|
|
39
|
-
useGetSchemaPayload: () => useGetSchemaPayload,
|
|
40
|
-
useSchema: () => useSchema,
|
|
41
|
-
useSchemaDefinitions: () => useSchemaDefinitions,
|
|
42
|
-
useSchemaList: () => useSchemaList,
|
|
43
|
-
useSchemaStats: () => useSchemaStats
|
|
44
|
-
});
|
|
45
|
-
module.exports = __toCommonJS(src_exports);
|
|
46
|
-
|
|
47
|
-
// src/components/Property/SchemaProperty.tsx
|
|
48
|
-
var import_icons_material = require("@mui/icons-material");
|
|
49
|
-
var import_material = require("@mui/material");
|
|
50
|
-
var import_react_async_effect = require("@xylabs/react-async-effect");
|
|
51
|
-
var import_react_link = require("@xylabs/react-link");
|
|
52
|
-
var import_react_event = require("@xyo-network/react-event");
|
|
53
|
-
var import_react_property = require("@xyo-network/react-property");
|
|
54
|
-
var import_schema_cache = require("@xyo-network/schema-cache");
|
|
55
|
-
var import_react = __toESM(require("react"), 1);
|
|
56
|
-
var useResolveSchema = /* @__PURE__ */ __name((schema) => {
|
|
57
|
-
const [entry, setEntry] = (0, import_react.useState)();
|
|
58
|
-
(0, import_react_async_effect.useAsyncEffect)(async (mounted) => {
|
|
59
|
-
if (schema) {
|
|
60
|
-
const entry2 = await import_schema_cache.SchemaCache.instance.get(schema);
|
|
61
|
-
if (mounted()) {
|
|
62
|
-
setEntry(entry2);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}, [
|
|
66
|
-
schema
|
|
67
|
-
]);
|
|
68
|
-
return entry;
|
|
69
|
-
}, "useResolveSchema");
|
|
70
|
-
var SchemaProperty = /* @__PURE__ */ (0, import_react.forwardRef)(({ showLinkNames = true, showOpenNewWindowLink = true, showStatusIcon = true, titleProps, value, ...props }, forwardedRef) => {
|
|
71
|
-
var _a;
|
|
72
|
-
const resolvedSchema = useResolveSchema(value);
|
|
73
|
-
const [buttonRef, buttonDispatch] = (0, import_react_event.useEvent)();
|
|
74
|
-
const [divRef, divDispatch] = (0, import_react_event.useEvent)();
|
|
75
|
-
const onClick = /* @__PURE__ */ __name((dispatch, openNewWindow = false) => {
|
|
76
|
-
dispatch == null ? void 0 : dispatch("schema", "click", JSON.stringify({
|
|
77
|
-
openNewWindow,
|
|
78
|
-
schema: value
|
|
79
|
-
}));
|
|
80
|
-
}, "onClick");
|
|
81
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react_property.Property, {
|
|
82
|
-
ref: forwardedRef,
|
|
83
|
-
title: "Schema",
|
|
84
|
-
value,
|
|
85
|
-
tip: "Schema sent with the payload",
|
|
86
|
-
titleProps,
|
|
87
|
-
...props
|
|
88
|
-
}, value && showStatusIcon ? resolvedSchema === null ? /* @__PURE__ */ import_react.default.createElement(import_material.IconButton, {
|
|
89
|
-
ref: buttonRef,
|
|
90
|
-
size: "small",
|
|
91
|
-
onClick: /* @__PURE__ */ __name(() => onClick(buttonDispatch), "onClick")
|
|
92
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.NewReleases, {
|
|
93
|
-
color: "warning",
|
|
94
|
-
fontSize: "inherit"
|
|
95
|
-
})) : resolvedSchema === void 0 ? /* @__PURE__ */ import_react.default.createElement(import_material.IconButton, {
|
|
96
|
-
ref: buttonRef,
|
|
97
|
-
size: "small",
|
|
98
|
-
onClick: /* @__PURE__ */ __name(() => onClick(buttonDispatch), "onClick")
|
|
99
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.NewReleases, {
|
|
100
|
-
color: "disabled",
|
|
101
|
-
fontSize: "inherit"
|
|
102
|
-
})) : /* @__PURE__ */ import_react.default.createElement(import_material.IconButton, {
|
|
103
|
-
rel: "noopener noreferrer",
|
|
104
|
-
size: "small",
|
|
105
|
-
target: "_blank",
|
|
106
|
-
href: ((_a = resolvedSchema == null ? void 0 : resolvedSchema.huri) == null ? void 0 : _a.href) ?? ""
|
|
107
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.Verified, {
|
|
108
|
-
color: "success",
|
|
109
|
-
fontSize: "inherit"
|
|
110
|
-
})) : null, value ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showLinkNames ? /* @__PURE__ */ import_react.default.createElement(import_react_link.LinkEx, {
|
|
111
|
-
display: "block",
|
|
112
|
-
width: "100%",
|
|
113
|
-
sx: {
|
|
114
|
-
cursor: "pointer"
|
|
115
|
-
}
|
|
116
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_react_property.PropertyValue, {
|
|
117
|
-
ref: divRef,
|
|
118
|
-
value,
|
|
119
|
-
title: "view schema",
|
|
120
|
-
onClick: /* @__PURE__ */ __name(() => onClick(divDispatch), "onClick")
|
|
121
|
-
})) : /* @__PURE__ */ import_react.default.createElement(import_react_property.PropertyValue, {
|
|
122
|
-
ref: divRef,
|
|
123
|
-
value,
|
|
124
|
-
title: "view schema",
|
|
125
|
-
onClick: /* @__PURE__ */ __name(() => onClick(divDispatch), "onClick")
|
|
126
|
-
}), showOpenNewWindowLink ? /* @__PURE__ */ import_react.default.createElement(import_material.IconButton, {
|
|
127
|
-
ref: buttonRef,
|
|
128
|
-
size: "small",
|
|
129
|
-
onClick: /* @__PURE__ */ __name(() => onClick(buttonDispatch, true), "onClick")
|
|
130
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_icons_material.OpenInNew, {
|
|
131
|
-
fontSize: "inherit"
|
|
132
|
-
})) : null) : null);
|
|
133
|
-
});
|
|
134
|
-
SchemaProperty.displayName = "SchemaProperty";
|
|
135
|
-
|
|
136
|
-
// src/components/SelectEx/SchemaSelectEx.tsx
|
|
137
|
-
var import_material2 = require("@mui/material");
|
|
138
|
-
var import_react_select = require("@xylabs/react-select");
|
|
139
|
-
var import_react8 = __toESM(require("react"), 1);
|
|
140
|
-
|
|
141
|
-
// src/contexts/Schema/Context.ts
|
|
142
|
-
var import_react_shared = require("@xyo-network/react-shared");
|
|
143
|
-
var SchemaContext = (0, import_react_shared.createContextEx)();
|
|
144
|
-
|
|
145
|
-
// src/contexts/Schema/Provider/Memory.tsx
|
|
146
|
-
var import_lodash = require("@xylabs/lodash");
|
|
147
|
-
var import_react6 = __toESM(require("react"), 1);
|
|
148
|
-
|
|
149
|
-
// src/hooks/useGetSchema.tsx
|
|
150
|
-
var import_react_async_effect2 = require("@xylabs/react-async-effect");
|
|
151
|
-
var import_payload_builder = require("@xyo-network/payload-builder");
|
|
152
|
-
var import_payload_model = require("@xyo-network/payload-model");
|
|
153
|
-
var import_schema_cache2 = require("@xyo-network/schema-cache");
|
|
154
|
-
var import_react2 = require("react");
|
|
155
|
-
var useGetSchemaPayload = /* @__PURE__ */ __name((schema) => {
|
|
156
|
-
const [notFound, setNotFound] = (0, import_react2.useState)(false);
|
|
157
|
-
const [xyoError, setError] = (0, import_react2.useState)();
|
|
158
|
-
const [schemaCacheEntry, setSchemaCacheEntry] = (0, import_react2.useState)();
|
|
159
|
-
const [schemaLocal, setSchemaLocal] = (0, import_react2.useState)();
|
|
160
|
-
(0, import_react_async_effect2.useAsyncEffect)(async (mounted) => {
|
|
161
|
-
const firstRequest = !notFound && !schemaCacheEntry && !xyoError;
|
|
162
|
-
const schemaChanged = schema !== schemaLocal;
|
|
163
|
-
if (schema && firstRequest || schema && schemaChanged) {
|
|
164
|
-
try {
|
|
165
|
-
const schemaCacheEntry2 = await import_schema_cache2.SchemaCache.instance.get(schema);
|
|
166
|
-
if (mounted()) {
|
|
167
|
-
setSchemaCacheEntry(schemaCacheEntry2);
|
|
168
|
-
setNotFound(schemaCacheEntry2 === null || schemaCacheEntry2 === void 0);
|
|
169
|
-
}
|
|
170
|
-
} catch (e) {
|
|
171
|
-
const error = e;
|
|
172
|
-
console.error(e);
|
|
173
|
-
if (mounted()) {
|
|
174
|
-
setError({
|
|
175
|
-
message: error.message,
|
|
176
|
-
schema: import_payload_model.ModuleErrorSchema,
|
|
177
|
-
sources: []
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
if (schemaChanged) {
|
|
183
|
-
setSchemaLocal(schema);
|
|
184
|
-
}
|
|
185
|
-
}, [
|
|
186
|
-
xyoError,
|
|
187
|
-
notFound,
|
|
188
|
-
schema,
|
|
189
|
-
schemaLocal,
|
|
190
|
-
schemaCacheEntry
|
|
191
|
-
]);
|
|
192
|
-
return {
|
|
193
|
-
notFound,
|
|
194
|
-
schemaHuri: schemaCacheEntry == null ? void 0 : schemaCacheEntry.huri,
|
|
195
|
-
schemaPayload: schemaCacheEntry ? new import_payload_builder.PayloadBuilder(schemaCacheEntry == null ? void 0 : schemaCacheEntry.payload).fields(schemaCacheEntry.payload).build() : schemaCacheEntry,
|
|
196
|
-
xyoError
|
|
197
|
-
};
|
|
198
|
-
}, "useGetSchemaPayload");
|
|
199
|
-
|
|
200
|
-
// src/hooks/useSchemaDefinitions.tsx
|
|
201
|
-
var import_react_async_effect3 = require("@xylabs/react-async-effect");
|
|
202
|
-
var import_schema_cache3 = require("@xyo-network/schema-cache");
|
|
203
|
-
var import_react3 = require("react");
|
|
204
|
-
var useSchemaDefinitions = /* @__PURE__ */ __name((schemaList) => {
|
|
205
|
-
const [schemaPayloads, setSchemaPayloads] = (0, import_react3.useState)();
|
|
206
|
-
(0, import_react_async_effect3.useAsyncEffect)(async (mounted) => {
|
|
207
|
-
if (schemaList) {
|
|
208
|
-
const promiseResults = await Promise.allSettled(schemaList == null ? void 0 : schemaList.map(({ name }) => import_schema_cache3.SchemaCache.instance.get(name)));
|
|
209
|
-
if (mounted()) {
|
|
210
|
-
setSchemaPayloads(promiseResults.map((result) => {
|
|
211
|
-
var _a;
|
|
212
|
-
return result.status === "fulfilled" ? (_a = result.value) == null ? void 0 : _a.payload : void 0;
|
|
213
|
-
}).filter((item) => item !== void 0 && item !== null));
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}, [
|
|
217
|
-
schemaList
|
|
218
|
-
]);
|
|
219
|
-
return schemaPayloads;
|
|
220
|
-
}, "useSchemaDefinitions");
|
|
221
|
-
|
|
222
|
-
// src/hooks/useSchemaList.tsx
|
|
223
|
-
var import_react_async_effect4 = require("@xylabs/react-async-effect");
|
|
224
|
-
var import_diviner_schema_list_model = require("@xyo-network/diviner-schema-list-model");
|
|
225
|
-
var import_react_diviner = require("@xyo-network/react-diviner");
|
|
226
|
-
var import_react4 = require("react");
|
|
227
|
-
var useSchemaList = /* @__PURE__ */ __name((address, nameOrAddress = "SchemaListDiviner") => {
|
|
228
|
-
const [schemaList, setSchemaList] = (0, import_react4.useState)();
|
|
229
|
-
const [error, setError] = (0, import_react4.useState)();
|
|
230
|
-
const [diviner, divinerError] = (0, import_react_diviner.useWeakDivinerFromNode)(nameOrAddress);
|
|
231
|
-
const query = (0, import_react4.useMemo)(() => address ? [
|
|
232
|
-
{
|
|
233
|
-
address,
|
|
234
|
-
schema: import_diviner_schema_list_model.SchemaListQuerySchema
|
|
235
|
-
}
|
|
236
|
-
] : void 0, [
|
|
237
|
-
address
|
|
238
|
-
]);
|
|
239
|
-
(0, import_react4.useEffect)(() => {
|
|
240
|
-
if (diviner === null) {
|
|
241
|
-
setSchemaList(null);
|
|
242
|
-
setError(void 0);
|
|
243
|
-
}
|
|
244
|
-
}, [
|
|
245
|
-
diviner
|
|
246
|
-
]);
|
|
247
|
-
(0, import_react_async_effect4.useAsyncEffect)(async (mounted) => {
|
|
248
|
-
const divinerInstance = diviner == null ? void 0 : diviner.deref();
|
|
249
|
-
if (divinerInstance) {
|
|
250
|
-
try {
|
|
251
|
-
const response = await divinerInstance.divine(query);
|
|
252
|
-
if (mounted()) {
|
|
253
|
-
setSchemaList(response == null ? void 0 : response[0]);
|
|
254
|
-
setError(void 0);
|
|
255
|
-
}
|
|
256
|
-
} catch (e) {
|
|
257
|
-
setError(e);
|
|
258
|
-
setSchemaList(void 0);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}, [
|
|
262
|
-
diviner,
|
|
263
|
-
divinerError,
|
|
264
|
-
query
|
|
265
|
-
]);
|
|
266
|
-
return [
|
|
267
|
-
schemaList,
|
|
268
|
-
error
|
|
269
|
-
];
|
|
270
|
-
}, "useSchemaList");
|
|
271
|
-
|
|
272
|
-
// src/hooks/useSchemaStats.tsx
|
|
273
|
-
var import_react_async_effect5 = require("@xylabs/react-async-effect");
|
|
274
|
-
var import_diviner_schema_stats_model = require("@xyo-network/diviner-schema-stats-model");
|
|
275
|
-
var import_node_core_types = require("@xyo-network/node-core-types");
|
|
276
|
-
var import_payload_model2 = require("@xyo-network/payload-model");
|
|
277
|
-
var import_react_diviner2 = require("@xyo-network/react-diviner");
|
|
278
|
-
var import_react5 = require("react");
|
|
279
|
-
var useSchemaStats = /* @__PURE__ */ __name((statsAddress, nameOrAddress = import_node_core_types.TYPES.SchemaStatsDiviner) => {
|
|
280
|
-
const [refresh, setRefresh] = (0, import_react5.useState)(1);
|
|
281
|
-
const [diviner, divinerError] = (0, import_react_diviner2.useWeakDivinerFromNode)(nameOrAddress);
|
|
282
|
-
const [error, setError] = (0, import_react5.useState)();
|
|
283
|
-
const refreshHistory = /* @__PURE__ */ __name(() => setRefresh((previous) => previous + 1), "refreshHistory");
|
|
284
|
-
const [schemaList, setSchemaList] = (0, import_react5.useState)();
|
|
285
|
-
const query = (0, import_react5.useMemo)(() => ({
|
|
286
|
-
address: statsAddress,
|
|
287
|
-
schema: import_diviner_schema_stats_model.SchemaStatsQuerySchema
|
|
288
|
-
}), [
|
|
289
|
-
statsAddress
|
|
290
|
-
]);
|
|
291
|
-
(0, import_react_async_effect5.useAsyncEffect)(async (mounted) => {
|
|
292
|
-
const instance = diviner == null ? void 0 : diviner.deref();
|
|
293
|
-
if (instance) {
|
|
294
|
-
if (divinerError) {
|
|
295
|
-
if (mounted()) {
|
|
296
|
-
setError(divinerError);
|
|
297
|
-
setSchemaList(void 0);
|
|
298
|
-
}
|
|
299
|
-
} else {
|
|
300
|
-
try {
|
|
301
|
-
const schemas = (await instance.divine([
|
|
302
|
-
query
|
|
303
|
-
])).filter((0, import_payload_model2.isPayloadOfSchemaTypeWithMeta)(import_diviner_schema_stats_model.SchemaStatsDivinerSchema));
|
|
304
|
-
if (mounted()) {
|
|
305
|
-
setSchemaList(schemas);
|
|
306
|
-
setError(void 0);
|
|
307
|
-
}
|
|
308
|
-
} catch (ex) {
|
|
309
|
-
setError(ex);
|
|
310
|
-
setSchemaList(void 0);
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}, [
|
|
315
|
-
diviner,
|
|
316
|
-
refresh,
|
|
317
|
-
divinerError,
|
|
318
|
-
query
|
|
319
|
-
]);
|
|
320
|
-
return [
|
|
321
|
-
schemaList,
|
|
322
|
-
error,
|
|
323
|
-
refreshHistory
|
|
324
|
-
];
|
|
325
|
-
}, "useSchemaStats");
|
|
326
|
-
|
|
327
|
-
// src/contexts/Schema/Provider/Memory.tsx
|
|
328
|
-
var SchemaMemoryProvider = /* @__PURE__ */ __name(({ defaultSchema, knownSchemaList, ...props }) => {
|
|
329
|
-
const [schema, setSchema] = (0, import_react6.useState)(defaultSchema);
|
|
330
|
-
const [schemaList, setSchemaList] = (0, import_react6.useState)(knownSchemaList);
|
|
331
|
-
const [fetchedSchemaStats] = useSchemaStats();
|
|
332
|
-
(0, import_react6.useEffect)(() => {
|
|
333
|
-
if (fetchedSchemaStats) {
|
|
334
|
-
const schemaList2 = (0, import_lodash.compact)(fetchedSchemaStats.map(({ name }) => name));
|
|
335
|
-
setSchemaList(schemaList2);
|
|
336
|
-
}
|
|
337
|
-
}, [
|
|
338
|
-
fetchedSchemaStats
|
|
339
|
-
]);
|
|
340
|
-
const value = (0, import_react6.useMemo)(() => ({
|
|
341
|
-
provided: true,
|
|
342
|
-
schema,
|
|
343
|
-
schemaList: knownSchemaList ?? schemaList,
|
|
344
|
-
setSchema,
|
|
345
|
-
setSchemaList
|
|
346
|
-
}), [
|
|
347
|
-
schema,
|
|
348
|
-
schemaList,
|
|
349
|
-
knownSchemaList
|
|
350
|
-
]);
|
|
351
|
-
return /* @__PURE__ */ import_react6.default.createElement(SchemaContext.Provider, {
|
|
352
|
-
value,
|
|
353
|
-
...props
|
|
354
|
-
});
|
|
355
|
-
}, "SchemaMemoryProvider");
|
|
356
|
-
|
|
357
|
-
// src/contexts/Schema/Provider/Route.tsx
|
|
358
|
-
var import_react7 = __toESM(require("react"), 1);
|
|
359
|
-
var import_react_router_dom = require("react-router-dom");
|
|
360
|
-
|
|
361
|
-
// src/contexts/Schema/use.ts
|
|
362
|
-
var import_react_shared2 = require("@xyo-network/react-shared");
|
|
363
|
-
var useSchema = /* @__PURE__ */ __name((required = false) => {
|
|
364
|
-
return (0, import_react_shared2.useContextEx)(SchemaContext, "Schema", required);
|
|
365
|
-
}, "useSchema");
|
|
366
|
-
|
|
367
|
-
// src/contexts/Schema/Provider/Route.tsx
|
|
368
|
-
var SchemaRouteProviderInner = /* @__PURE__ */ __name(({ children }) => {
|
|
369
|
-
const { schema, setSchema, schemaList } = useSchema();
|
|
370
|
-
const [params, setParams] = (0, import_react_router_dom.useSearchParams)();
|
|
371
|
-
const routeSchema = params.get("schema");
|
|
372
|
-
const setSchemaParam = (0, import_react7.useCallback)((schema2) => {
|
|
373
|
-
if (schema2) {
|
|
374
|
-
params.set("schema", schema2);
|
|
375
|
-
setParams(params, {
|
|
376
|
-
replace: true
|
|
377
|
-
});
|
|
378
|
-
setSchema == null ? void 0 : setSchema(schema2);
|
|
379
|
-
} else {
|
|
380
|
-
params.delete("network");
|
|
381
|
-
}
|
|
382
|
-
}, [
|
|
383
|
-
params,
|
|
384
|
-
setParams,
|
|
385
|
-
setSchema
|
|
386
|
-
]);
|
|
387
|
-
const setSchemaLocal = (0, import_react7.useCallback)((schema2) => {
|
|
388
|
-
setSchemaParam(schema2);
|
|
389
|
-
setSchema == null ? void 0 : setSchema(schema2);
|
|
390
|
-
}, [
|
|
391
|
-
setSchemaParam,
|
|
392
|
-
setSchema
|
|
393
|
-
]);
|
|
394
|
-
(0, import_react7.useEffect)(() => {
|
|
395
|
-
if (routeSchema !== schema) {
|
|
396
|
-
if (routeSchema === void 0 && schema !== void 0) {
|
|
397
|
-
setSchemaLocal(schema);
|
|
398
|
-
} else if (routeSchema) {
|
|
399
|
-
setSchema == null ? void 0 : setSchema(routeSchema);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}, [
|
|
403
|
-
routeSchema,
|
|
404
|
-
schema,
|
|
405
|
-
setSchemaParam,
|
|
406
|
-
setSchema,
|
|
407
|
-
setSchemaLocal
|
|
408
|
-
]);
|
|
409
|
-
const value = (0, import_react7.useMemo)(() => ({
|
|
410
|
-
provided: true,
|
|
411
|
-
schema,
|
|
412
|
-
schemaList,
|
|
413
|
-
setSchema: setSchemaLocal
|
|
414
|
-
}), [
|
|
415
|
-
schema,
|
|
416
|
-
schemaList,
|
|
417
|
-
setSchemaLocal
|
|
418
|
-
]);
|
|
419
|
-
return /* @__PURE__ */ import_react7.default.createElement(SchemaContext.Provider, {
|
|
420
|
-
value
|
|
421
|
-
}, children);
|
|
422
|
-
}, "SchemaRouteProviderInner");
|
|
423
|
-
var SchemaRouteProvider = /* @__PURE__ */ __name(({ knownSchemaList, defaultSchema, ...props }) => {
|
|
424
|
-
return /* @__PURE__ */ import_react7.default.createElement(SchemaMemoryProvider, {
|
|
425
|
-
knownSchemaList,
|
|
426
|
-
defaultSchema
|
|
427
|
-
}, /* @__PURE__ */ import_react7.default.createElement(SchemaRouteProviderInner, props));
|
|
428
|
-
}, "SchemaRouteProvider");
|
|
429
|
-
|
|
430
|
-
// src/components/SelectEx/SchemaSelectEx.tsx
|
|
431
|
-
var SchemaSelectEx = /* @__PURE__ */ __name(({ onChange, variant = "outlined", ...props }) => {
|
|
432
|
-
const { schema, setSchema, schemaList } = useSchema(false);
|
|
433
|
-
return /* @__PURE__ */ import_react8.default.createElement(import_react_select.SelectEx, {
|
|
434
|
-
variant,
|
|
435
|
-
size: "small",
|
|
436
|
-
value: schema ?? "none",
|
|
437
|
-
onChange: /* @__PURE__ */ __name((event, child) => {
|
|
438
|
-
if (event.target.value !== schema) {
|
|
439
|
-
onChange == null ? void 0 : onChange(event, child);
|
|
440
|
-
setSchema == null ? void 0 : setSchema(event.target.value);
|
|
441
|
-
}
|
|
442
|
-
}, "onChange"),
|
|
443
|
-
renderValue: /* @__PURE__ */ __name((value) => {
|
|
444
|
-
return /* @__PURE__ */ import_react8.default.createElement(import_material2.Typography, null, value === "none" ? "- None -" : value);
|
|
445
|
-
}, "renderValue"),
|
|
446
|
-
...props
|
|
447
|
-
}, schemaList == null ? void 0 : schemaList.map((schema2, index) => {
|
|
448
|
-
return /* @__PURE__ */ import_react8.default.createElement(import_material2.MenuItem, {
|
|
449
|
-
key: index,
|
|
450
|
-
value: schema2
|
|
451
|
-
}, schema2);
|
|
452
|
-
}), /* @__PURE__ */ import_react8.default.createElement(import_material2.MenuItem, {
|
|
453
|
-
key: "none",
|
|
454
|
-
value: "none"
|
|
455
|
-
}, "- None -"));
|
|
456
|
-
}, "SchemaSelectEx");
|
|
457
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
458
|
-
0 && (module.exports = {
|
|
459
|
-
SchemaContext,
|
|
460
|
-
SchemaMemoryProvider,
|
|
461
|
-
SchemaProperty,
|
|
462
|
-
SchemaRouteProvider,
|
|
463
|
-
SchemaSelectEx,
|
|
464
|
-
useGetSchemaPayload,
|
|
465
|
-
useSchema,
|
|
466
|
-
useSchemaDefinitions,
|
|
467
|
-
useSchemaList,
|
|
468
|
-
useSchemaStats
|
|
469
|
-
});
|
|
470
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/node/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/components/Property/SchemaProperty.tsx","../../src/components/SelectEx/SchemaSelectEx.tsx","../../src/contexts/Schema/Context.ts","../../src/contexts/Schema/Provider/Memory.tsx","../../src/hooks/useGetSchema.tsx","../../src/hooks/useSchemaDefinitions.tsx","../../src/hooks/useSchemaList.tsx","../../src/hooks/useSchemaStats.tsx","../../src/contexts/Schema/Provider/Route.tsx","../../src/contexts/Schema/use.ts"],"sourcesContent":["export * from './components/index.ts'\nexport * from './contexts/index.ts'\nexport * from './hooks/index.ts'\n","import { NewReleases as NewReleasesIcon, OpenInNew as OpenInNewIcon, Verified as VerifiedIcon } from '@mui/icons-material'\nimport { IconButton } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { LinkEx } from '@xylabs/react-link'\nimport { EventDispatch, EventNoun, useEvent } from '@xyo-network/react-event'\nimport { Property, PropertyProps, PropertyValue } from '@xyo-network/react-property'\nimport { SchemaCache, SchemaCacheEntry } from '@xyo-network/schema-cache'\nimport React, { forwardRef, useState } from 'react'\n\nexport type SchemaPropertyProps = PropertyProps & {\n showLinkNames?: boolean\n showOpenNewWindowLink?: boolean\n showStatusIcon?: boolean\n value?: string\n}\n\nconst useResolveSchema = (schema?: string) => {\n const [entry, setEntry] = useState<SchemaCacheEntry | null>()\n useAsyncEffect(\n async (mounted) => {\n if (schema) {\n const entry = await SchemaCache.instance.get(schema)\n if (mounted()) {\n setEntry(entry)\n }\n }\n },\n [schema],\n )\n return entry\n}\n\nexport const SchemaProperty = forwardRef<HTMLDivElement, SchemaPropertyProps>(\n ({ showLinkNames = true, showOpenNewWindowLink = true, showStatusIcon = true, titleProps, value, ...props }, forwardedRef) => {\n const resolvedSchema = useResolveSchema(value)\n const [buttonRef, buttonDispatch] = useEvent<HTMLButtonElement>()\n const [divRef, divDispatch] = useEvent<HTMLDivElement>()\n\n const onClick = (dispatch?: EventDispatch<EventNoun, 'click', string>, openNewWindow = false) => {\n dispatch?.(\n 'schema',\n 'click',\n JSON.stringify({\n openNewWindow,\n schema: value,\n }),\n )\n }\n\n return (\n <Property ref={forwardedRef} title=\"Schema\" value={value} tip=\"Schema sent with the payload\" titleProps={titleProps} {...props}>\n {value && showStatusIcon\n ? resolvedSchema === null\n ? (\n <IconButton ref={buttonRef} size=\"small\" onClick={() => onClick(buttonDispatch)}>\n <NewReleasesIcon color=\"warning\" fontSize=\"inherit\" />\n </IconButton>\n )\n : resolvedSchema === undefined\n ? (\n <IconButton ref={buttonRef} size=\"small\" onClick={() => onClick(buttonDispatch)}>\n <NewReleasesIcon color=\"disabled\" fontSize=\"inherit\" />\n </IconButton>\n )\n : (\n <IconButton rel=\"noopener noreferrer\" size=\"small\" target=\"_blank\" href={resolvedSchema?.huri?.href ?? ''}>\n <VerifiedIcon color=\"success\" fontSize=\"inherit\" />\n </IconButton>\n )\n\n : null}\n {value\n ? (\n <>\n {showLinkNames\n ? (\n <LinkEx display=\"block\" width=\"100%\" sx={{ cursor: 'pointer' }}>\n <PropertyValue ref={divRef} value={value} title=\"view schema\" onClick={() => onClick(divDispatch)} />\n </LinkEx>\n )\n : <PropertyValue ref={divRef} value={value} title=\"view schema\" onClick={() => onClick(divDispatch)} />}\n {showOpenNewWindowLink\n ? (\n <IconButton ref={buttonRef} size=\"small\" onClick={() => onClick(buttonDispatch, true)}>\n <OpenInNewIcon fontSize=\"inherit\" />\n </IconButton>\n )\n : null}\n </>\n )\n : null}\n </Property>\n )\n },\n)\n\nSchemaProperty.displayName = 'SchemaProperty'\n","import { MenuItem, Typography } from '@mui/material'\nimport { SelectEx, SelectExProps } from '@xylabs/react-select'\nimport React from 'react'\n\nimport { useSchema } from '../../contexts/index.ts'\n\nexport type SchemaSelectExProps = SelectExProps<string>\n\nexport const SchemaSelectEx: React.FC<SchemaSelectExProps> = ({ onChange, variant = 'outlined', ...props }) => {\n const { schema, setSchema, schemaList } = useSchema(false)\n\n return (\n <SelectEx\n variant={variant}\n size=\"small\"\n value={schema ?? 'none'}\n onChange={(event, child) => {\n if (event.target.value !== schema) {\n onChange?.(event, child)\n setSchema?.(event.target.value)\n }\n }}\n renderValue={(value) => {\n return <Typography>{value === 'none' ? '- None -' : value}</Typography>\n }}\n {...props}\n >\n {schemaList?.map((schema, index) => {\n return (\n <MenuItem key={index} value={schema}>\n {schema}\n </MenuItem>\n )\n })}\n <MenuItem key=\"none\" value=\"none\">\n - None -\n </MenuItem>\n </SelectEx>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { SchemaContextState } from './State.ts'\n\nexport const SchemaContext = createContextEx<SchemaContextState>()\n","import { compact } from '@xylabs/lodash'\nimport { WithChildren } from '@xylabs/react-shared'\nimport React, { useEffect, useMemo, useState } from 'react'\n\nimport { useSchemaStats } from '../../../hooks/index.ts'\nimport { SchemaContext } from '../Context.ts'\nimport { SchemaProviderProps } from './Props.ts'\n\nexport const SchemaMemoryProvider: React.FC<WithChildren<SchemaProviderProps>> = ({ defaultSchema, knownSchemaList, ...props }) => {\n const [schema, setSchema] = useState(defaultSchema)\n const [schemaList, setSchemaList] = useState<string[] | undefined>(knownSchemaList)\n const [fetchedSchemaStats] = useSchemaStats()\n\n useEffect(() => {\n if (fetchedSchemaStats) {\n const schemaList = compact(fetchedSchemaStats.map(({ name }) => name))\n setSchemaList(schemaList)\n }\n }, [fetchedSchemaStats])\n\n const value = useMemo(() => ({ provided: true, schema, schemaList: knownSchemaList ?? schemaList, setSchema, setSchemaList }), [schema, schemaList, knownSchemaList])\n\n return <SchemaContext.Provider value={value} {...props} />\n}\n","import { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { ModuleError, ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { SchemaCache, SchemaCacheEntry } from '@xyo-network/schema-cache'\nimport { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { useState } from 'react'\n\n/**\n * Gets a Huri and schema payload from a schema string\n */\nconst useGetSchemaPayload = (schema?: string) => {\n const [notFound, setNotFound] = useState(false)\n const [xyoError, setError] = useState<ModuleError>()\n const [schemaCacheEntry, setSchemaCacheEntry] = useState<SchemaCacheEntry | null | undefined>()\n const [schemaLocal, setSchemaLocal] = useState<string>()\n\n useAsyncEffect(\n async (mounted) => {\n const firstRequest = !notFound && !schemaCacheEntry && !xyoError\n const schemaChanged = schema !== schemaLocal\n\n if ((schema && firstRequest) || (schema && schemaChanged)) {\n try {\n const schemaCacheEntry = await SchemaCache.instance.get(schema)\n if (mounted()) {\n setSchemaCacheEntry(schemaCacheEntry)\n setNotFound(schemaCacheEntry === null || schemaCacheEntry === undefined)\n }\n } catch (e) {\n const error = e as Error\n console.error(e)\n if (mounted()) {\n setError({ message: error.message, schema: ModuleErrorSchema, sources: [] })\n }\n }\n }\n if (schemaChanged) {\n setSchemaLocal(schema)\n }\n },\n [xyoError, notFound, schema, schemaLocal, schemaCacheEntry],\n )\n\n return {\n notFound,\n schemaHuri: schemaCacheEntry?.huri,\n schemaPayload:\n schemaCacheEntry ? new PayloadBuilder<SchemaPayload>(schemaCacheEntry?.payload).fields(schemaCacheEntry.payload).build() : schemaCacheEntry,\n xyoError,\n }\n}\n\nexport { useGetSchemaPayload }\n","import { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { SchemaCache } from '@xyo-network/schema-cache'\nimport { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { useState } from 'react'\n\nexport type SchemaList = { name: string }\n\nexport const useSchemaDefinitions = (schemaList?: SchemaList[]): SchemaPayload[] | undefined => {\n const [schemaPayloads, setSchemaPayloads] = useState<SchemaPayload[]>()\n useAsyncEffect(\n async (mounted) => {\n if (schemaList) {\n const promiseResults = await Promise.allSettled(schemaList?.map(({ name }) => SchemaCache.instance.get(name)))\n if (mounted()) {\n setSchemaPayloads(\n promiseResults\n .map(result => (result.status === 'fulfilled' ? result.value?.payload : undefined))\n .filter(item => item !== undefined && item !== null) as SchemaPayload[],\n )\n }\n }\n },\n [schemaList],\n )\n return schemaPayloads\n}\n","import { Address } from '@xylabs/hex'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { SchemaListPayload, SchemaListQueryPayload, SchemaListQuerySchema } from '@xyo-network/diviner-schema-list-model'\nimport { WithMeta } from '@xyo-network/payload-model'\nimport { useWeakDivinerFromNode } from '@xyo-network/react-diviner'\nimport { useEffect, useMemo, useState } from 'react'\n\nexport const useSchemaList = (address?: Address, nameOrAddress = 'SchemaListDiviner'): [SchemaListPayload | null | undefined, Error | undefined] => {\n const [schemaList, setSchemaList] = useState<SchemaListPayload | null>()\n const [error, setError] = useState<Error>()\n const [diviner, divinerError] = useWeakDivinerFromNode(nameOrAddress)\n\n const query: SchemaListQueryPayload[] | undefined = useMemo(\n () =>\n address\n ? [\n {\n address,\n schema: SchemaListQuerySchema,\n },\n ]\n : undefined,\n [address],\n )\n\n useEffect(() => {\n if (diviner === null) {\n setSchemaList(null)\n setError(undefined)\n }\n }, [diviner])\n\n useAsyncEffect(\n async (mounted) => {\n const divinerInstance = diviner?.deref()\n if (divinerInstance) {\n try {\n const response = (await divinerInstance.divine(query)) as WithMeta<SchemaListPayload>[]\n if (mounted()) {\n setSchemaList(response?.[0])\n setError(undefined)\n }\n } catch (e) {\n setError(e as Error)\n setSchemaList(undefined)\n }\n }\n },\n [diviner, divinerError, query],\n )\n return [schemaList, error]\n}\n","import { Address } from '@xylabs/hex'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport {\n SchemaStatsDivinerSchema,\n SchemaStatsPayload,\n SchemaStatsQueryPayload,\n SchemaStatsQuerySchema,\n} from '@xyo-network/diviner-schema-stats-model'\nimport { TYPES } from '@xyo-network/node-core-types'\nimport { isPayloadOfSchemaTypeWithMeta, WithMeta, WithSources } from '@xyo-network/payload-model'\nimport { useWeakDivinerFromNode } from '@xyo-network/react-diviner'\nimport { Dispatch, SetStateAction, useMemo, useState } from 'react'\n\nexport const useSchemaStats = (\n statsAddress?: Address,\n nameOrAddress = TYPES.SchemaStatsDiviner,\n): [SchemaStatsPayload[] | undefined, Error | undefined, Dispatch<SetStateAction<number>>] => {\n const [refresh, setRefresh] = useState(1)\n const [diviner, divinerError] = useWeakDivinerFromNode(nameOrAddress)\n const [error, setError] = useState<Error>()\n const refreshHistory = () => setRefresh(previous => previous + 1)\n\n const [schemaList, setSchemaList] = useState<WithSources<WithMeta<SchemaStatsPayload>>[]>()\n\n const query: SchemaStatsQueryPayload = useMemo(\n () => ({\n address: statsAddress,\n schema: SchemaStatsQuerySchema,\n }),\n [statsAddress],\n )\n\n useAsyncEffect(\n async (mounted) => {\n const instance = diviner?.deref()\n if (instance) {\n if (divinerError) {\n if (mounted()) {\n setError(divinerError)\n setSchemaList(undefined)\n }\n } else {\n try {\n const schemas = (await instance.divine([query])).filter(isPayloadOfSchemaTypeWithMeta(SchemaStatsDivinerSchema)) as WithSources<\n WithMeta<SchemaStatsPayload>\n >[]\n if (mounted()) {\n setSchemaList(schemas)\n setError(undefined)\n }\n } catch (ex) {\n setError(ex as Error)\n setSchemaList(undefined)\n }\n }\n }\n },\n [diviner, refresh, divinerError, query],\n )\n\n return [schemaList, error, refreshHistory]\n}\n","import type { WithChildren } from '@xylabs/react-shared'\nimport React, { useCallback, useEffect, useMemo } from 'react'\nimport { useSearchParams } from 'react-router-dom'\n\nimport { SchemaContext } from '../Context.ts'\nimport { useSchema } from '../use.ts'\nimport { SchemaMemoryProvider } from './Memory.tsx'\nimport { SchemaProviderProps } from './Props.ts'\n\nconst SchemaRouteProviderInner: React.FC<WithChildren> = ({ children }) => {\n const { schema, setSchema, schemaList } = useSchema()\n\n const [params, setParams] = useSearchParams()\n\n const routeSchema = params.get('schema')\n\n // update the network stored in the route\n const setSchemaParam = useCallback(\n (schema?: string) => {\n if (schema) {\n params.set('schema', schema)\n setParams(params, { replace: true })\n setSchema?.(schema)\n } else {\n params.delete('network')\n }\n },\n [params, setParams, setSchema],\n )\n\n // if the network is actively changed, update both memory and route\n const setSchemaLocal = useCallback(\n (schema: string) => {\n setSchemaParam(schema)\n setSchema?.(schema)\n },\n [setSchemaParam, setSchema],\n )\n\n // sync memory and route storage of network\n useEffect(() => {\n if (routeSchema !== schema) {\n if (routeSchema === undefined && schema !== undefined) {\n // if the route does not have a network selected, use what is in the memory context\n setSchemaLocal(schema)\n } else if (routeSchema) {\n // if the route has a selection and it is different from memory, update memory\n setSchema?.(routeSchema)\n }\n }\n }, [routeSchema, schema, setSchemaParam, setSchema, setSchemaLocal])\n\n const value = useMemo(() => ({ provided: true, schema, schemaList, setSchema: setSchemaLocal }), [schema, schemaList, setSchemaLocal])\n\n return <SchemaContext.Provider value={value}>{children}</SchemaContext.Provider>\n}\n\nexport const SchemaRouteProvider: React.FC<WithChildren<SchemaProviderProps>> = ({ knownSchemaList, defaultSchema, ...props }) => {\n return (\n <SchemaMemoryProvider knownSchemaList={knownSchemaList} defaultSchema={defaultSchema}>\n <SchemaRouteProviderInner {...props} />\n </SchemaMemoryProvider>\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { SchemaContext } from './Context.ts'\nimport { SchemaContextState } from './State.ts'\n\nexport const useSchema = (required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R;KAEHG,yCAAYW,IAAI,CAACb,SAAQc,UAAAA;AACxB,WACE,8BAAAV,QAAA,cAACW,2BAAAA;MAASC,KAAKF;MAAOP,OAAOP;OAC1BA,OAAAA;EAGP,IACA,8BAAAI,QAAA,cAACW,2BAAAA;IAASC,KAAI;IAAOT,OAAM;KAAO,UAAA,CAAA;AAKxC,GA/B6D;","names":["useResolveSchema","schema","entry","setEntry","useState","useAsyncEffect","mounted","SchemaCache","instance","get","SchemaProperty","forwardRef","showLinkNames","showOpenNewWindowLink","showStatusIcon","titleProps","value","props","forwardedRef","resolvedSchema","buttonRef","buttonDispatch","useEvent","divRef","divDispatch","onClick","dispatch","openNewWindow","JSON","stringify","React","Property","ref","title","tip","IconButton","size","NewReleasesIcon","color","fontSize","undefined","rel","target","href","huri","VerifiedIcon","LinkEx","display","width","sx","cursor","PropertyValue","OpenInNewIcon","displayName","import_material","import_react","SchemaContext","createContextEx","import_react","import_react_async_effect","import_schema_cache","import_react","useGetSchemaPayload","schema","notFound","setNotFound","useState","xyoError","setError","schemaCacheEntry","setSchemaCacheEntry","schemaLocal","setSchemaLocal","useAsyncEffect","mounted","firstRequest","schemaChanged","SchemaCache","instance","get","undefined","e","error","console","message","ModuleErrorSchema","sources","schemaHuri","huri","schemaPayload","PayloadBuilder","payload","fields","build","import_react_async_effect","import_schema_cache","import_react","useSchemaDefinitions","schemaList","schemaPayloads","setSchemaPayloads","useState","useAsyncEffect","mounted","promiseResults","Promise","allSettled","map","name","SchemaCache","instance","get","result","status","value","payload","undefined","filter","item","import_react_async_effect","import_react","useSchemaList","address","nameOrAddress","schemaList","setSchemaList","useState","error","setError","diviner","divinerError","useWeakDivinerFromNode","query","useMemo","schema","SchemaListQuerySchema","undefined","useEffect","useAsyncEffect","mounted","divinerInstance","deref","response","divine","e","import_react_async_effect","import_payload_model","import_react_diviner","import_react","useSchemaStats","statsAddress","nameOrAddress","TYPES","SchemaStatsDiviner","refresh","setRefresh","useState","diviner","divinerError","useWeakDivinerFromNode","error","setError","refreshHistory","previous","schemaList","setSchemaList","query","useMemo","address","schema","SchemaStatsQuerySchema","useAsyncEffect","mounted","instance","deref","undefined","schemas","divine","filter","isPayloadOfSchemaTypeWithMeta","SchemaStatsDivinerSchema","ex","SchemaMemoryProvider","defaultSchema","knownSchemaList","props","schema","setSchema","useState","schemaList","setSchemaList","fetchedSchemaStats","useSchemaStats","useEffect","compact","map","name","value","useMemo","provided","React","SchemaContext","Provider","import_react","import_react_shared","useSchema","required","useContextEx","SchemaContext","SchemaRouteProviderInner","children","schema","setSchema","schemaList","useSchema","params","setParams","useSearchParams","routeSchema","get","setSchemaParam","useCallback","set","replace","delete","setSchemaLocal","useEffect","undefined","value","useMemo","provided","React","SchemaContext","Provider","SchemaRouteProvider","knownSchemaList","defaultSchema","props","SchemaMemoryProvider","SchemaSelectEx","onChange","variant","props","schema","setSchema","schemaList","useSchema","React","SelectEx","size","value","event","child","target","renderValue","Typography","map","index","MenuItem","key"]}
|
package/dist/node/index.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
|
package/dist/node/index.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
|
package/dist/node/index.d.ts
DELETED
package/dist/node/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
|