@sqlrooms/utils 0.14.0 → 0.16.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.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Function to detect if the user is on a Mac device
3
+ * @returns boolean indicating if the user is on a Mac
4
+ */
5
+ export declare function isMacOS(): boolean;
6
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,OAAO,IAAI,OAAO,CAEjC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Function to detect if the user is on a Mac device
3
+ * @returns boolean indicating if the user is on a Mac
4
+ */
5
+ export function isMacOS() {
6
+ return navigator.platform.toLowerCase().includes('mac');
7
+ }
8
+ //# sourceMappingURL=browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,OAAO;IACrB,OAAO,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC","sourcesContent":["/**\n * Function to detect if the user is on a Mac device\n * @returns boolean indicating if the user is on a Mac\n */\nexport function isMacOS(): boolean {\n return navigator.platform.toLowerCase().includes('mac');\n}\n"]}
package/dist/helpers.d.ts CHANGED
@@ -53,6 +53,15 @@ export declare const formatTimeOfDay: (d: Date | number | bigint) => string;
53
53
  * ```
54
54
  */
55
55
  export declare const formatTimeRelative: (d: ConfigType) => string;
56
+ /**
57
+ * Formats the current timestamp for use in filenames (filesystem-safe)
58
+ * @returns Timestamp string in YYYY-MM-DDTHH-mm-ss format
59
+ * @example
60
+ * ```ts
61
+ * formatTimestampForFilename(); // "2024-03-13T14-30-25"
62
+ * ```
63
+ */
64
+ export declare const formatTimestampForFilename: () => string;
56
65
  /**
57
66
  * Extracts and formats an error message for display, removing common prefixes and truncating at first newline
58
67
  * @param e - Error object or any other value that can be converted to string
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAEA,OAAc,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AAKxC;;GAEG;AACH,eAAO,MAAM,aAAa,mBAExB,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,WAA4B,CAAC;AAMnE;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,WAGvD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,WAGnD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,WAGxD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,GAAG,UAAU,WAE/C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GAAI,GAAG,OAAO,WAKnD,CAAC"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAEA,OAAc,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AAKxC;;GAEG;AACH,eAAO,MAAM,aAAa,mBAExB,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,WAA4B,CAAC;AAMnE;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,WAGvD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,WAGnD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,WAGxD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,GAAG,UAAU,WAE/C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,cAEtC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GAAI,GAAG,OAAO,WAKnD,CAAC"}
package/dist/helpers.js CHANGED
@@ -72,6 +72,17 @@ export const formatTimeOfDay = (d) => {
72
72
  export const formatTimeRelative = (d) => {
73
73
  return dayjs().to(d);
74
74
  };
75
+ /**
76
+ * Formats the current timestamp for use in filenames (filesystem-safe)
77
+ * @returns Timestamp string in YYYY-MM-DDTHH-mm-ss format
78
+ * @example
79
+ * ```ts
80
+ * formatTimestampForFilename(); // "2024-03-13T14-30-25"
81
+ * ```
82
+ */
83
+ export const formatTimestampForFilename = () => {
84
+ return dayjs().format('YYYY-MM-DDTHH-mm-ss');
85
+ };
75
86
  /**
76
87
  * Extracts and formats an error message for display, removing common prefixes and truncating at first newline
77
88
  * @param e - Error object or any other value that can be converted to string
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,YAAY,MAAM,2BAA2B,CAAC;AAErD,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAE3B;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;IAC1D,qBAAqB,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,aAA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GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAU,EAAE,EAAE;IACtD,IAAI,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACrD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACxD,CAAC,CAAC","sourcesContent":["import {timeFormat} from 'd3-time-format';\n\nimport dayjs, {ConfigType} from 'dayjs';\nimport relativeTime from 'dayjs/plugin/relativeTime';\n\ndayjs.extend(relativeTime);\n\n/**\n * Number formatter instance configured for US locale with no minimum fraction digits\n */\nexport const NUMBER_FORMAT = new Intl.NumberFormat('en-US', {\n minimumFractionDigits: 0,\n});\n\n/**\n * Formats a number using US locale formatting\n * @param n - Number to format\n * @returns Formatted number string\n * @example\n * ```ts\n * formatNumber(1234567.89); // \"1,234,568\"\n * ```\n */\nexport const formatNumber = (n: number) => NUMBER_FORMAT.format(n);\n\nconst TIME_OF_DAY_FORMAT = timeFormat('%I:%M %p');\nconst DATE_TIME_FORMAT = timeFormat('%a %Y-%m-%d %I:%M %p');\nconst DATE_FORMAT = timeFormat('%Y-%m-%d');\n\n/**\n * Formats a date into a human-readable datetime string\n * @param d - Date to format (can be Date object, timestamp number, or bigint)\n * @returns Formatted string in \"Day YYYY-MM-DD HH:MM AM/PM\" format\n * @example\n * ```ts\n * formatDateTime(new Date()); // e.g., \"Wed 2024-03-13 02:30 PM\"\n * ```\n */\nexport const formatDateTime = (d: Date | number | bigint) => {\n const date = d instanceof Date ? d : new Date(Number(d));\n return DATE_TIME_FORMAT(date);\n};\n\n/**\n * Formats a date into YYYY-MM-DD format\n * @param d - Date to format (can be Date object, timestamp number, or bigint)\n * @returns Formatted date string\n * @example\n * ```ts\n * formatDate(new Date()); // e.g., \"2024-03-13\"\n * ```\n */\nexport const formatDate = (d: Date | number | bigint) => {\n const date = d instanceof Date ? d : new Date(Number(d));\n return DATE_FORMAT(date);\n};\n\n/**\n * Formats a date into time of day (HH:MM AM/PM)\n * @param d - Date to format (can be Date object, timestamp number, or bigint)\n * @returns Formatted time string\n * @example\n * ```ts\n * formatTimeOfDay(new Date()); // e.g., \"02:30 PM\"\n * ```\n */\nexport const formatTimeOfDay = (d: Date | number | bigint) => {\n const date = d instanceof Date ? d : new Date(Number(d));\n return TIME_OF_DAY_FORMAT(date);\n};\n\n/**\n * Formats a date relative to the current time (e.g., \"2 hours ago\", \"in 3 days\")\n * @param d - Date to format (accepts any dayjs ConfigType)\n * @returns Human-readable relative time string\n * @example\n * ```ts\n * formatTimeRelative(new Date(Date.now() - 3600000)); // \"1 hour ago\"\n * ```\n */\nexport const formatTimeRelative = (d: ConfigType) => {\n return dayjs().to(d);\n};\n\n/**\n * Extracts and formats an error message for display, removing common prefixes and truncating at first newline\n * @param e - Error object or any other value that can be converted to string\n * @returns Cleaned up error message string\n * @example\n * ```ts\n * getErrorMessageForDisplay(new Error(\"Query failed: Error: Invalid syntax\\nMore details...\")); // \"Invalid syntax\"\n * ```\n */\nexport const getErrorMessageForDisplay = (e: unknown) => {\n let msg = e instanceof Error ? e.message : String(e);\n msg = msg.replace(/Query failed: Error: /, '');\n const firstNl = msg.indexOf('\\n');\n return firstNl >= 0 ? msg.substring(0, firstNl) : msg;\n};\n"]}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,YAAY,MAAM,2BA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IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACzD,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAa,EAAE,EAAE;IAClD,OAAO,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,EAAE;IAC7C,OAAO,KAAK,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAU,EAAE,EAAE;IACtD,IAAI,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACrD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACxD,CAAC,CAAC","sourcesContent":["import {timeFormat} from 'd3-time-format';\n\nimport dayjs, {ConfigType} from 'dayjs';\nimport relativeTime from 'dayjs/plugin/relativeTime';\n\ndayjs.extend(relativeTime);\n\n/**\n * Number formatter instance configured for US locale with no minimum fraction digits\n */\nexport const NUMBER_FORMAT = new Intl.NumberFormat('en-US', {\n minimumFractionDigits: 0,\n});\n\n/**\n * Formats a number using US locale formatting\n * @param n - Number to format\n * @returns Formatted number string\n * @example\n * ```ts\n * formatNumber(1234567.89); // \"1,234,568\"\n * ```\n */\nexport const formatNumber = (n: number) => NUMBER_FORMAT.format(n);\n\nconst TIME_OF_DAY_FORMAT = timeFormat('%I:%M %p');\nconst DATE_TIME_FORMAT = timeFormat('%a %Y-%m-%d %I:%M %p');\nconst DATE_FORMAT = timeFormat('%Y-%m-%d');\n\n/**\n * Formats a date into a human-readable datetime string\n * @param d - Date to format (can be Date object, timestamp number, or bigint)\n * @returns Formatted string in \"Day YYYY-MM-DD HH:MM AM/PM\" format\n * @example\n * ```ts\n * formatDateTime(new Date()); // e.g., \"Wed 2024-03-13 02:30 PM\"\n * ```\n */\nexport const formatDateTime = (d: Date | number | bigint) => {\n const date = d instanceof Date ? d : new Date(Number(d));\n return DATE_TIME_FORMAT(date);\n};\n\n/**\n * Formats a date into YYYY-MM-DD format\n * @param d - Date to format (can be Date object, timestamp number, or bigint)\n * @returns Formatted date string\n * @example\n * ```ts\n * formatDate(new Date()); // e.g., \"2024-03-13\"\n * ```\n */\nexport const formatDate = (d: Date | number | bigint) => {\n const date = d instanceof Date ? d : new Date(Number(d));\n return DATE_FORMAT(date);\n};\n\n/**\n * Formats a date into time of day (HH:MM AM/PM)\n * @param d - Date to format (can be Date object, timestamp number, or bigint)\n * @returns Formatted time string\n * @example\n * ```ts\n * formatTimeOfDay(new Date()); // e.g., \"02:30 PM\"\n * ```\n */\nexport const formatTimeOfDay = (d: Date | number | bigint) => {\n const date = d instanceof Date ? d : new Date(Number(d));\n return TIME_OF_DAY_FORMAT(date);\n};\n\n/**\n * Formats a date relative to the current time (e.g., \"2 hours ago\", \"in 3 days\")\n * @param d - Date to format (accepts any dayjs ConfigType)\n * @returns Human-readable relative time string\n * @example\n * ```ts\n * formatTimeRelative(new Date(Date.now() - 3600000)); // \"1 hour ago\"\n * ```\n */\nexport const formatTimeRelative = (d: ConfigType) => {\n return dayjs().to(d);\n};\n\n/**\n * Formats the current timestamp for use in filenames (filesystem-safe)\n * @returns Timestamp string in YYYY-MM-DDTHH-mm-ss format\n * @example\n * ```ts\n * formatTimestampForFilename(); // \"2024-03-13T14-30-25\"\n * ```\n */\nexport const formatTimestampForFilename = () => {\n return dayjs().format('YYYY-MM-DDTHH-mm-ss');\n};\n\n/**\n * Extracts and formats an error message for display, removing common prefixes and truncating at first newline\n * @param e - Error object or any other value that can be converted to string\n * @returns Cleaned up error message string\n * @example\n * ```ts\n * getErrorMessageForDisplay(new Error(\"Query failed: Error: Invalid syntax\\nMore details...\")); // \"Invalid syntax\"\n * ```\n */\nexport const getErrorMessageForDisplay = (e: unknown) => {\n let msg = e instanceof Error ? e.message : String(e);\n msg = msg.replace(/Query failed: Error: /, '');\n const firstNl = msg.indexOf('\\n');\n return firstNl >= 0 ? msg.substring(0, firstNl) : msg;\n};\n"]}
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@
5
5
  export * from './color';
