@danxbot/ui 16.0.0 → 16.2.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.
@@ -259,7 +259,10 @@ declare const ring: import("tailwind-variants").TVReturnType<{
259
259
  * unit of a card face row, `leading-4`), with nothing around it. Built to
260
260
  * carry an `xs` icon in its centre (`children`, `showValue={false}`): the
261
261
  * ring is the indicator and the icon says what it indicates. `xs` (14px)
262
- * is a hair short of a 16px line and leaves the ring floating in it.
262
+ * is a hair short of a 16px line and leaves the ring floating in it. Its
263
+ * track is thinner than every other size's (`RING_GEOMETRY`), so the icon
264
+ * fits inside it. Like `xs`, always pair with `showValue={false}`: two
265
+ * digits do not fit a 16px circle, and nothing clips or shrinks them.
263
266
  */
264
267
  row: "size-4";
265
268
  sm: "size-10";
@@ -290,7 +293,10 @@ declare const ring: import("tailwind-variants").TVReturnType<{
290
293
  * unit of a card face row, `leading-4`), with nothing around it. Built to
291
294
  * carry an `xs` icon in its centre (`children`, `showValue={false}`): the
292
295
  * ring is the indicator and the icon says what it indicates. `xs` (14px)
293
- * is a hair short of a 16px line and leaves the ring floating in it.
296
+ * is a hair short of a 16px line and leaves the ring floating in it. Its
297
+ * track is thinner than every other size's (`RING_GEOMETRY`), so the icon
298
+ * fits inside it. Like `xs`, always pair with `showValue={false}`: two
299
+ * digits do not fit a 16px circle, and nothing clips or shrinks them.
294
300
  */
295
301
  row: "size-4";
296
302
  sm: "size-10";
@@ -321,7 +327,10 @@ declare const ring: import("tailwind-variants").TVReturnType<{
321
327
  * unit of a card face row, `leading-4`), with nothing around it. Built to
322
328
  * carry an `xs` icon in its centre (`children`, `showValue={false}`): the
323
329
  * ring is the indicator and the icon says what it indicates. `xs` (14px)
324
- * is a hair short of a 16px line and leaves the ring floating in it.
330
+ * is a hair short of a 16px line and leaves the ring floating in it. Its
331
+ * track is thinner than every other size's (`RING_GEOMETRY`), so the icon
332
+ * fits inside it. Like `xs`, always pair with `showValue={false}`: two
333
+ * digits do not fit a 16px circle, and nothing clips or shrinks them.
325
334
  */
326
335
  row: "size-4";
327
336
  sm: "size-10";
@@ -2,5 +2,5 @@ export { OpenApiViewer, type OpenApiViewerProps } from "./OpenApiViewer";
2
2
  export { OperationCard, type OperationCardProps } from "./OperationCard";
3
3
  export { OperationHeader, type OperationHeaderProps, OperationDetail, type OperationDetailProps } from "./OperationCard";
4
4
  export { SchemaView, type SchemaViewProps } from "./SchemaView";
5
- export { groupOperations, isHttpMethod, mergedParameters, operationAnchorId, resolveSchema, schemaToExample, type SchemaResolution, } from "./resolve";
5
+ export { groupOperations, isHttpMethod, mergedParameters, operationAnchorId, resolveSchema, resolveWebhooks, schemaToExample, type SchemaResolution, } from "./resolve";
6
6
  export { HTTP_METHODS, type HttpMethod, type OpenApiDocument, type OpenApiMediaType, type OpenApiOperation, type OpenApiParameter, type OpenApiParameterLocation, type OpenApiPathItem, type OpenApiRequestBody, type OpenApiResponse, type OpenApiSchema, type OpenApiSecurityRequirement, type OpenApiSecurityScheme, type OpenApiTag, type OperationGroup, type ResolvedOperation, } from "./types";
@@ -1,4 +1,4 @@
1
- import type { HttpMethod, OpenApiDocument, OpenApiParameter, OpenApiSchema, OperationGroup } from "./types";
1
+ import type { HttpMethod, OpenApiDocument, OpenApiParameter, OpenApiSchema, OperationGroup, ResolvedOperation } from "./types";
2
2
  export declare function isHttpMethod(key: string): key is HttpMethod;
