@djangocfg/layouts 2.1.571 → 2.1.572
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/layouts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.572",
|
|
4
4
|
"description": "Simple, straightforward layout components for Next.js - import and use with props",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"layouts",
|
|
@@ -90,11 +90,11 @@
|
|
|
90
90
|
"check": "tsc --noEmit"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
|
-
"@djangocfg/analytics": "^2.1.
|
|
94
|
-
"@djangocfg/api": "^2.1.
|
|
95
|
-
"@djangocfg/devtools": "^2.1.
|
|
96
|
-
"@djangocfg/i18n": "^2.1.
|
|
97
|
-
"@djangocfg/ui-core": "^2.1.
|
|
93
|
+
"@djangocfg/analytics": "^2.1.572",
|
|
94
|
+
"@djangocfg/api": "^2.1.572",
|
|
95
|
+
"@djangocfg/devtools": "^2.1.572",
|
|
96
|
+
"@djangocfg/i18n": "^2.1.572",
|
|
97
|
+
"@djangocfg/ui-core": "^2.1.572",
|
|
98
98
|
"@hookform/resolvers": "^5.2.2",
|
|
99
99
|
"consola": "^3.4.2",
|
|
100
100
|
"lucide-react": "^0.545.0",
|
|
@@ -124,12 +124,12 @@
|
|
|
124
124
|
"uuid": "^11.1.1"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
|
-
"@djangocfg/analytics": "^2.1.
|
|
128
|
-
"@djangocfg/api": "^2.1.
|
|
129
|
-
"@djangocfg/devtools": "^2.1.
|
|
130
|
-
"@djangocfg/i18n": "^2.1.
|
|
131
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
132
|
-
"@djangocfg/ui-core": "^2.1.
|
|
127
|
+
"@djangocfg/analytics": "^2.1.572",
|
|
128
|
+
"@djangocfg/api": "^2.1.572",
|
|
129
|
+
"@djangocfg/devtools": "^2.1.572",
|
|
130
|
+
"@djangocfg/i18n": "^2.1.572",
|
|
131
|
+
"@djangocfg/typescript-config": "^2.1.572",
|
|
132
|
+
"@djangocfg/ui-core": "^2.1.572",
|
|
133
133
|
"@storybook/react-vite": "^10.5.0",
|
|
134
134
|
"@types/node": "^25.9.5",
|
|
135
135
|
"@types/react": "19.2.15",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Check, FlaskConical, KeyRound, Loader2, RefreshCw } from 'lucide-react';
|
|
4
|
-
import moment from 'moment';
|
|
5
4
|
import React from 'react';
|
|
6
5
|
|
|
7
6
|
import {
|
|
@@ -20,9 +19,23 @@ import { ApiKeyProvider, useApiKeyContext } from './context';
|
|
|
20
19
|
// Helpers
|
|
21
20
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
22
21
|
|
|
22
|
+
// `Intl.DateTimeFormat`, not moment: this was the whole of moment's job here —
|
|
23
|
+
// one UTC timestamp rendered in the viewer's zone. moment ships its 137 locale
|
|
24
|
+
// files to every consumer that imports anything from this package's barrel,
|
|
25
|
+
// which cost the MLS property pages two 805 KB chunks (measured 2026-10-17).
|
|
26
|
+
//
|
|
27
|
+
// A bare `new Date(iso)` would read a timestamp without a zone designator as
|
|
28
|
+
// LOCAL time; the API sends UTC, so the `Z` is appended when it is missing.
|
|
23
29
|
function formatDate(iso: string | null, fallback: string): string {
|
|
24
30
|
if (!iso) return fallback;
|
|
25
|
-
|
|
31
|
+
const utc = /(?:Z|[+-]\d{2}:?\d{2})$/.test(iso) ? iso : `${iso}Z`;
|
|
32
|
+
const date = new Date(utc);
|
|
33
|
+
if (Number.isNaN(date.getTime())) return fallback;
|
|
34
|
+
return new Intl.DateTimeFormat('en-US', {
|
|
35
|
+
year: 'numeric',
|
|
36
|
+
month: 'short',
|
|
37
|
+
day: 'numeric',
|
|
38
|
+
}).format(date);
|
|
26
39
|
}
|
|
27
40
|
|
|
28
41
|
/** Returns true if the backend already masked the key (contains •). */
|