astro-md-editor 0.0.1
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/.output/nitro.json +17 -0
- package/.output/public/assets/index-Cc7yKB0o.js +19 -0
- package/.output/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/.output/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/.output/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/.output/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/.output/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/.output/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/.output/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/.output/public/assets/main-DDBjVFnt.js +17 -0
- package/.output/public/assets/styles-ggfdUHMo.css +1 -0
- package/.output/public/favicon.ico +0 -0
- package/.output/public/logo192.png +0 -0
- package/.output/public/logo512.png +0 -0
- package/.output/public/manifest.json +25 -0
- package/.output/public/robots.txt +3 -0
- package/.output/server/__root-C09LBXMv.mjs +40 -0
- package/.output/server/_chunks/ssr-renderer.mjs +21 -0
- package/.output/server/_libs/ajv-formats.mjs +330 -0
- package/.output/server/_libs/ajv.mjs +5484 -0
- package/.output/server/_libs/base-ui__react.mjs +8712 -0
- package/.output/server/_libs/base-ui__utils.mjs +980 -0
- package/.output/server/_libs/class-variance-authority.mjs +44 -0
- package/.output/server/_libs/clsx.mjs +16 -0
- package/.output/server/_libs/cookie-es.mjs +58 -0
- package/.output/server/_libs/croner.mjs +1 -0
- package/.output/server/_libs/crossws.mjs +1 -0
- package/.output/server/_libs/date-fns.mjs +1716 -0
- package/.output/server/_libs/date-fns__tz.mjs +217 -0
- package/.output/server/_libs/extend-shallow.mjs +35 -0
- package/.output/server/_libs/fast-deep-equal.mjs +38 -0
- package/.output/server/_libs/fast-uri.mjs +725 -0
- package/.output/server/_libs/floating-ui__core.mjs +663 -0
- package/.output/server/_libs/floating-ui__dom.mjs +624 -0
- package/.output/server/_libs/floating-ui__react-dom.mjs +279 -0
- package/.output/server/_libs/floating-ui__utils.mjs +322 -0
- package/.output/server/_libs/gray-matter.mjs +393 -0
- package/.output/server/_libs/h3-v2.mjs +276 -0
- package/.output/server/_libs/h3.mjs +400 -0
- package/.output/server/_libs/hookable.mjs +1 -0
- package/.output/server/_libs/is-extendable.mjs +13 -0
- package/.output/server/_libs/isbot.mjs +20 -0
- package/.output/server/_libs/js-yaml.mjs +2822 -0
- package/.output/server/_libs/json-schema-traverse.mjs +91 -0
- package/.output/server/_libs/kind-of.mjs +125 -0
- package/.output/server/_libs/lucide-react.mjs +177 -0
- package/.output/server/_libs/ohash.mjs +1 -0
- package/.output/server/_libs/react-day-picker.mjs +2216 -0
- package/.output/server/_libs/react-dom.mjs +10779 -0
- package/.output/server/_libs/react-resizable-panels.mjs +2024 -0
- package/.output/server/_libs/react.mjs +513 -0
- package/.output/server/_libs/reselect.mjs +326 -0
- package/.output/server/_libs/rou3.mjs +8 -0
- package/.output/server/_libs/section-matter.mjs +112 -0
- package/.output/server/_libs/seroval-plugins.mjs +58 -0
- package/.output/server/_libs/seroval.mjs +1765 -0
- package/.output/server/_libs/srvx.mjs +736 -0
- package/.output/server/_libs/strip-bom-string.mjs +16 -0
- package/.output/server/_libs/tabbable.mjs +342 -0
- package/.output/server/_libs/tailwind-merge.mjs +3175 -0
- package/.output/server/_libs/tanstack__history.mjs +217 -0
- package/.output/server/_libs/tanstack__react-router.mjs +1464 -0
- package/.output/server/_libs/tanstack__react-store.mjs +1 -0
- package/.output/server/_libs/tanstack__router-core.mjs +4912 -0
- package/.output/server/_libs/tanstack__store.mjs +1 -0
- package/.output/server/_libs/tiny-invariant.mjs +12 -0
- package/.output/server/_libs/tiny-warning.mjs +5 -0
- package/.output/server/_libs/ufo.mjs +54 -0
- package/.output/server/_libs/unctx.mjs +1 -0
- package/.output/server/_libs/unstorage.mjs +1 -0
- package/.output/server/_libs/use-sync-external-store.mjs +139 -0
- package/.output/server/_libs/zod.mjs +3634 -0
- package/.output/server/_libs/zustand.mjs +43 -0
- package/.output/server/_ssr/RightSidebar-RSY9M7XF.mjs +218 -0
- package/.output/server/_ssr/collections.server-D6U2tEsT.mjs +120 -0
- package/.output/server/_ssr/createServerRpc-29xaFZcb.mjs +12 -0
- package/.output/server/_ssr/index-BaqV4cZC.mjs +2083 -0
- package/.output/server/_ssr/index-sQBM6rwN.mjs +115 -0
- package/.output/server/_ssr/index.mjs +1448 -0
- package/.output/server/_ssr/router-D4G1DGr3.mjs +155 -0
- package/.output/server/_ssr/start-HYkvq4Ni.mjs +4 -0
- package/.output/server/_tanstack-start-manifest_v-CYEHh_qB.mjs +4 -0
- package/.output/server/index.mjs +451 -0
- package/README.md +118 -0
- package/index.mjs +21 -0
- package/package.json +86 -0
- package/scripts/bootstrap-collections.mjs +1201 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
function tzName(timeZone, date, format = "long") {
|
|
2
|
+
return new Intl.DateTimeFormat("en-US", {
|
|
3
|
+
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
|
4
|
+
hour: "numeric",
|
|
5
|
+
timeZone,
|
|
6
|
+
timeZoneName: format
|
|
7
|
+
}).format(date).split(/\s/g).slice(2).join(" ");
|
|
8
|
+
}
|
|
9
|
+
const offsetFormatCache = {};
|
|
10
|
+
const offsetCache = {};
|
|
11
|
+
function tzOffset(timeZone, date) {
|
|
12
|
+
try {
|
|
13
|
+
const format = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat("en-US", {
|
|
14
|
+
timeZone,
|
|
15
|
+
timeZoneName: "longOffset"
|
|
16
|
+
}).format;
|
|
17
|
+
const offsetStr = format(date).split("GMT")[1];
|
|
18
|
+
if (offsetStr in offsetCache) return offsetCache[offsetStr];
|
|
19
|
+
return calcOffset(offsetStr, offsetStr.split(":"));
|
|
20
|
+
} catch {
|
|
21
|
+
if (timeZone in offsetCache) return offsetCache[timeZone];
|
|
22
|
+
const captures = timeZone?.match(offsetRe);
|
|
23
|
+
if (captures) return calcOffset(timeZone, captures.slice(1));
|
|
24
|
+
return NaN;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const offsetRe = /([+-]\d\d):?(\d\d)?/;
|
|
28
|
+
function calcOffset(cacheStr, values) {
|
|
29
|
+
const hours = +(values[0] || 0);
|
|
30
|
+
const minutes = +(values[1] || 0);
|
|
31
|
+
const seconds = +(values[2] || 0) / 60;
|
|
32
|
+
return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;
|
|
33
|
+
}
|
|
34
|
+
class TZDateMini extends Date {
|
|
35
|
+
//#region static
|
|
36
|
+
constructor(...args) {
|
|
37
|
+
super();
|
|
38
|
+
if (args.length > 1 && typeof args[args.length - 1] === "string") {
|
|
39
|
+
this.timeZone = args.pop();
|
|
40
|
+
}
|
|
41
|
+
this.internal = /* @__PURE__ */ new Date();
|
|
42
|
+
if (isNaN(tzOffset(this.timeZone, this))) {
|
|
43
|
+
this.setTime(NaN);
|
|
44
|
+
} else {
|
|
45
|
+
if (!args.length) {
|
|
46
|
+
this.setTime(Date.now());
|
|
47
|
+
} else if (typeof args[0] === "number" && (args.length === 1 || args.length === 2 && typeof args[1] !== "number")) {
|
|
48
|
+
this.setTime(args[0]);
|
|
49
|
+
} else if (typeof args[0] === "string") {
|
|
50
|
+
this.setTime(+new Date(args[0]));
|
|
51
|
+
} else if (args[0] instanceof Date) {
|
|
52
|
+
this.setTime(+args[0]);
|
|
53
|
+
} else {
|
|
54
|
+
this.setTime(+new Date(...args));
|
|
55
|
+
adjustToSystemTZ(this);
|
|
56
|
+
syncToInternal(this);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
static tz(tz, ...args) {
|
|
61
|
+
return args.length ? new TZDateMini(...args, tz) : new TZDateMini(Date.now(), tz);
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region time zone
|
|
65
|
+
withTimeZone(timeZone) {
|
|
66
|
+
return new TZDateMini(+this, timeZone);
|
|
67
|
+
}
|
|
68
|
+
getTimezoneOffset() {
|
|
69
|
+
const offset = -tzOffset(this.timeZone, this);
|
|
70
|
+
return offset > 0 ? Math.floor(offset) : Math.ceil(offset);
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region time
|
|
74
|
+
setTime(time) {
|
|
75
|
+
Date.prototype.setTime.apply(this, arguments);
|
|
76
|
+
syncToInternal(this);
|
|
77
|
+
return +this;
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region date-fns integration
|
|
81
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
|
|
82
|
+
return new TZDateMini(+new Date(date), this.timeZone);
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
}
|
|
86
|
+
const re = /^(get|set)(?!UTC)/;
|
|
87
|
+
Object.getOwnPropertyNames(Date.prototype).forEach((method) => {
|
|
88
|
+
if (!re.test(method)) return;
|
|
89
|
+
const utcMethod = method.replace(re, "$1UTC");
|
|
90
|
+
if (!TZDateMini.prototype[utcMethod]) return;
|
|
91
|
+
if (method.startsWith("get")) {
|
|
92
|
+
TZDateMini.prototype[method] = function() {
|
|
93
|
+
return this.internal[utcMethod]();
|
|
94
|
+
};
|
|
95
|
+
} else {
|
|
96
|
+
TZDateMini.prototype[method] = function() {
|
|
97
|
+
Date.prototype[utcMethod].apply(this.internal, arguments);
|
|
98
|
+
syncFromInternal(this);
|
|
99
|
+
return +this;
|
|
100
|
+
};
|
|
101
|
+
TZDateMini.prototype[utcMethod] = function() {
|
|
102
|
+
Date.prototype[utcMethod].apply(this, arguments);
|
|
103
|
+
syncToInternal(this);
|
|
104
|
+
return +this;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
function syncToInternal(date) {
|
|
109
|
+
date.internal.setTime(+date);
|
|
110
|
+
date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));
|
|
111
|
+
}
|
|
112
|
+
function syncFromInternal(date) {
|
|
113
|
+
Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());
|
|
114
|
+
Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());
|
|
115
|
+
adjustToSystemTZ(date);
|
|
116
|
+
}
|
|
117
|
+
function adjustToSystemTZ(date) {
|
|
118
|
+
const baseOffset = tzOffset(date.timeZone, date);
|
|
119
|
+
const offset = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);
|
|
120
|
+
const prevHour = /* @__PURE__ */ new Date(+date);
|
|
121
|
+
prevHour.setUTCHours(prevHour.getUTCHours() - 1);
|
|
122
|
+
const systemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
|
|
123
|
+
const prevHourSystemOffset = -(/* @__PURE__ */ new Date(+prevHour)).getTimezoneOffset();
|
|
124
|
+
const systemDSTChange = systemOffset - prevHourSystemOffset;
|
|
125
|
+
const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();
|
|
126
|
+
if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);
|
|
127
|
+
const offsetDiff = systemOffset - offset;
|
|
128
|
+
if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);
|
|
129
|
+
const systemDate = /* @__PURE__ */ new Date(+date);
|
|
130
|
+
systemDate.setUTCSeconds(0);
|
|
131
|
+
const systemSecondsOffset = systemOffset > 0 ? systemDate.getSeconds() : (systemDate.getSeconds() - 60) % 60;
|
|
132
|
+
const secondsOffset = Math.round(-(tzOffset(date.timeZone, date) * 60)) % 60;
|
|
133
|
+
if (secondsOffset || systemSecondsOffset) {
|
|
134
|
+
date.internal.setUTCSeconds(date.internal.getUTCSeconds() + secondsOffset);
|
|
135
|
+
Date.prototype.setUTCSeconds.call(date, Date.prototype.getUTCSeconds.call(date) + secondsOffset + systemSecondsOffset);
|
|
136
|
+
}
|
|
137
|
+
const postBaseOffset = tzOffset(date.timeZone, date);
|
|
138
|
+
const postOffset = postBaseOffset > 0 ? Math.floor(postBaseOffset) : Math.ceil(postBaseOffset);
|
|
139
|
+
const postSystemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
|
|
140
|
+
const postOffsetDiff = postSystemOffset - postOffset;
|
|
141
|
+
const offsetChanged = postOffset !== offset;
|
|
142
|
+
const postDiff = postOffsetDiff - offsetDiff;
|
|
143
|
+
if (offsetChanged && postDiff) {
|
|
144
|
+
Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);
|
|
145
|
+
const newBaseOffset = tzOffset(date.timeZone, date);
|
|
146
|
+
const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);
|
|
147
|
+
const offsetChange = postOffset - newOffset;
|
|
148
|
+
if (offsetChange) {
|
|
149
|
+
date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);
|
|
150
|
+
Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
class TZDate extends TZDateMini {
|
|
155
|
+
//#region static
|
|
156
|
+
static tz(tz, ...args) {
|
|
157
|
+
return args.length ? new TZDate(...args, tz) : new TZDate(Date.now(), tz);
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region representation
|
|
161
|
+
toISOString() {
|
|
162
|
+
const [sign, hours, minutes] = this.tzComponents();
|
|
163
|
+
const tz = `${sign}${hours}:${minutes}`;
|
|
164
|
+
return this.internal.toISOString().slice(0, -1) + tz;
|
|
165
|
+
}
|
|
166
|
+
toString() {
|
|
167
|
+
return `${this.toDateString()} ${this.toTimeString()}`;
|
|
168
|
+
}
|
|
169
|
+
toDateString() {
|
|
170
|
+
const [day, date, month, year] = this.internal.toUTCString().split(" ");
|
|
171
|
+
return `${day?.slice(0, -1)} ${month} ${date} ${year}`;
|
|
172
|
+
}
|
|
173
|
+
toTimeString() {
|
|
174
|
+
const time = this.internal.toUTCString().split(" ")[4];
|
|
175
|
+
const [sign, hours, minutes] = this.tzComponents();
|
|
176
|
+
return `${time} GMT${sign}${hours}${minutes} (${tzName(this.timeZone, this)})`;
|
|
177
|
+
}
|
|
178
|
+
toLocaleString(locales, options) {
|
|
179
|
+
return Date.prototype.toLocaleString.call(this, locales, {
|
|
180
|
+
...options,
|
|
181
|
+
timeZone: options?.timeZone || this.timeZone
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
toLocaleDateString(locales, options) {
|
|
185
|
+
return Date.prototype.toLocaleDateString.call(this, locales, {
|
|
186
|
+
...options,
|
|
187
|
+
timeZone: options?.timeZone || this.timeZone
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
toLocaleTimeString(locales, options) {
|
|
191
|
+
return Date.prototype.toLocaleTimeString.call(this, locales, {
|
|
192
|
+
...options,
|
|
193
|
+
timeZone: options?.timeZone || this.timeZone
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region private
|
|
198
|
+
tzComponents() {
|
|
199
|
+
const offset = this.getTimezoneOffset();
|
|
200
|
+
const sign = offset > 0 ? "-" : "+";
|
|
201
|
+
const hours = String(Math.floor(Math.abs(offset) / 60)).padStart(2, "0");
|
|
202
|
+
const minutes = String(Math.abs(offset) % 60).padStart(2, "0");
|
|
203
|
+
return [sign, hours, minutes];
|
|
204
|
+
}
|
|
205
|
+
//#endregion
|
|
206
|
+
withTimeZone(timeZone) {
|
|
207
|
+
return new TZDate(+this, timeZone);
|
|
208
|
+
}
|
|
209
|
+
//#region date-fns integration
|
|
210
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
|
|
211
|
+
return new TZDate(+new Date(date), this.timeZone);
|
|
212
|
+
}
|
|
213
|
+
//#endregion
|
|
214
|
+
}
|
|
215
|
+
export {
|
|
216
|
+
TZDate as T
|
|
217
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { r as requireIsExtendable } from "./is-extendable.mjs";
|
|
2
|
+
var extendShallow;
|
|
3
|
+
var hasRequiredExtendShallow;
|
|
4
|
+
function requireExtendShallow() {
|
|
5
|
+
if (hasRequiredExtendShallow) return extendShallow;
|
|
6
|
+
hasRequiredExtendShallow = 1;
|
|
7
|
+
var isObject = /* @__PURE__ */ requireIsExtendable();
|
|
8
|
+
extendShallow = function extend(o) {
|
|
9
|
+
if (!isObject(o)) {
|
|
10
|
+
o = {};
|
|
11
|
+
}
|
|
12
|
+
var len = arguments.length;
|
|
13
|
+
for (var i = 1; i < len; i++) {
|
|
14
|
+
var obj = arguments[i];
|
|
15
|
+
if (isObject(obj)) {
|
|
16
|
+
assign(o, obj);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return o;
|
|
20
|
+
};
|
|
21
|
+
function assign(a, b) {
|
|
22
|
+
for (var key in b) {
|
|
23
|
+
if (hasOwn(b, key)) {
|
|
24
|
+
a[key] = b[key];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function hasOwn(obj, key) {
|
|
29
|
+
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
30
|
+
}
|
|
31
|
+
return extendShallow;
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
requireExtendShallow as r
|
|
35
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var fastDeepEqual;
|
|
2
|
+
var hasRequiredFastDeepEqual;
|
|
3
|
+
function requireFastDeepEqual() {
|
|
4
|
+
if (hasRequiredFastDeepEqual) return fastDeepEqual;
|
|
5
|
+
hasRequiredFastDeepEqual = 1;
|
|
6
|
+
fastDeepEqual = function equal(a, b) {
|
|
7
|
+
if (a === b) return true;
|
|
8
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
9
|
+
if (a.constructor !== b.constructor) return false;
|
|
10
|
+
var length, i, keys;
|
|
11
|
+
if (Array.isArray(a)) {
|
|
12
|
+
length = a.length;
|
|
13
|
+
if (length != b.length) return false;
|
|
14
|
+
for (i = length; i-- !== 0; )
|
|
15
|
+
if (!equal(a[i], b[i])) return false;
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
19
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
20
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
21
|
+
keys = Object.keys(a);
|
|
22
|
+
length = keys.length;
|
|
23
|
+
if (length !== Object.keys(b).length) return false;
|
|
24
|
+
for (i = length; i-- !== 0; )
|
|
25
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
26
|
+
for (i = length; i-- !== 0; ) {
|
|
27
|
+
var key = keys[i];
|
|
28
|
+
if (!equal(a[key], b[key])) return false;
|
|
29
|
+
}
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
return a !== a && b !== b;
|
|
33
|
+
};
|
|
34
|
+
return fastDeepEqual;
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
requireFastDeepEqual as r
|
|
38
|
+
};
|