6
6
  export * from './format';
7
7
  export * from './helpers';
8
+ export { isMacOS } from './browser';
8
9
  export * from './random';
9
10
  export * from './str';
10
11
  export * from './xhr';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAC,aAAa,EAAC,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAC,aAAa,EAAC,MAAM,QAAQ,CAAC"}
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@
5
5
  export * from './color';
6
6
  export * from './format';
7
7
  export * from './helpers';
8
+ export { isMacOS } from './browser';
8
9
  export * from './random';
9
10
  export * from './str';
10
11
  export * from './xhr';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAC,aAAa,EAAC,MAAM,QAAQ,CAAC","sourcesContent":["/**\n * {@include ../README.md}\n * @packageDocumentation\n */\n\nexport * from './color';\nexport * from './format';\nexport * from './helpers';\nexport * from './random';\nexport * from './str';\nexport * from './xhr';\nexport * from './filepaths';\nexport {safeJsonParse} from './json';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAC,aAAa,EAAC,MAAM,QAAQ,CAAC","sourcesContent":["/**\n * {@include ../README.md}\n * @packageDocumentation\n */\n\nexport * from './color';\nexport * from './format';\nexport * from './helpers';\nexport {isMacOS} from './browser';\nexport * from './random';\nexport * from './str';\nexport * from './xhr';\nexport * from './filepaths';\nexport {safeJsonParse} from './json';\n"]}
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@sqlrooms/utils",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.js",
7
7
  "type": "module",
8
- "private": false,
9
8
  "author": "Ilya Boyandin <ilya@boyandin.me>",
10
9
  "license": "MIT",
11
10
  "repository": {
@@ -38,8 +37,11 @@
38
37
  "@types/d3-format": "^3.0.4",
39
38
  "@types/d3-time-format": "^4.0.3",
40
39
  "@types/seedrandom": "^3.0.8",
41
- "react": "^19.0.0",
42
40
  "usehooks-ts": "^3.1.1"
43
41
  },
44
- "gitHead": "fb82a7e1be842348246bafdfeb93b6c41f5f9eb5"
42
+ "peerDependencies": {
43
+ "react": "*",
44
+ "react-dom": "*"
45
+ },
46
+ "gitHead": "94dfdc97417dd715b9d6886122a3944b789b0b13"
45
47
  }