@asymmetric-effort/specifyjs 0.2.109 → 0.2.113

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 (161) hide show
  1. package/dist/esm/chunks/chunk-2Y3QZBBL.js +221 -0
  2. package/dist/esm/chunks/{chunk-3SXNLMCH.js.map → chunk-2Y3QZBBL.js.map} +2 -2
  3. package/dist/esm/chunks/chunk-5OX5JKEY.js +174 -0
  4. package/dist/esm/chunks/{chunk-VAF4KNDP.js.map → chunk-5OX5JKEY.js.map} +2 -2
  5. package/dist/esm/chunks/chunk-AVA7QEGU.js +625 -0
  6. package/dist/esm/chunks/{chunk-A7AAS5ZR.js.map → chunk-AVA7QEGU.js.map} +2 -2
  7. package/dist/esm/chunks/chunk-BLIAKWAU.js +42 -0
  8. package/dist/esm/chunks/{chunk-TVDAY42P.js.map → chunk-BLIAKWAU.js.map} +2 -2
  9. package/dist/esm/chunks/chunk-CWCWXKVV.js +202 -0
  10. package/dist/esm/chunks/{chunk-MCXU6QF3.js.map → chunk-CWCWXKVV.js.map} +2 -2
  11. package/dist/esm/chunks/chunk-HINJXYXY.js +29 -0
  12. package/dist/esm/chunks/{chunk-3J4RXW7E.js.map → chunk-HINJXYXY.js.map} +2 -2
  13. package/dist/esm/chunks/chunk-MKUA6QTB.js +9 -0
  14. package/dist/esm/chunks/chunk-NF4555DU.js +58 -0
  15. package/dist/esm/chunks/{chunk-ODCBJ22O.js.map → chunk-NF4555DU.js.map} +2 -2
  16. package/dist/esm/chunks/chunk-RSL3RU56.js +14 -0
  17. package/dist/esm/chunks/{chunk-E43OK6IZ.js.map → chunk-RSL3RU56.js.map} +2 -2
  18. package/dist/esm/chunks/chunk-T7EHIXSF.js +17 -0
  19. package/dist/esm/chunks/{chunk-LWOMFZ4C.js.map → chunk-T7EHIXSF.js.map} +2 -2
  20. package/dist/esm/chunks/metrics-6LW2N3GU.js +16 -0
  21. package/dist/esm/client/index.js +670 -1
  22. package/dist/esm/components-barrel.js +25688 -3
  23. package/dist/esm/dom/index.js +1902 -1
  24. package/dist/esm/index.js +117 -1
  25. package/dist/esm/jsx-dev-runtime.js +12 -1
  26. package/dist/esm/jsx-runtime.js +13 -1
  27. package/dist/esm/server/index.js +381 -1
  28. package/dist/esm/telemetry/index.js +188 -1
  29. package/dist/specifyjs-client.esm.js +670 -1
  30. package/dist/specifyjs-client.esm.js.map +2 -2
  31. package/dist/specifyjs-components.cjs.js.map +1 -1
  32. package/dist/specifyjs-components.esm.js +25688 -3
  33. package/dist/specifyjs-components.esm.js.map +3 -3
  34. package/dist/specifyjs-dom.esm.js +1902 -1
  35. package/dist/specifyjs-dom.esm.js.map +2 -2
  36. package/dist/specifyjs-jsx-dev-runtime.esm.js +12 -1
  37. package/dist/specifyjs-jsx-runtime.esm.js +13 -1
  38. package/dist/specifyjs-server.esm.js +381 -1
  39. package/dist/specifyjs-server.esm.js.map +2 -2
  40. package/dist/specifyjs-telemetry.esm.js +188 -1
  41. package/dist/specifyjs-telemetry.esm.js.map +2 -2
  42. package/dist/specifyjs.esm.js +117 -1
  43. package/dist/types/components/ad/adsense/src/AdSense.d.ts +1 -1
  44. package/dist/types/components/data/analog-clock/src/AnalogClock.d.ts +1 -1
  45. package/dist/types/components/data/avatar/src/Avatar.d.ts +1 -1
  46. package/dist/types/components/data/badge/src/Badge.d.ts +1 -1
  47. package/dist/types/components/data/data-grid/src/DataGrid.d.ts +1 -1
  48. package/dist/types/components/data/digital-clock/src/DigitalClock.d.ts +1 -1
  49. package/dist/types/components/data/list-view/src/ListView.d.ts +1 -1
  50. package/dist/types/components/data/tag/src/Tag.d.ts +1 -1
  51. package/dist/types/components/data/virtual-scroll/src/VirtualScroll.d.ts +1 -1
  52. package/dist/types/components/feedback/alert/src/Alert.d.ts +1 -1
  53. package/dist/types/components/feedback/empty-state/src/EmptyState.d.ts +1 -1
  54. package/dist/types/components/feedback/progress-bar/src/ProgressBar.d.ts +1 -1
  55. package/dist/types/components/feedback/skeleton/src/Skeleton.d.ts +1 -1
  56. package/dist/types/components/feedback/spinner/src/Spinner.d.ts +1 -1
  57. package/dist/types/components/form/button/src/Button.d.ts +1 -1
  58. package/dist/types/components/form/checkbox/src/Checkbox.d.ts +1 -1
  59. package/dist/types/components/form/color-picker/src/ColorPicker.d.ts +1 -1
  60. package/dist/types/components/form/color-wheel/src/ColorWheel.d.ts +1 -1
  61. package/dist/types/components/form/datepicker/src/DatePicker.d.ts +1 -1
  62. package/dist/types/components/form/file-upload/src/FileUpload.d.ts +1 -1
  63. package/dist/types/components/form/multiline/src/MultilineField.d.ts +1 -1
  64. package/dist/types/components/form/number-spinner/src/NumberSpinner.d.ts +1 -1
  65. package/dist/types/components/form/radio/src/RadioGroup.d.ts +1 -1
  66. package/dist/types/components/form/select/src/Select.d.ts +1 -1
  67. package/dist/types/components/form/slider/src/Slider.d.ts +1 -1
  68. package/dist/types/components/form/texteditor/src/TextEditor.d.ts +1 -1
  69. package/dist/types/components/form/textfield/src/TextField.d.ts +1 -1
  70. package/dist/types/components/form/timepicker/src/TimePicker.d.ts +1 -1
  71. package/dist/types/components/form/toggle/src/Toggle.d.ts +1 -1
  72. package/dist/types/components/form/wrapper/src/FormFieldWrapper.d.ts +1 -1
  73. package/dist/types/components/layout/card/src/Card.d.ts +1 -1
  74. package/dist/types/components/layout/desktop-background/src/DesktopBackground.d.ts +1 -1
  75. package/dist/types/components/layout/flex-container/src/FlexContainer.d.ts +2 -2
  76. package/dist/types/components/layout/footer/src/Footer.d.ts +1 -1
  77. package/dist/types/components/layout/grid/src/Grid.d.ts +2 -2
  78. package/dist/types/components/layout/panel/src/Panel.d.ts +1 -1
  79. package/dist/types/components/layout/scroll-container/src/ScrollContainer.d.ts +1 -1
  80. package/dist/types/components/layout/splitter/src/Splitter.d.ts +1 -1
  81. package/dist/types/components/layout/tabs/src/Tabs.d.ts +1 -1
  82. package/dist/types/components/layout/window-manager/src/WindowManager.d.ts +1 -1
  83. package/dist/types/components/media/carousel/src/Carousel.d.ts +1 -1
  84. package/dist/types/components/media/image/src/Image.d.ts +1 -1
  85. package/dist/types/components/media/video-player/src/VideoPlayer.d.ts +1 -1
  86. package/dist/types/components/nav/accordion/src/Accordion.d.ts +1 -1
  87. package/dist/types/components/nav/breadcrumb/src/Breadcrumb.d.ts +1 -1
  88. package/dist/types/components/nav/dock/src/Dock.d.ts +1 -1
  89. package/dist/types/components/nav/dropdown/src/Dropdown.d.ts +1 -1
  90. package/dist/types/components/nav/menubar/src/Menubar.d.ts +1 -1
  91. package/dist/types/components/nav/pagination/src/Pagination.d.ts +1 -1
  92. package/dist/types/components/nav/sidebar/src/Sidebar.d.ts +1 -1
  93. package/dist/types/components/nav/stepper/src/Stepper.d.ts +1 -1
  94. package/dist/types/components/nav/system-tray/src/SystemTray.d.ts +1 -1
  95. package/dist/types/components/nav/toolbar/src/Toolbar.d.ts +1 -1
  96. package/dist/types/components/nav/treenav/src/TreeNav.d.ts +1 -1
  97. package/dist/types/components/nav/wrapper/src/NavWrapper.d.ts +1 -1
  98. package/dist/types/components/overlay/context-menu/src/ContextMenu.d.ts +1 -1
  99. package/dist/types/components/overlay/drawer/src/Drawer.d.ts +1 -1
  100. package/dist/types/components/overlay/modal/src/Modal.d.ts +1 -1
  101. package/dist/types/components/overlay/popover/src/Popover.d.ts +1 -1
  102. package/dist/types/components/overlay/toast/src/Toast.d.ts +2 -2
  103. package/dist/types/components/overlay/tooltip/src/Tooltip.d.ts +1 -1
  104. package/dist/types/components/page/ide/src/IDE.d.ts +1 -1
  105. package/dist/types/components/page/trading-dashboard/src/TradingDashboard.d.ts +1 -1
  106. package/dist/types/components/page/unity-desktop/src/UnityApp.d.ts +1 -1
  107. package/dist/types/components/page/unity-desktop/src/UnityDesktop.d.ts +1 -1
  108. package/dist/types/components/page/word-processor/src/WordProcessor.d.ts +1 -1
  109. package/dist/types/components/viz/2D-bar-graph/src/BarGraph.d.ts +1 -1
  110. package/dist/types/components/viz/2D-discrete-cartesian/src/DiscreteCartesian2D.d.ts +1 -1
  111. package/dist/types/components/viz/2D-line-graph/src/LineGraph.d.ts +1 -1
  112. package/dist/types/components/viz/2D-pie-graph/src/PieGraph.d.ts +1 -1
  113. package/dist/types/components/viz/3d-force-graph/src/ForceGraph3D.d.ts +27 -119
  114. package/dist/types/components/viz/3d-force-graph/src/force-sim.d.ts +49 -0
  115. package/dist/types/components/viz/3d-force-graph/src/index.d.ts +5 -1
  116. package/dist/types/components/viz/3d-force-graph/src/types.d.ts +88 -0
  117. package/dist/types/components/viz/3d-layers/src/ThreeDLayers.d.ts +1 -1
  118. package/dist/types/components/viz/3dSpace/src/Space3D.d.ts +1 -1
  119. package/dist/types/components/viz/3dSpace/src/geom-polyhedron.d.ts +49 -0
  120. package/dist/types/components/viz/3dSpace/src/geom-sphere.d.ts +27 -0
  121. package/dist/types/components/viz/3dSpace/src/index.d.ts +5 -0
  122. package/dist/types/components/viz/3dSpace/src/mesh.d.ts +22 -0
  123. package/dist/types/components/viz/3dSpace/src/scene-object.d.ts +4 -0
  124. package/dist/types/components/viz/big-number/src/BigNumber.d.ts +1 -1
  125. package/dist/types/components/viz/bloch-sphere/src/BlochSphere.d.ts +1 -1
  126. package/dist/types/components/viz/box-plot/src/BoxPlot.d.ts +1 -1
  127. package/dist/types/components/viz/bubble-chart/src/BubbleChart.d.ts +1 -1
  128. package/dist/types/components/viz/calendar-heat-map/src/CalendarHeatMap.d.ts +1 -1
  129. package/dist/types/components/viz/chord/src/ChordDiagram.d.ts +1 -1
  130. package/dist/types/components/viz/decomposition-tree/src/DecompositionTree.d.ts +1 -1
  131. package/dist/types/components/viz/funnel/src/FunnelChart.d.ts +1 -1
  132. package/dist/types/components/viz/gantt-chart/src/GanttChart.d.ts +1 -1
  133. package/dist/types/components/viz/gauge/src/Gauge.d.ts +1 -1
  134. package/dist/types/components/viz/graph/src/HypercubeGraph.d.ts +1 -1
  135. package/dist/types/components/viz/heat-map/src/HeatMap.d.ts +1 -1
  136. package/dist/types/components/viz/histogram/src/Histogram.d.ts +1 -1
  137. package/dist/types/components/viz/matrix/src/Matrix.d.ts +1 -1
  138. package/dist/types/components/viz/partition/src/Partition.d.ts +1 -1
  139. package/dist/types/components/viz/pivot-table/src/PivotTable.d.ts +1 -1
  140. package/dist/types/components/viz/radar-chart/src/RadarChart.d.ts +1 -1
  141. package/dist/types/components/viz/sankey/src/SankeyDiagram.d.ts +1 -1
  142. package/dist/types/components/viz/sunburst/src/Sunburst.d.ts +1 -1
  143. package/dist/types/components/viz/tree-map/src/TreeMap.d.ts +1 -1
  144. package/dist/types/components/viz/vector-field/src/VectorField.d.ts +1 -1
  145. package/dist/types/components/viz/waterfall/src/WaterfallChart.d.ts +1 -1
  146. package/dist/types/components/viz/word-cloud/src/WordCloud.d.ts +1 -1
  147. package/dist/types/components/viz/wrapper/src/VizWrapper.d.ts +1 -1
  148. package/package.json +1 -1
  149. package/dist/esm/chunks/chunk-3J4RXW7E.js +0 -3
  150. package/dist/esm/chunks/chunk-3SXNLMCH.js +0 -3
  151. package/dist/esm/chunks/chunk-A7AAS5ZR.js +0 -3
  152. package/dist/esm/chunks/chunk-E43OK6IZ.js +0 -3
  153. package/dist/esm/chunks/chunk-LWOMFZ4C.js +0 -3
  154. package/dist/esm/chunks/chunk-MCXU6QF3.js +0 -3
  155. package/dist/esm/chunks/chunk-ODCBJ22O.js +0 -3
  156. package/dist/esm/chunks/chunk-TVDAY42P.js +0 -3
  157. package/dist/esm/chunks/chunk-VAF4KNDP.js +0 -3
  158. package/dist/esm/chunks/chunk-ZDPD2MPQ.js +0 -3
  159. package/dist/esm/chunks/metrics-56RIK7JQ.js +0 -3
  160. /package/dist/esm/chunks/{chunk-ZDPD2MPQ.js.map → chunk-MKUA6QTB.js.map} +0 -0
  161. /package/dist/esm/chunks/{metrics-56RIK7JQ.js.map → metrics-6LW2N3GU.js.map} +0 -0
