@luxonis/ui-utils 0.0.2 → 1.0.4

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/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { stringify } from 'safe-stable-stringify';
1
2
  import React from 'react';
2
3
  import { ErrorObject } from 'serialize-error';
3
4
  export { serializeError } from 'serialize-error';
@@ -38,6 +39,18 @@ declare function oldestFirstByCreatedAt<T extends {
38
39
  createdAt: Date | string;
39
40
  }>(a: T, b: T): number;
40
41
 
42
+ declare const serializeToJson: typeof stringify;
43
+ type JsonPrimitive = string | number | boolean | null;
44
+ type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
45
+ type JsonObject = {
46
+ [key: string]: JsonValue;
47
+ };
48
+ declare const serializeToJsonOrThrow: (data: unknown) => string;
49
+ declare const parseJson: <T = unknown>(value: string) => T;
50
+ declare const resolveReference: (jsonSchema: JsonObject, ref: string) => JsonValue | undefined;
51
+ declare const replaceRefs: (schema: JsonValue, jsonSchema: JsonObject) => string | number | boolean | JsonObject | JsonValue[] | null;
52
+ declare const replaceRefsInJsonSchema: (jsonSchema: JsonObject) => string | number | boolean | JsonObject | JsonValue[] | null;
53
+
41
54
  type UseDebounceProps = {
42
55
  effect: () => void;
43
56
  dependencies: React.DependencyList;
@@ -119,4 +132,4 @@ declare const errorAsContext: (e: unknown) => MessageContext;
119
132
  declare function prettifyMessage(data: string): string;
120
133
  declare const log: Logger;
121
134
 
122
- export { DAY, HOUR, type LogFnParams, type LogFnParamsBase, type LogFnParamsCtx, LogLevel, type Logger, type LoggerConfig, MINUTE, MONTH, type Message, type MessageContext, SECOND, WEEK, YEAR, buildLogger, buildSerializeMessage, defaultLogger, errorAsContext, formatAgentVersion, formatBps, formatBytes, formatCapitalizeFirstLetter, formatCapitalizeWords, formatDate, formatDateISOInTimezone, formatFirmwareVersion, formatIntTemperature, formatLastSeen, formatMaxLength, formatPlatform, formatPrettyDate, formatRobotName, formatSlug, formatTemperature, formatUptime, formatUsbPort, getDateWithTimezone, getDistance, getShortDate, getShortDateOrDistance, getShortDateTime, getShortTime, getShortTimeElapsed, getTime, isLogFnParamsCtx, log, newestFirstByCreatedAt, oldestFirstByCreatedAt, prettifyMessage, secondsToTime, toTwoDigits, unixTimestamp, unixTimestampAtUtc, unixTimestampWithMillis, unixTimestampWithMillisAtUtc, useDebounce };
135
+ export { DAY, HOUR, type JsonObject, type JsonPrimitive, type JsonValue, type LogFnParams, type LogFnParamsBase, type LogFnParamsCtx, LogLevel, type Logger, type LoggerConfig, MINUTE, MONTH, type Message, type MessageContext, SECOND, WEEK, YEAR, buildLogger, buildSerializeMessage, defaultLogger, errorAsContext, formatAgentVersion, formatBps, formatBytes, formatCapitalizeFirstLetter, formatCapitalizeWords, formatDate, formatDateISOInTimezone, formatFirmwareVersion, formatIntTemperature, formatLastSeen, formatMaxLength, formatPlatform, formatPrettyDate, formatRobotName, formatSlug, formatTemperature, formatUptime, formatUsbPort, getDateWithTimezone, getDistance, getShortDate, getShortDateOrDistance, getShortDateTime, getShortTime, getShortTimeElapsed, getTime, isLogFnParamsCtx, log, newestFirstByCreatedAt, oldestFirstByCreatedAt, parseJson, prettifyMessage, replaceRefs, replaceRefsInJsonSchema, resolveReference, secondsToTime, serializeToJson, serializeToJsonOrThrow, toTwoDigits, unixTimestamp, unixTimestampAtUtc, unixTimestampWithMillis, unixTimestampWithMillisAtUtc, useDebounce };