3
3
  /**
4
4
  * Resolves a single `{ $ref: "#/components/schemas/Foo" }` against the
@@ -42,10 +42,20 @@ export declare function mergedParameters(pathParameters: readonly OpenApiParamet
42
42
  * group by tag".
43
43
  */
44
44
  export declare function groupOperations(doc: OpenApiDocument): OperationGroup[];
45
+ /**
46
+ * Every operation of the document's top-level `webhooks` (DX-4178), in
47
+ * document order, each carrying its webhook NAME as `path` and `webhook:
48
+ * true`. Webhooks are not grouped by tag: they are a short, named list of the
49
+ * calls a consumer must receive, shown as their own section.
50
+ */
51
+ export declare function resolveWebhooks(doc: OpenApiDocument): ResolvedOperation[];
45
52
  /** A stable per-operation id for a deep link / anchor — same input, same id,
46
53
  * across renders and across documents (used as both the section `id` and the
47
54
  * `#fragment` a "copy link" control writes). */
48
- export declare function operationAnchorId(method: HttpMethod, path: string): string;
55
+ export declare function operationAnchorId(method: HttpMethod, path: string, webhook?: boolean): string;
56
+ /** `operationAnchorId` for a resolved operation — the one place a caller
57
+ * cannot forget the webhook namespace. */
58
+ export declare function resolvedAnchorId(resolved: ResolvedOperation): string;
49
59
  /**
50
60
  * Synthesises a representative JSON value from a schema when the document
51
61
  * supplies no explicit `example`/`examples` — the same fallback every
@@ -85,6 +85,10 @@ export interface OpenApiDocument {
85
85
  }[];
86
86
  readonly tags?: readonly OpenApiTag[];
87
87
  readonly paths: Record<string, OpenApiPathItem>;
88
+ /** OpenAPI 3.1 top-level `webhooks` (DX-4178): calls the API's server
89
+ * MAKES to a consumer, keyed by a name rather than a path. Each value is a
90
+ * Path Item whose operations are the requests the consumer must receive. */
91
+ readonly webhooks?: Record<string, OpenApiPathItem>;
88
92
  readonly components?: {
89
93
  readonly schemas?: Record<string, OpenApiSchema>;
90
94
  readonly securitySchemes?: Record<string, OpenApiSecurityScheme>;
@@ -104,6 +108,12 @@ export interface ResolvedOperation {
104
108
  * merges these with the operation's own, operation-level winning on a
105
109
  * `name`+`in` collision — see `resolve.ts#mergedParameters`). */
106
110
  readonly pathParameters: readonly OpenApiParameter[];
111
+ /** DX-4178: true when this is an OpenAPI `webhooks` entry — `path` then
112
+ * holds the webhook's NAME, not a URL path the API serves. A webhook has no
113
+ * document-level default security (the document's `security` governs the
114
+ * calls INTO the API, not the one a consumer's receiver is sent) and its
115
+ * anchor id is namespaced apart from every path's. */
116
+ readonly webhook?: true;
107
117
  }
108
118
  /** One tag/path group of operations, in document order. */