@@ -1,3 +1,190 @@
1
1
  /* (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE */
2
- import{a as v,b as x,c as b,d as k}from"./esm/chunks/chunk-3SXNLMCH.js";import"./esm/chunks/chunk-TVDAY42P.js";import{d as l,i as m}from"./esm/chunks/chunk-MCXU6QF3.js";import"./esm/chunks/chunk-ZDPD2MPQ.js";function I(e){let n=new Uint8Array(e);try{crypto.getRandomValues(n)}catch{for(let t=0;t<e;t++)n[t]=Math.floor(Math.random()*256)}return n}function T(e){let n="";for(let t=0;t<e.length;t++)n+=(e[t]??0).toString(16).padStart(2,"0");return n}function g(){return T(I(16))}function y(){return T(I(8))}var w=/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/;function R(e){let n=w.exec(e.trim());if(!n)return null;let t=n[2],a=n[3],s=n[4];return/^0+$/.test(t)||/^0+$/.test(a)?null:{traceId:t,spanId:a,traceFlags:s}}function E(e){return`00-${e.traceId}-${e.spanId}-${e.traceFlags}`}function h(e,n){return{traceId:n?.traceId??g(),spanId:y(),parentSpanId:n?.parentSpanId,name:e,kind:n?.kind??"internal",startTime:performance.now(),status:{code:"unset"},attributes:n?.attributes?{...n.attributes}:{},events:[]}}function c(e){e.endTime=performance.now()}function C(e){let n=e.batchSize??1e3,t=[],a=[];function s(r){a.length>=n&&a.splice(0,Math.floor(n/2)),a.push(r)}let d;e.flushInterval&&e.flushInterval>0&&(d=setInterval(()=>{f.flush()},e.flushInterval),typeof d=="object"&&"unref"in d&&d.unref());let f={config:e,get pendingSpans(){return a},activeSpan(){return t.length>0?t[t.length-1]:void 0},startSpan(r,i){let u=f.activeSpan(),p=h(r,{kind:i?.kind,attributes:i?.attributes,traceId:i?.traceId??u?.traceId,parentSpanId:i?.parentSpanId??u?.spanId});return t.push(p),p},withSpan(r,i){t.includes(r)||t.push(r);let p=()=>{for(let o=t.length-1;o>=0;o--)t[o]===r&&t.splice(o,1)};try{let o=i();return o&&typeof o.then=="function"?o.then(S=>(c(r),s(r),p(),S),S=>{throw r.status={code:"error",message:String(S)},c(r),s(r),p(),S}):(c(r),s(r),p(),o)}catch(o){throw r.status={code:"error",message:String(o)},c(r),s(r),p(),o}},async flush(){if(a.length===0)return;let r=a.splice(0,a.length);if(e.endpoint){let{formatOtlpTraces:i,exportToEndpoint:u}=await import("../chunks/metrics-56RIK7JQ.js"),p=i(r,e.serviceName,e.serviceVersion);await u(e.endpoint,e.headers??{},p)}}};return f}function O(e,n){let t=m(null);l(()=>{let a=e.startSpan(n,{kind:"internal"});return a.events.push({name:"mount",timestamp:performance.now()}),t.current=a,()=>{t.current&&(t.current.events.push({name:"unmount",timestamp:performance.now()}),c(t.current))}},[])}export{v as createMeterProvider,C as createTracer,c as endSpan,k as exportToEndpoint,x as formatOtlpMetrics,b as formatOtlpTraces,E as formatTraceparent,y as generateSpanId,g as generateTraceId,R as parseTraceparent,h as startSpan,O as useTracing};
2
+ import {
3
+ createMeterProvider,
4
+ exportToEndpoint,
5
+ formatOtlpMetrics,
6
+ formatOtlpTraces
7
+ } from "./esm/chunks/chunk-2Y3QZBBL.js";
8
+ import "./esm/chunks/chunk-BLIAKWAU.js";
9
+ import {
10
+ useEffect,
11
+ useRef
12
+ } from "./esm/chunks/chunk-CWCWXKVV.js";
13
+ import "./esm/chunks/chunk-MKUA6QTB.js";
14
+
15
+ // src/telemetry/tracing.ts
16
+ function randomBytes(length) {
17
+ const buf = new Uint8Array(length);
18
+ try {
19
+ crypto.getRandomValues(buf);
20
+ } catch {
21
+ for (let i = 0; i < length; i++) {
22
+ buf[i] = Math.floor(Math.random() * 256);
23
+ }
24
+ }
25
+ return buf;
26
+ }
27
+ function bytesToHex(bytes) {
28
+ let hex = "";
29
+ for (let i = 0; i < bytes.length; i++) {
30
+ hex += (bytes[i] ?? 0).toString(16).padStart(2, "0");
31
+ }
32
+ return hex;
33
+ }
34
+ function generateTraceId() {
35
+ return bytesToHex(randomBytes(16));
36
+ }
37
+ function generateSpanId() {
38
+ return bytesToHex(randomBytes(8));
39
+ }
40
+ var TRACEPARENT_RE = /^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/;
41
+ function parseTraceparent(header) {
42
+ const match = TRACEPARENT_RE.exec(header.trim());
43
+ if (!match) return null;
44
+ const traceId = match[2];
45
+ const spanId = match[3];
46
+ const traceFlags = match[4];
47
+ if (/^0+$/.test(traceId) || /^0+$/.test(spanId)) return null;
48
+ return { traceId, spanId, traceFlags };
49
+ }
50
+ function formatTraceparent(ctx) {
51
+ return `00-${ctx.traceId}-${ctx.spanId}-${ctx.traceFlags}`;
52
+ }
53
+ function startSpan(name, opts) {
54
+ return {
55
+ traceId: opts?.traceId ?? generateTraceId(),
56
+ spanId: generateSpanId(),
57
+ parentSpanId: opts?.parentSpanId,
58
+ name,
59
+ kind: opts?.kind ?? "internal",
60
+ startTime: performance.now(),
61
+ status: { code: "unset" },
62
+ attributes: opts?.attributes ? { ...opts.attributes } : {},
63
+ events: []
64
+ };
65
+ }
66
+ function endSpan(span) {
67
+ span.endTime = performance.now();
68
+ }
69
+ function createTracer(config) {
70
+ const MAX_BUFFER_SIZE = config.batchSize ?? 1e3;
71
+ const spanStack = [];
72
+ const buffer = [];
73
+ function bufferSpan(span) {
74
+ if (buffer.length >= MAX_BUFFER_SIZE) {
75
+ buffer.splice(0, Math.floor(MAX_BUFFER_SIZE / 2));
76
+ }
77
+ buffer.push(span);
78
+ }
79
+ let flushTimer;
80
+ if (config.flushInterval && config.flushInterval > 0) {
81
+ flushTimer = setInterval(() => {
82
+ void tracer.flush();
83
+ }, config.flushInterval);
84
+ if (typeof flushTimer === "object" && "unref" in flushTimer) {
85
+ flushTimer.unref();
86
+ }
87
+ }
88
+ const tracer = {
89
+ config,
90
+ get pendingSpans() {
91
+ return buffer;
92
+ },
93
+ activeSpan() {
94
+ return spanStack.length > 0 ? spanStack[spanStack.length - 1] : void 0;
95
+ },
96
+ startSpan(name, opts) {
97
+ const active = tracer.activeSpan();
98
+ const span = startSpan(name, {
99
+ kind: opts?.kind,
100
+ attributes: opts?.attributes,
101
+ traceId: opts?.traceId ?? active?.traceId,
102
+ parentSpanId: opts?.parentSpanId ?? active?.spanId
103
+ });
104
+ spanStack.push(span);
105
+ return span;
106
+ },
107
+ withSpan(span, fn) {
108
+ const alreadyOnStack = spanStack.includes(span);
109
+ if (!alreadyOnStack) {
110
+ spanStack.push(span);
111
+ }
112
+ const removeFromStack = () => {
113
+ for (let i = spanStack.length - 1; i >= 0; i--) {
114
+ if (spanStack[i] === span) {
115
+ spanStack.splice(i, 1);
116
+ }
117
+ }
118
+ };
119
+ try {
120
+ const result = fn();
121
+ if (result && typeof result.then === "function") {
122
+ return result.then(
123
+ (value) => {
124
+ endSpan(span);
125
+ bufferSpan(span);
126
+ removeFromStack();
127
+ return value;
128
+ },
129
+ (err) => {
130
+ span.status = { code: "error", message: String(err) };
131
+ endSpan(span);
132
+ bufferSpan(span);
133
+ removeFromStack();
134
+ throw err;
135
+ }
136
+ );
137
+ }
138
+ endSpan(span);
139
+ bufferSpan(span);
140
+ removeFromStack();
141
+ return result;
142
+ } catch (err) {
143
+ span.status = { code: "error", message: String(err) };
144
+ endSpan(span);
145
+ bufferSpan(span);
146
+ removeFromStack();
147
+ throw err;
148
+ }
149
+ },
150
+ async flush() {
151
+ if (buffer.length === 0) return;
152
+ const toExport = buffer.splice(0, buffer.length);
153
+ if (config.endpoint) {
154
+ const { formatOtlpTraces: formatOtlpTraces2, exportToEndpoint: exportToEndpoint2 } = await import("../chunks/metrics-6LW2N3GU.js");
155
+ const body = formatOtlpTraces2(toExport, config.serviceName, config.serviceVersion);
156
+ await exportToEndpoint2(config.endpoint, config.headers ?? {}, body);
157
+ }
158
+ }
159
+ };
160
+ return tracer;
161
+ }
162
+ function useTracing(tracer, name) {
163
+ const spanRef = useRef(null);
164
+ useEffect(() => {
165
+ const span = tracer.startSpan(name, { kind: "internal" });
166
+ span.events.push({ name: "mount", timestamp: performance.now() });
167
+ spanRef.current = span;
168
+ return () => {
169
+ if (spanRef.current) {
170
+ spanRef.current.events.push({ name: "unmount", timestamp: performance.now() });
171
+ endSpan(spanRef.current);
172
+ }
173
+ };
174
+ }, []);
175
+ }
176
+ export {
177
+ createMeterProvider,
178
+ createTracer,
179
+ endSpan,
180
+ exportToEndpoint,
181
+ formatOtlpMetrics,
182
+ formatOtlpTraces,
183
+ formatTraceparent,
184
+ generateSpanId,
185
+ generateTraceId,
186
+ parseTraceparent,
187
+ startSpan,
188
+ useTracing
189
+ };
3
190
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/telemetry/tracing.ts"],
4
4
  "sourcesContent": ["// ============================================================================\n// SpecifyJS Telemetry \u2014 Distributed Tracing (OpenTelemetry-compatible)\n// Zero third-party dependencies \u2014 OTEL protocols implemented from scratch.\n// ============================================================================\n// (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE\n// SPDX-License-Identifier: MIT\n\nimport { useEffect, useRef } from '../hooks/index';\n\n// ---------------------------------------------------------------------------\n// Trace Context \u2014 W3C Trace Context propagation\n// ---------------------------------------------------------------------------\n\n/** 16-byte (32 hex char) trace identifier. */\nexport type TraceId = string;\n\n/** 8-byte (16 hex char) span identifier. */\nexport type SpanId = string;\n\n/** W3C Trace Context carrier. */\nexport interface TraceContext {\n traceId: TraceId;\n spanId: SpanId;\n traceFlags: string;\n parentSpanId?: SpanId;\n}\n\n// -- ID generation ----------------------------------------------------------\n\nfunction randomBytes(length: number): Uint8Array {\n const buf = new Uint8Array(length);\n try {\n // Works in browsers and Node >=15 (globalThis.crypto)\n crypto.getRandomValues(buf);\n } catch {\n /* v8 ignore next 3 -- fallback for environments without Web Crypto */\n for (let i = 0; i < length; i++) {\n buf[i] = Math.floor(Math.random() * 256);\n }\n }\n return buf;\n}\n\nfunction bytesToHex(bytes: Uint8Array): string {\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += (bytes[i] ?? 0).toString(16).padStart(2, '0');\n }\n return hex;\n}\n\n/** Generate a 32-hex-char trace ID (16 random bytes). */\nexport function generateTraceId(): TraceId {\n return bytesToHex(randomBytes(16));\n}\n\n/** Generate a 16-hex-char span ID (8 random bytes). */\nexport function generateSpanId(): SpanId {\n return bytesToHex(randomBytes(8));\n}\n\n// -- W3C traceparent parsing / formatting -----------------------------------\n\nconst TRACEPARENT_RE = /^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/;\n\n/**\n * Parse a W3C `traceparent` header.\n *\n * Format: `{version}-{traceId}-{spanId}-{traceFlags}`\n * Returns `null` when the header is invalid.\n */\nexport function parseTraceparent(header: string): TraceContext | null {\n const match = TRACEPARENT_RE.exec(header.trim());\n if (!match) return null;\n\n const traceId = match[2]!;\n const spanId = match[3]!;\n const traceFlags = match[4]!;\n\n // All-zero trace/span IDs are invalid per the spec.\n if (/^0+$/.test(traceId) || /^0+$/.test(spanId)) return null;\n\n return { traceId, spanId, traceFlags };\n}\n\n/**\n * Format a {@link TraceContext} as a W3C `traceparent` header string.\n *\n * Output: `00-{traceId}-{spanId}-{traceFlags}`\n */\nexport function formatTraceparent(ctx: TraceContext): string {\n return `00-${ctx.traceId}-${ctx.spanId}-${ctx.traceFlags}`;\n}\n\n// ---------------------------------------------------------------------------\n// Spans\n// ---------------------------------------------------------------------------\n\nexport type SpanKind = 'internal' | 'server' | 'client' | 'producer' | 'consumer';\n\nexport interface SpanStatus {\n code: 'unset' | 'ok' | 'error';\n message?: string;\n}\n\nexport interface SpanEvent {\n name: string;\n timestamp: number;\n attributes?: Record<string, string | number | boolean>;\n}\n\nexport interface Span {\n traceId: TraceId;\n spanId: SpanId;\n parentSpanId?: SpanId;\n name: string;\n kind: SpanKind;\n startTime: number;\n endTime?: number;\n status: SpanStatus;\n attributes: Record<string, string | number | boolean>;\n events: SpanEvent[];\n}\n\nexport interface StartSpanOptions {\n kind?: SpanKind;\n parentSpanId?: SpanId;\n traceId?: TraceId;\n attributes?: Record<string, string | number | boolean>;\n}\n\n/**\n * Create and start a new span. The span is **not** automatically associated\n * with a tracer \u2014 use {@link Tracer.startSpan} for automatic parent tracking.\n */\nexport function startSpan(name: string, opts?: StartSpanOptions): Span {\n return {\n traceId: opts?.traceId ?? generateTraceId(),\n spanId: generateSpanId(),\n parentSpanId: opts?.parentSpanId,\n name,\n kind: opts?.kind ?? 'internal',\n startTime: performance.now(),\n status: { code: 'unset' },\n attributes: opts?.attributes ? { ...opts.attributes } : {},\n events: [],\n };\n}\n\n/** End a span by recording its end time. */\nexport function endSpan(span: Span): void {\n span.endTime = performance.now();\n}\n\n// ---------------------------------------------------------------------------\n// Tracer\n// ---------------------------------------------------------------------------\n\nexport interface TracerConfig {\n serviceName: string;\n serviceVersion?: string;\n endpoint?: string;\n headers?: Record<string, string>;\n batchSize?: number;\n flushInterval?: number;\n}\n\nexport interface Tracer {\n /** Create a span, automatically parented to the current active span. */\n startSpan(name: string, opts?: StartSpanOptions): Span;\n\n /**\n * Execute `fn` with `span` as the active span. The span is automatically\n * ended when `fn` completes (sync or async). The previous active span is\n * restored afterward.\n */\n withSpan<T>(span: Span, fn: () => T): T;\n\n /** Export all pending (buffered) spans to the configured endpoint. */\n flush(): Promise<void>;\n\n /** Access the currently-active span (top of the span stack), or `undefined`. */\n activeSpan(): Span | undefined;\n\n /** Read-only view of the pending span buffer. */\n readonly pendingSpans: ReadonlyArray<Span>;\n\n /** Tracer configuration. */\n readonly config: Readonly<TracerConfig>;\n}\n\nexport function createTracer(config: TracerConfig): Tracer {\n const MAX_BUFFER_SIZE = config.batchSize ?? 1000;\n const spanStack: Span[] = [];\n const buffer: Span[] = [];\n\n function bufferSpan(span: Span): void {\n if (buffer.length >= MAX_BUFFER_SIZE) {\n buffer.splice(0, Math.floor(MAX_BUFFER_SIZE / 2)); // drop oldest half\n }\n buffer.push(span);\n }\n\n // Auto-flush timer (if configured)\n let flushTimer: ReturnType<typeof setInterval> | undefined;\n if (config.flushInterval && config.flushInterval > 0) {\n flushTimer = setInterval(() => {\n void tracer.flush();\n }, config.flushInterval);\n // Allow the process to exit even if the timer is running (Node.js).\n if (typeof flushTimer === 'object' && 'unref' in flushTimer) {\n (flushTimer as { unref: () => void }).unref();\n }\n }\n\n const tracer: Tracer = {\n config,\n\n get pendingSpans(): ReadonlyArray<Span> {\n return buffer;\n },\n\n activeSpan(): Span | undefined {\n return spanStack.length > 0 ? spanStack[spanStack.length - 1] : undefined;\n },\n\n startSpan(name: string, opts?: StartSpanOptions): Span {\n const active = tracer.activeSpan();\n const span = startSpan(name, {\n kind: opts?.kind,\n attributes: opts?.attributes,\n traceId: opts?.traceId ?? active?.traceId,\n parentSpanId: opts?.parentSpanId ?? active?.spanId,\n });\n spanStack.push(span);\n return span;\n },\n\n withSpan<T>(span: Span, fn: () => T): T {\n // Only push if not already on the stack (startSpan may have pushed it).\n const alreadyOnStack = spanStack.includes(span);\n if (!alreadyOnStack) {\n spanStack.push(span);\n }\n\n const removeFromStack = (): void => {\n // Remove ALL occurrences of the span from the stack.\n for (let i = spanStack.length - 1; i >= 0; i--) {\n if (spanStack[i] === span) {\n spanStack.splice(i, 1);\n }\n }\n };\n\n try {\n const result = fn();\n // Handle thenables (Promises) without importing anything.\n if (result && typeof (result as unknown as Promise<unknown>).then === 'function') {\n return (result as unknown as Promise<unknown>).then(\n (value) => {\n endSpan(span);\n bufferSpan(span);\n removeFromStack();\n return value;\n },\n (err) => {\n span.status = { code: 'error', message: String(err) };\n endSpan(span);\n bufferSpan(span);\n removeFromStack();\n throw err;\n },\n ) as unknown as T;\n }\n endSpan(span);\n bufferSpan(span);\n removeFromStack();\n return result;\n } catch (err) {\n span.status = { code: 'error', message: String(err) };\n endSpan(span);\n bufferSpan(span);\n removeFromStack();\n throw err;\n }\n },\n\n async flush(): Promise<void> {\n if (buffer.length === 0) return;\n\n const toExport = buffer.splice(0, buffer.length);\n\n if (config.endpoint) {\n // Lazy-import format helper to avoid circular deps at module level.\n const { formatOtlpTraces, exportToEndpoint } = await import('./metrics');\n const body = formatOtlpTraces(toExport, config.serviceName, config.serviceVersion);\n await exportToEndpoint(config.endpoint, config.headers ?? {}, body);\n }\n },\n };\n\n return tracer;\n}\n\n// ---------------------------------------------------------------------------\n// useTracing hook\n// ---------------------------------------------------------------------------\n\n/**\n * Hook that creates a span for the component render lifecycle.\n * Auto-starts on mount, records render duration, ends on unmount.\n */\nexport function useTracing(tracer: Tracer, name: string): void {\n const spanRef = useRef<Span | null>(null);\n\n useEffect(() => {\n // Mount \u2014 start span\n const span = tracer.startSpan(name, { kind: 'internal' });\n span.events.push({ name: 'mount', timestamp: performance.now() });\n spanRef.current = span;\n\n return () => {\n // Unmount \u2014 end span\n if (spanRef.current) {\n spanRef.current.events.push({ name: 'unmount', timestamp: performance.now() });\n endSpan(spanRef.current);\n }\n };\n }, []);\n}\n"],
5
- "mappings": ";oMA6BA,SAASA,EAAYC,EAA4B,CAC/C,IAAMC,EAAM,IAAI,WAAWD,CAAM,EACjC,GAAI,CAEF,OAAO,gBAAgBC,CAAG,CAC5B,MAAQ,CAEN,QAASC,EAAI,EAAGA,EAAIF,EAAQE,IAC1BD,EAAIC,CAAC,EAAI,KAAK,MAAM,KAAK,OAAO,EAAI,GAAG,CAE3C,CACA,OAAOD,CACT,CAEA,SAASE,EAAWC,EAA2B,CAC7C,IAAIC,EAAM,GACV,QAASH,EAAI,EAAGA,EAAIE,EAAM,OAAQF,IAChCG,IAAQD,EAAMF,CAAC,GAAK,GAAG,SAAS,EAAE,EAAE,SAAS,EAAG,GAAG,EAErD,OAAOG,CACT,CAGO,SAASC,GAA2B,CACzC,OAAOH,EAAWJ,EAAY,EAAE,CAAC,CACnC,CAGO,SAASQ,GAAyB,CACvC,OAAOJ,EAAWJ,EAAY,CAAC,CAAC,CAClC,CAIA,IAAMS,EAAiB,8DAQhB,SAASC,EAAiBC,EAAqC,CACpE,IAAMC,EAAQH,EAAe,KAAKE,EAAO,KAAK,CAAC,EAC/C,GAAI,CAACC,EAAO,OAAO,KAEnB,IAAMC,EAAUD,EAAM,CAAC,EACjBE,EAASF,EAAM,CAAC,EAChB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EACjF,MAAMe,EAAiBf,EAAO,SAAUA,EAAO,SAAW,CAAC,EAAGgB,CAAI,CACpE,CACF,CACF,EAEA,OAAOV,CACT,CAUO,SAASW,EAAWX,EAAgBX,EAAoB,CAC7D,IAAMuB,EAAUC,EAAoB,IAAI,EAExCC,EAAU,IAAM,CAEd,IAAMtB,EAAOQ,EAAO,UAAUX,EAAM,CAAE,KAAM,UAAW,CAAC,EACxD,OAAAG,EAAK,OAAO,KAAK,CAAE,KAAM,QAAS,UAAW,YAAY,IAAI,CAAE,CAAC,EAChEoB,EAAQ,QAAUpB,EAEX,IAAM,CAEPoB,EAAQ,UACVA,EAAQ,QAAQ,OAAO,KAAK,CAAE,KAAM,UAAW,UAAW,YAAY,IAAI,CAAE,CAAC,EAC7ErB,EAAQqB,EAAQ,OAAO,EAE3B,CACF,EAAG,CAAC,CAAC,CACP",
6
- "names": ["randomBytes", "length", "buf", "i", "bytesToHex", "bytes", "hex", "generateTraceId", "generateSpanId", "TRACEPARENT_RE", "parseTraceparent", "header", "match", "traceId", "spanId", "traceFlags", "formatTraceparent", "ctx", "startSpan", "name", "opts", "endSpan", "span", "createTracer", "config", "MAX_BUFFER_SIZE", "spanStack", "buffer", "bufferSpan", "flushTimer", "tracer", "active", "fn", "removeFromStack", "result", "value", "err", "toExport", "formatOtlpTraces", "exportToEndpoint", "body", "useTracing", "spanRef", "useRef", "useEffect"]
5
+ "mappings": ";;;;;;;;;;;;;;;AA6BA,SAAS,YAAY,QAA4B;AAC/C,QAAM,MAAM,IAAI,WAAW,MAAM;AACjC,MAAI;AAEF,WAAO,gBAAgB,GAAG;AAAA,EAC5B,QAAQ;AAEN,aAAS,IAAI,GAAG,IAAI,QAAQ,KAAK;AAC/B,UAAI,CAAC,IAAI,KAAK,MAAM,KAAK,OAAO,IAAI,GAAG;AAAA,IACzC;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,WAAW,OAA2B;AAC7C,MAAI,MAAM;AACV,WAAS,IAAI,GAAG,IAAI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AAM,WAAW,WAAW,YAAY,IAAI,EAAE,CAAC;AAC7E,gBAAQ,QAAQ,OAAO;AAAA,MACzB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACP;",
6
+ "names": ["formatOtlpTraces", "exportToEndpoint"]
7
7
  }