109
119
  export interface OperationGroup {
@@ -156,7 +156,7 @@ export { NodeCanvas, LAYOUT_DEFAULTS, edgePath, layoutGraph, neighbourhood, type
156
156
  export { GraphExplorer, frameBoxFor, layoutExplorerTree, neighbourhoodTree, CAMERA_DEFAULTS, centerOn, clampScale, fitBox, fitBoxWithFloor, toContentPoint, toScreenPoint, unionBox, zoomAtPoint, type GraphExplorerProps, type Box, type CameraState, type FitOptions, type FitWithFloorOptions, type FitWithFloorResult, type FrameOverflow, type Point, type ScaleBounds, type Size, type CrossLink, type ExplorerLayout, type ExplorerNodeRenderContext, type ExplorerNodeRenderer, type ExplorerTree, type GraphExplorerVariant, type TreeNode as ExplorerTreeNode, } from "./components/graph-explorer";
157
157
  export { FocusWeb, CENTER_POSITION, PARENT_POSITION, WIDE_RING_THRESHOLD, layoutRing, type FocusNodeRenderContext, type FocusNodeRenderer, type FocusNodeRole, type FocusWebNode, type FocusWebNodeLook, type FocusWebProps, type PlacedRingNode, } from "./components/focus-web";
158
158
  export { SequenceDiagram, type SequenceDiagramProps, type SequenceStep, } from "./components/SequenceDiagram";
159
- export { OpenApiViewer, type OpenApiViewerProps, OperationCard, type OperationCardProps, OperationHeader, type OperationHeaderProps, OperationDetail, type OperationDetailProps, SchemaView, type SchemaViewProps, groupOperations, isHttpMethod, mergedParameters, operationAnchorId, resolveSchema, schemaToExample, type SchemaResolution, HTTP_METHODS, type HttpMethod, type OpenApiDocument, type OpenApiMediaType, type OpenApiOperation, type OpenApiParameter, type OpenApiParameterLocation, type OpenApiPathItem, type OpenApiRequestBody, type OpenApiResponse, type OpenApiSchema, type OpenApiSecurityRequirement, type OpenApiSecurityScheme, type OpenApiTag, type OperationGroup, type ResolvedOperation, } from "./components/openapi";
159
+ export { OpenApiViewer, type OpenApiViewerProps, OperationCard, type OperationCardProps, OperationHeader, type OperationHeaderProps, OperationDetail, type OperationDetailProps, SchemaView, type SchemaViewProps, groupOperations, isHttpMethod, mergedParameters, operationAnchorId, resolveSchema, resolveWebhooks, schemaToExample, type SchemaResolution, HTTP_METHODS, type HttpMethod, type OpenApiDocument, type OpenApiMediaType, type OpenApiOperation, type OpenApiParameter, type OpenApiParameterLocation, type OpenApiPathItem, type OpenApiRequestBody, type OpenApiResponse, type OpenApiSchema, type OpenApiSecurityRequirement, type OpenApiSecurityScheme, type OpenApiTag, type OperationGroup, type ResolvedOperation, } from "./components/openapi";
160
160
  export { defineRecordType, resetRecordTypes, useRecord, useRecords, useStaleness, write, writeAll, peekRecord, readState, readStaleness, subscribeToKey, subscribeToStaleness, retainKeys, sweepRecords, setRecordStoreTenant, getRecordStoreTenant, flushRecordNotifications, resetRecordStore, recordStoreStats, UNKNOWN_STATE, normalizeTypeName, normalizeTimestamp, recordKey, isRecordRef, type RecordRef, type ReadOptions, type RecordPayload, type RecordState, type RecordTypeOptions, type RecordTypeToken, type StalenessEntry, type WriteAllResult, type WriteOptions, type WriteResult, type WriteSource, type WriteVerdict, } from "./lib/records";
161
161
  export { RealtimeProvider, useRealtime, useRealtimeEpoch, useRealtimeHealth, useRealtimeRegistry, SubscriptionRegistry, normalizeScope, scopeKey, subscriptionKey, readRealtimeEpoch, subscribeToRealtimeEpoch, subscribeToRealtimeEvents, resetRealtimeSignals, type RealtimeChannel, type RealtimeConnectionState, type RealtimeDiagnostic, type RealtimeEvent, type RealtimeHealth, type RealtimeProviderProps, type RealtimeScope, type RealtimeScopeInput, type RealtimeStatus, type RealtimeTransport, type RegistryOptions, type SubscriptionHealth, type SubscriptionLease, type SubscriptionRequest, } from "./lib/realtime";
162
162
  export { useRecordRead, useRecordListRead, useRecordStoreSweep, applyMutationResult, optimisticWrite, beginOptimisticWrite, resetOptimisticWrites, type OptimisticHandle, type OptimisticWriteOptions, type OptimisticWriteSpec, type SlotDescriptor, acquireSlot, appendCreated, emptySlotSnapshot, readSlot, resetSlots, slotKeys, subscribeToSlot, writeSlot, RefetchRunner, registerActiveRead, resetActiveReads, type ActiveRead, type ListFetch, type ListFetchResult, type ListReadOptions, type ListReadResult, type ReadError, type RecordFetch, type RecordReadOptions, type RecordReadResult, type RunnerOptions, type SlotSnapshot, } from "./lib/reads";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "16.0.0",
3
+ "version": "16.2.0",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",