@@ -1,3 +1,119 @@
1
1
  /* (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE */
2
- import{a as d,b as e,c as f,d as g,e as h,f as j,g as k,h as l,i as m,j as n,k as E,l as F,m as G,n as H,o as I,p as J,q as K,r as L,s as M,t as N,u as P,v as V,w as W,x as X}from"./esm/chunks/chunk-A7AAS5ZR.js";import{e as O,i as S,k as T,l as U}from"./esm/chunks/chunk-VAF4KNDP.js";import{a as i}from"./esm/chunks/chunk-E43OK6IZ.js";import{a,b,c}from"./esm/chunks/chunk-ODCBJ22O.js";import"./esm/chunks/chunk-3J4RXW7E.js";import{a as Q,b as R}from"./esm/chunks/chunk-TVDAY42P.js";import{a as o,c as p,d as q,e as r,f as s,g as t,h as u,i as v,j as w,k as x,l as y,m as z,n as A,o as B,p as C,q as D}from"./esm/chunks/chunk-MCXU6QF3.js";import"./esm/chunks/chunk-ZDPD2MPQ.js";export{k as Children,l as Component,n as ErrorBoundary,V as FeatureFlagProvider,W as FeatureGate,c as Fragment,K as Link,G as Profiler,m as PureComponent,J as Route,H as Router,F as StrictMode,E as Suspense,P as act,Q as assertSecureUrl,j as cloneElement,d as createContext,a as createElement,b as createFactory,e as createRef,f as forwardRef,U as getComponentTypeTable,a as h,i as isValidElement,h as lazy,I as matchPath,g as memo,T as resolveComponentId,R as secureFetch,S as setComponentIdsEnabled,O as startTransition,t as useCallback,r as useContext,y as useDebugValue,A as useDeferredValue,q as useEffect,X as useFeatureFlags,o as useHead,z as useId,w as useImperativeHandle,D as useInsertionEffect,x as useLayoutEffect,u as useMemo,N as useNavigate,M as useParams,s as useReducer,v as useRef,L as useRouter,p as useState,C as useSyncExternalStore,B as useTransition};
2
+ import {
3
+ Children,
4
+ Component,
5
+ ErrorBoundary,
6
+ FeatureFlagProvider,
7
+ FeatureGate,
8
+ Link,
9
+ Profiler,
10
+ PureComponent,
11
+ Route,
12
+ Router,
13
+ StrictMode,
14
+ Suspense,
15
+ act,
16
+ cloneElement,
17
+ createContext,
18
+ createRef,
19
+ forwardRef,
20
+ lazy,
21
+ matchPath,
22
+ memo,
23
+ useFeatureFlags,
24
+ useNavigate,
25
+ useParams,
26
+ useRouter
27
+ } from "./esm/chunks/chunk-AVA7QEGU.js";
28
+ import {
29
+ getComponentTypeTable,
30
+ resolveComponentId,
31
+ setComponentIdsEnabled,
32
+ startTransition
33
+ } from "./esm/chunks/chunk-5OX5JKEY.js";
34
+ import {
35
+ isValidElement
36
+ } from "./esm/chunks/chunk-RSL3RU56.js";
37
+ import {
38
+ Fragment,
39
+ createElement,
40
+ createFactory
41
+ } from "./esm/chunks/chunk-NF4555DU.js";
42
+ import "./esm/chunks/chunk-HINJXYXY.js";
43
+ import {
44
+ assertSecureUrl,
45
+ secureFetch
46
+ } from "./esm/chunks/chunk-BLIAKWAU.js";
47
+ import {
48
+ useCallback,
49
+ useContext,
50
+ useDebugValue,
51
+ useDeferredValue,
52
+ useEffect,
53
+ useHead,
54
+ useId,
55
+ useImperativeHandle,
56
+ useInsertionEffect,
57
+ useLayoutEffect,
58
+ useMemo,
59
+ useReducer,
60
+ useRef,
61
+ useState,
62
+ useSyncExternalStore,
63
+ useTransition
64
+ } from "./esm/chunks/chunk-CWCWXKVV.js";
65
+ import "./esm/chunks/chunk-MKUA6QTB.js";
66
+ export {
67
+ Children,
68
+ Component,
69
+ ErrorBoundary,
70
+ FeatureFlagProvider,
71
+ FeatureGate,
72
+ Fragment,
73
+ Link,
74
+ Profiler,
75
+ PureComponent,
76
+ Route,
77
+ Router,
78
+ StrictMode,
79
+ Suspense,
80
+ act,
81
+ assertSecureUrl,
82
+ cloneElement,
83
+ createContext,
84
+ createElement,
85
+ createFactory,
86
+ createRef,
87
+ forwardRef,
88
+ getComponentTypeTable,
89
+ createElement as h,
90
+ isValidElement,
91
+ lazy,
92
+ matchPath,
93
+ memo,
94
+ resolveComponentId,
95
+ secureFetch,
96
+ setComponentIdsEnabled,
97
+ startTransition,
98
+ useCallback,
99
+ useContext,
100
+ useDebugValue,
101
+ useDeferredValue,
102
+ useEffect,
103
+ useFeatureFlags,
104
+ useHead,
105
+ useId,
106
+ useImperativeHandle,
107
+ useInsertionEffect,
108
+ useLayoutEffect,
109
+ useMemo,
110
+ useNavigate,
111
+ useParams,
112
+ useReducer,
113
+ useRef,
114
+ useRouter,
115
+ useState,
116
+ useSyncExternalStore,
117
+ useTransition
118
+ };
3
119
  //# sourceMappingURL=index.js.map
@@ -16,4 +16,4 @@ export interface AdSenseProps {
16
16
  /** Test mode (shows placeholder instead of real ads) */
17
17
  testMode?: boolean;
18
18
  }
19
- export declare function AdSense(props: AdSenseProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
19
+ export declare function AdSense(props: AdSenseProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -14,4 +14,4 @@ export interface AnalogClockProps {
14
14
  /** CSS className */
15
15
  className?: string;
16
16
  }
17
- export declare function AnalogClock(props: AnalogClockProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
17
+ export declare function AnalogClock(props: AnalogClockProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -16,4 +16,4 @@ export interface AvatarProps {
16
16
  /** Position of the status dot */
17
17
  statusPosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
18
18
  }
19
- export declare function Avatar(props: AvatarProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
19
+ export declare function Avatar(props: AvatarProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -14,4 +14,4 @@ export interface BadgeProps {
14
14
  /** Child element to overlay the badge on */
15
15
  children?: unknown;
16
16
  }
17
- export declare function Badge(props: BadgeProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
17
+ export declare function Badge(props: BadgeProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -44,4 +44,4 @@ export interface DataGridProps {
44
44
  /** Sticky header on scroll */
45
45
  stickyHeader?: boolean;
46
46
  }
47
- export declare function DataGrid(props: DataGridProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
47
+ export declare function DataGrid(props: DataGridProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -12,4 +12,4 @@ export interface DigitalClockProps {
12
12
  /** CSS className */
13
13
  className?: string;
14
14
  }
15
- export declare function DigitalClock(props: DigitalClockProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
15
+ export declare function DigitalClock(props: DigitalClockProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -20,4 +20,4 @@ export interface ListViewProps {
20
20
  /** Optional footer element */
21
21
  footer?: unknown;
22
22
  }
23
- export declare function ListView(props: ListViewProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
23
+ export declare function ListView(props: ListViewProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -18,4 +18,4 @@ export interface TagProps {
18
18
  /** Disabled state */
19
19
  disabled?: boolean;
20
20
  }
21
- export declare function Tag(props: TagProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
21
+ export declare function Tag(props: TagProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -10,4 +10,4 @@ export interface VirtualScrollProps {
10
10
  /** Container height (CSS value, e.g. '400px' or '100%') */
11
11
  height: string;
12
12
  }
13
- export declare function VirtualScroll(props: VirtualScrollProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
13
+ export declare function VirtualScroll(props: VirtualScrollProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -22,4 +22,4 @@ export interface AlertProps {
22
22
  /** Optional action button */
23
23
  action?: AlertAction;
24
24
  }
25
- export declare function Alert(props: AlertProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props> | null;
25
+ export declare function Alert(props: AlertProps): import("specifyjs").SpecElement<import("specifyjs").Props> | null;
@@ -14,4 +14,4 @@ export interface EmptyStateProps {
14
14
  /** Image URL displayed instead of / above the icon */
15
15
  image?: string;
16
16
  }
17
- export declare function EmptyState(props: EmptyStateProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
17
+ export declare function EmptyState(props: EmptyStateProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -20,4 +20,4 @@ export interface ProgressBarProps {
20
20
  /** Indeterminate mode -- animated without a specific value */
21
21
  indeterminate?: boolean;
22
22
  }
23
- export declare function ProgressBar(props: ProgressBarProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
23
+ export declare function ProgressBar(props: ProgressBarProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -12,4 +12,4 @@ export interface SkeletonProps {
12
12
  /** Border radius (CSS value) */
13
13
  borderRadius?: string;
14
14
  }
15
- export declare function Skeleton(props: SkeletonProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
15
+ export declare function Skeleton(props: SkeletonProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -10,4 +10,4 @@ export interface SpinnerProps {
10
10
  /** Accessible label for screen readers */
11
11
  label?: string;
12
12
  }
13
- export declare function Spinner(props: SpinnerProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
13
+ export declare function Spinner(props: SpinnerProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -22,4 +22,4 @@ export interface ButtonProps {
22
22
  /** Whether button is in active/toggled state */
23
23
  active?: boolean;
24
24
  }
25
- export declare function Button(props: ButtonProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
25
+ export declare function Button(props: ButtonProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -16,4 +16,4 @@ export interface CheckboxProps {
16
16
  /** HTML id for the input element */
17
17
  id?: string;
18
18
  }
19
- export declare function Checkbox(props: CheckboxProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
19
+ export declare function Checkbox(props: CheckboxProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -16,4 +16,4 @@ export interface ColorPickerProps {
16
16
  /** HTML id for the input element */
17
17
  id?: string;
18
18
  }
19
- export declare function ColorPicker(props: ColorPickerProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
19
+ export declare function ColorPicker(props: ColorPickerProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -14,4 +14,4 @@ export interface ColorWheelProps {
14
14
  /** HTML id for the input element */
15
15
  id?: string;
16
16
  }
17
- export declare function ColorWheel(props: ColorWheelProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
17
+ export declare function ColorWheel(props: ColorWheelProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -20,4 +20,4 @@ export interface DatePickerProps {
20
20
  /** HTML id for the input element */
21
21
  id?: string;
22
22
  }
23
- export declare function DatePicker(props: DatePickerProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
23
+ export declare function DatePicker(props: DatePickerProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -16,4 +16,4 @@ export interface FileUploadProps {
16
16
  /** HTML id for the input element */
17
17
  id?: string;
18
18
  }
19
- export declare function FileUpload(props: FileUploadProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
19
+ export declare function FileUpload(props: FileUploadProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -38,4 +38,4 @@ export interface MultilineFieldProps {
38
38
  inputStyle?: InputBaseStyle;
39
39
  className?: string;
40
40
  }
41
- export declare function MultilineField(props: MultilineFieldProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
41
+ export declare function MultilineField(props: MultilineFieldProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -22,4 +22,4 @@ export interface NumberSpinnerProps {
22
22
  /** HTML id for the input element */
23
23
  id?: string;
24
24
  }
25
- export declare function NumberSpinner(props: NumberSpinnerProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
25
+ export declare function NumberSpinner(props: NumberSpinnerProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -23,4 +23,4 @@ export interface RadioGroupProps {
23
23
  /** HTML id for the radio group */
24
24
  id?: string;
25
25
  }
26
- export declare function RadioGroup(props: RadioGroupProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
26
+ export declare function RadioGroup(props: RadioGroupProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -30,4 +30,4 @@ export interface SelectProps {
30
30
  /** HTML id for the input element */
31
31
  id?: string;
32
32
  }
33
- export declare function Select(props: SelectProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
33
+ export declare function Select(props: SelectProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -30,4 +30,4 @@ export interface SliderProps {
30
30
  /** HTML id for the input element */
31
31
  id?: string;
32
32
  }
33
- export declare function Slider(props: SliderProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
33
+ export declare function Slider(props: SliderProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -43,4 +43,4 @@ export interface TextEditorProps {
43
43
  wrapperStyle?: FormFieldWrapperStyle;
44
44
  }
45
45
  export type ToolbarButton = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'heading1' | 'heading2' | 'heading3' | 'bulletList' | 'orderedList' | 'blockquote' | 'link' | 'unlink' | 'insertHR' | 'removeFormat' | 'undo' | 'redo';
46
- export declare function TextEditor(props: TextEditorProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
46
+ export declare function TextEditor(props: TextEditorProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -45,4 +45,4 @@ export interface TextFieldProps {
45
45
  /** Extra class on the input */
46
46
  className?: string;
47
47
  }
48
- export declare function TextField(props: TextFieldProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
48
+ export declare function TextField(props: TextFieldProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -26,4 +26,4 @@ export interface TimePickerProps {
26
26
  /** HTML id for the input element */
27
27
  id?: string;
28
28
  }
29
- export declare function TimePicker(props: TimePickerProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
29
+ export declare function TimePicker(props: TimePickerProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -16,4 +16,4 @@ export interface ToggleProps {
16
16
  /** Track color when off */
17
17
  offColor?: string;
18
18
  }
19
- export declare function Toggle(props: ToggleProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
19
+ export declare function Toggle(props: ToggleProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -44,7 +44,7 @@ export interface FormFieldWrapperProps {
44
44
  /** The form control (children) */
45
45
  children?: unknown;
46
46
  }
47
- export declare function FormFieldWrapper(props: FormFieldWrapperProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
47
+ export declare function FormFieldWrapper(props: FormFieldWrapperProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
48
48
  /**
49
49
  * Shared input styling builder used by textfield, multiline, texteditor.
50
50
  */
@@ -28,4 +28,4 @@ export interface CardProps {
28
28
  /** Body content */
29
29
  children?: unknown;
30
30
  }
31
- export declare function Card(props: CardProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
31
+ export declare function Card(props: CardProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -20,4 +20,4 @@ export interface DesktopBackgroundProps {
20
20
  /** Content rendered on top of the background. */
21
21
  children?: unknown;
22
22
  }
23
- export declare function DesktopBackground(props: DesktopBackgroundProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
23
+ export declare function DesktopBackground(props: DesktopBackgroundProps): import("specifyjs").SpecElement<import("specifyjs").Props>;