@arbidocs/blocks 0.4.127 → 0.4.129
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/README.md +21 -7
- package/dist/{StreamedArtifactEditor-EEYAXJ4H.cjs → StreamedArtifactEditor-TQAND4H5.cjs} +6 -5
- package/dist/StreamedArtifactEditor-TQAND4H5.cjs.map +1 -0
- package/dist/{StreamedArtifactEditor-TDATDYD2.js → StreamedArtifactEditor-XQNANTWM.js} +4 -3
- package/dist/StreamedArtifactEditor-XQNANTWM.js.map +1 -0
- package/dist/agents/index.cjs +213 -213
- package/dist/agents/index.js +2 -2
- package/dist/artifacts/ArtifactCodeView.d.ts +6 -0
- package/dist/artifacts/ArtifactPreview.d.ts +22 -0
- package/dist/artifacts/index.cjs +50 -21
- package/dist/artifacts/index.d.ts +3 -0
- package/dist/artifacts/index.js +2 -1
- package/dist/artifacts/sandbox-policy.d.ts +34 -0
- package/dist/artifacts/sandboxDocument.d.ts +7 -0
- package/dist/calendar/index.cjs +156 -243
- package/dist/calendar/index.cjs.map +1 -1
- package/dist/calendar/index.js +8 -151
- package/dist/calendar/index.js.map +1 -1
- package/dist/chat/index.cjs +90 -73
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/index.js +3 -2
- package/dist/chat/open-document.d.ts +66 -0
- package/dist/{chunk-INW76PEL.cjs → chunk-2YV7FBLO.cjs} +175 -2
- package/dist/chunk-2YV7FBLO.cjs.map +1 -0
- package/dist/{chunk-DZI7WOUD.cjs → chunk-3BJLNKOB.cjs} +6 -2
- package/dist/chunk-3BJLNKOB.cjs.map +1 -0
- package/dist/{chunk-KELGOCJA.js → chunk-65S53MZK.js} +174 -5
- package/dist/chunk-65S53MZK.js.map +1 -0
- package/dist/{chunk-T6I6ZCBE.js → chunk-6BTCDKCK.js} +6 -3
- package/dist/chunk-6BTCDKCK.js.map +1 -0
- package/dist/{chunk-ZLRQ5K77.cjs → chunk-7423V6RM.cjs} +6 -3
- package/dist/chunk-7423V6RM.cjs.map +1 -0
- package/dist/{chunk-6Z72CXZR.js → chunk-CJBN5HIS.js} +6 -2
- package/dist/chunk-CJBN5HIS.js.map +1 -0
- package/dist/{chunk-XFKF3WRN.cjs → chunk-DZYAAL4H.cjs} +2 -2
- package/dist/{chunk-XFKF3WRN.cjs.map → chunk-DZYAAL4H.cjs.map} +1 -1
- package/dist/chunk-GYCQ3FNL.js +60 -0
- package/dist/chunk-GYCQ3FNL.js.map +1 -0
- package/dist/{chunk-UUXKB3WQ.js → chunk-H2KQ6OSU.js} +2 -2
- package/dist/{chunk-UUXKB3WQ.js.map → chunk-H2KQ6OSU.js.map} +1 -1
- package/dist/{chunk-T2CVFK2I.js → chunk-HSFLEVZY.js} +3 -3
- package/dist/{chunk-T2CVFK2I.js.map → chunk-HSFLEVZY.js.map} +1 -1
- package/dist/{chunk-MCPRNDOJ.cjs → chunk-JLTXVW25.cjs} +3 -3
- package/dist/{chunk-MCPRNDOJ.cjs.map → chunk-JLTXVW25.cjs.map} +1 -1
- package/dist/chunk-NS4JD2VR.js +22 -0
- package/dist/chunk-NS4JD2VR.js.map +1 -0
- package/dist/chunk-SWQX6CTT.cjs +65 -0
- package/dist/chunk-SWQX6CTT.cjs.map +1 -0
- package/dist/chunk-TGJNPKST.js +153 -0
- package/dist/chunk-TGJNPKST.js.map +1 -0
- package/dist/chunk-TGWTLNXW.cjs +177 -0
- package/dist/chunk-TGWTLNXW.cjs.map +1 -0
- package/dist/chunk-VG24E4JJ.cjs +26 -0
- package/dist/chunk-VG24E4JJ.cjs.map +1 -0
- package/dist/components/DroppableContainer.d.ts +6 -0
- package/dist/components/GridRowNavigator.d.ts +29 -0
- package/dist/components/LoadingIndicator.d.ts +21 -0
- package/dist/components/RowNavigatorControls.d.ts +29 -0
- package/dist/components/SharedCell.d.ts +27 -0
- package/dist/connect/docx.cjs +4 -3
- package/dist/connect/docx.cjs.map +1 -1
- package/dist/connect/docx.js +3 -2
- package/dist/connect/docx.js.map +1 -1
- package/dist/connect/index.cjs +22 -20
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +12 -10
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/mail/types.d.ts +2 -6
- package/dist/facts/index.cjs +5 -23
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.d.ts +0 -1
- package/dist/facts/index.js +6 -22
- package/dist/facts/index.js.map +1 -1
- package/dist/index.cjs +616 -417
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +189 -11
- package/dist/index.js.map +1 -1
- package/dist/sandboxDocument-JLEETIWW.js +71 -0
- package/dist/sandboxDocument-JLEETIWW.js.map +1 -0
- package/dist/sandboxDocument-WQUNODSC.cjs +76 -0
- package/dist/sandboxDocument-WQUNODSC.cjs.map +1 -0
- package/dist/settings/DraggableHeader.d.ts +10 -0
- package/dist/settings/FilterChip.d.ts +15 -0
- package/dist/settings/MessageJsonTree.d.ts +7 -0
- package/dist/settings/index.cjs +248 -5
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.d.ts +3 -0
- package/dist/settings/index.js +247 -7
- package/dist/settings/index.js.map +1 -1
- package/dist/settings/message-schema-hints.d.ts +19 -0
- package/dist/studio/index.cjs +3 -2
- package/dist/studio/index.cjs.map +1 -1
- package/dist/studio/index.js +2 -1
- package/dist/studio/index.js.map +1 -1
- package/dist/workflow-canvas/index.cjs +9 -9
- package/dist/workflow-canvas/index.js +2 -2
- package/dist/workspaces/index.cjs +39 -0
- package/dist/workspaces/index.cjs.map +1 -1
- package/dist/workspaces/index.d.ts +1 -0
- package/dist/workspaces/index.js +36 -1
- package/dist/workspaces/index.js.map +1 -1
- package/dist/workspaces/workspace-type.d.ts +29 -0
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +6 -5
- package/src/docx/README.md +7 -3
- package/dist/StreamedArtifactEditor-EEYAXJ4H.cjs.map +0 -1
- package/dist/StreamedArtifactEditor-TDATDYD2.js.map +0 -1
- package/dist/chunk-6Z72CXZR.js.map +0 -1
- package/dist/chunk-DZI7WOUD.cjs.map +0 -1
- package/dist/chunk-INW76PEL.cjs.map +0 -1
- package/dist/chunk-KELGOCJA.js.map +0 -1
- package/dist/chunk-T6I6ZCBE.js.map +0 -1
- package/dist/chunk-ZLRQ5K77.cjs.map +0 -1
- package/dist/facts/timezone.d.ts +0 -4
package/dist/calendar/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { safeZone, isValidTimeZone, utcToDate, addDays, convertWall, utcToTime, zoneOffsetLabel, formatInZone, zoneCity, todayInZone, startOfWeek, formatPlainDate, addMonths, isoWeekNumber, diffDays, utcToWall, listTimeZones, zoneOffsetMinutes, wallToEpochMs, wallArrayOffset, epochToWallArray, wallToUtc } from '../chunk-TGJNPKST.js';
|
|
3
|
+
export { addDays, addMonths, convertWall, detectTimeZone, diffDays, formatInZone, formatPlainDate, isValidTimeZone, listTimeZones, safeZone, startOfWeek, todayInZone, utcToDate, utcToTime, utcToWall, wallToUtc, zoneCity, zoneOffsetLabel, zoneOffsetMinutes } from '../chunk-TGJNPKST.js';
|
|
2
4
|
import '../chunk-VUNV25KB.js';
|
|
3
5
|
import { forwardRef, useMemo, useRef, useState, useCallback, useEffect, useId } from 'react';
|
|
4
6
|
import FullCalendar from '@fullcalendar/react';
|
|
@@ -10,9 +12,9 @@ import multiMonthPlugin from '@fullcalendar/multimonth';
|
|
|
10
12
|
import { ChevronLeft, ChevronRight, Plus, Lightbulb, Workflow, ListTodo, Lock, EllipsisVertical, Globe, ChevronDown, Check, Clock, Repeat, CalendarDays, X, Video, MapPin, Users, TextAlignStart, Bell, Tag, Palette, Paperclip, Trash2, Pencil, CircleCheck, CircleX, DoorOpen, User, Sparkles } from 'lucide-react';
|
|
11
13
|
import { cn, Button, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, Input, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, Switch, Textarea, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from '@arbidocs/react/ui';
|
|
12
14
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
|
-
import { Temporal } from 'temporal-polyfill';
|
|
14
15
|
import { createPlugin } from '@fullcalendar/core';
|
|
15
16
|
import { NamedTimeZoneImpl } from '@fullcalendar/core/internal';
|
|
17
|
+
import { Temporal } from 'temporal-polyfill';
|
|
16
18
|
|
|
17
19
|
// src/calendar/labels.ts
|
|
18
20
|
var CALENDAR_DEFAULT_LABELS = {
|
|
@@ -305,151 +307,6 @@ function ColorSwatches({
|
|
|
305
307
|
))
|
|
306
308
|
] });
|
|
307
309
|
}
|
|
308
|
-
var pad2 = (n) => String(n).padStart(2, "0");
|
|
309
|
-
var pad4 = (n) => String(n).padStart(4, "0");
|
|
310
|
-
function isValidTimeZone(zone) {
|
|
311
|
-
if (!zone) return false;
|
|
312
|
-
try {
|
|
313
|
-
Temporal.Now.instant().toZonedDateTimeISO(zone);
|
|
314
|
-
return true;
|
|
315
|
-
} catch {
|
|
316
|
-
return false;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
function safeZone(zone, fallback = "UTC") {
|
|
320
|
-
if (isValidTimeZone(zone)) return zone;
|
|
321
|
-
return isValidTimeZone(fallback) ? fallback : "UTC";
|
|
322
|
-
}
|
|
323
|
-
function toPlainDateTime(wall) {
|
|
324
|
-
return /^\d{4}-\d{2}-\d{2}$/.test(wall) ? Temporal.PlainDate.from(wall).toPlainDateTime() : Temporal.PlainDateTime.from(wall);
|
|
325
|
-
}
|
|
326
|
-
function wallToUtc(wall, zone) {
|
|
327
|
-
const zdt = toPlainDateTime(wall).toZonedDateTime(safeZone(zone), {
|
|
328
|
-
disambiguation: "compatible"
|
|
329
|
-
});
|
|
330
|
-
return zdt.toInstant().toString();
|
|
331
|
-
}
|
|
332
|
-
function wallToEpochMs(wall, zone) {
|
|
333
|
-
return toPlainDateTime(wall).toZonedDateTime(safeZone(zone), { disambiguation: "compatible" }).epochMilliseconds;
|
|
334
|
-
}
|
|
335
|
-
function instantOf(utc) {
|
|
336
|
-
if (typeof utc === "number") return Temporal.Instant.fromEpochMilliseconds(utc);
|
|
337
|
-
if (utc instanceof Date) return Temporal.Instant.fromEpochMilliseconds(utc.getTime());
|
|
338
|
-
return Temporal.Instant.from(utc);
|
|
339
|
-
}
|
|
340
|
-
function zoned(utc, zone) {
|
|
341
|
-
return instantOf(utc).toZonedDateTimeISO(safeZone(zone));
|
|
342
|
-
}
|
|
343
|
-
function utcToWall(utc, zone) {
|
|
344
|
-
const z = zoned(utc, zone);
|
|
345
|
-
return `${pad4(z.year)}-${pad2(z.month)}-${pad2(z.day)}T${pad2(z.hour)}:${pad2(z.minute)}`;
|
|
346
|
-
}
|
|
347
|
-
function utcToDate(utc, zone) {
|
|
348
|
-
const z = zoned(utc, zone);
|
|
349
|
-
return `${pad4(z.year)}-${pad2(z.month)}-${pad2(z.day)}`;
|
|
350
|
-
}
|
|
351
|
-
function utcToTime(utc, zone) {
|
|
352
|
-
const z = zoned(utc, zone);
|
|
353
|
-
return `${pad2(z.hour)}:${pad2(z.minute)}`;
|
|
354
|
-
}
|
|
355
|
-
function convertWall(wall, fromZone, toZone) {
|
|
356
|
-
return utcToWall(wallToUtc(wall, fromZone), toZone);
|
|
357
|
-
}
|
|
358
|
-
function todayInZone(zone, now = Date.now()) {
|
|
359
|
-
return utcToDate(now, zone);
|
|
360
|
-
}
|
|
361
|
-
function addDays(date, days) {
|
|
362
|
-
return Temporal.PlainDate.from(date).add({ days }).toString();
|
|
363
|
-
}
|
|
364
|
-
function addMonths(date, months) {
|
|
365
|
-
return Temporal.PlainDate.from(date).add({ months }).toString();
|
|
366
|
-
}
|
|
367
|
-
function diffDays(a, b) {
|
|
368
|
-
return Temporal.PlainDate.from(a).until(Temporal.PlainDate.from(b), { largestUnit: "days" }).days;
|
|
369
|
-
}
|
|
370
|
-
function dayOfWeekSun0(date) {
|
|
371
|
-
return Temporal.PlainDate.from(date).dayOfWeek % 7;
|
|
372
|
-
}
|
|
373
|
-
function startOfWeek(date, weekStart) {
|
|
374
|
-
const back = (dayOfWeekSun0(date) - weekStart + 7) % 7;
|
|
375
|
-
return addDays(date, -back);
|
|
376
|
-
}
|
|
377
|
-
function isoWeekNumber(date) {
|
|
378
|
-
return Temporal.PlainDate.from(date).weekOfYear ?? 1;
|
|
379
|
-
}
|
|
380
|
-
function zoneOffsetMinutes(zone, at = Date.now()) {
|
|
381
|
-
return Math.round(zoned(at, zone).offsetNanoseconds / 6e10);
|
|
382
|
-
}
|
|
383
|
-
function zoneOffsetLabel(zone, at = Date.now()) {
|
|
384
|
-
const total = zoneOffsetMinutes(zone, at);
|
|
385
|
-
if (total === 0) return "GMT";
|
|
386
|
-
const sign = total > 0 ? "+" : "-";
|
|
387
|
-
const abs = Math.abs(total);
|
|
388
|
-
const h = Math.floor(abs / 60);
|
|
389
|
-
const m = abs % 60;
|
|
390
|
-
return `GMT${sign}${h}${m ? `:${pad2(m)}` : ""}`;
|
|
391
|
-
}
|
|
392
|
-
function zoneCity(zone) {
|
|
393
|
-
const last = zone.split("/").pop() ?? zone;
|
|
394
|
-
return last.replace(/_/g, " ");
|
|
395
|
-
}
|
|
396
|
-
function listTimeZones() {
|
|
397
|
-
try {
|
|
398
|
-
const fn = Intl.supportedValuesOf;
|
|
399
|
-
const zones = fn ? fn("timeZone") : [];
|
|
400
|
-
if (zones.length) return zones.includes("UTC") ? zones : ["UTC", ...zones];
|
|
401
|
-
} catch {
|
|
402
|
-
}
|
|
403
|
-
return [
|
|
404
|
-
"UTC",
|
|
405
|
-
"Europe/London",
|
|
406
|
-
"Europe/Paris",
|
|
407
|
-
"Europe/Berlin",
|
|
408
|
-
"America/New_York",
|
|
409
|
-
"America/Chicago",
|
|
410
|
-
"America/Denver",
|
|
411
|
-
"America/Los_Angeles",
|
|
412
|
-
"Asia/Tokyo",
|
|
413
|
-
"Asia/Singapore",
|
|
414
|
-
"Australia/Sydney"
|
|
415
|
-
];
|
|
416
|
-
}
|
|
417
|
-
function detectTimeZone() {
|
|
418
|
-
try {
|
|
419
|
-
return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
|
|
420
|
-
} catch {
|
|
421
|
-
return "UTC";
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
function formatInZone(utc, zone, options, locale) {
|
|
425
|
-
const ms = instantOf(utc).epochMilliseconds;
|
|
426
|
-
return new Intl.DateTimeFormat(locale, { ...options, timeZone: safeZone(zone) }).format(ms);
|
|
427
|
-
}
|
|
428
|
-
function formatPlainDate(date, options, locale) {
|
|
429
|
-
return new Intl.DateTimeFormat(locale, { ...options, timeZone: "UTC" }).format(
|
|
430
|
-
Date.parse(`${date}T12:00:00Z`)
|
|
431
|
-
);
|
|
432
|
-
}
|
|
433
|
-
function epochToWallArray(ms, zone) {
|
|
434
|
-
const z = Temporal.Instant.fromEpochMilliseconds(ms).toZonedDateTimeISO(zone);
|
|
435
|
-
return [z.year, z.month - 1, z.day, z.hour, z.minute, z.second, z.millisecond];
|
|
436
|
-
}
|
|
437
|
-
function wallArrayOffset(a, zone) {
|
|
438
|
-
const norm = new Date(
|
|
439
|
-
Date.UTC(a[0], a[1] ?? 0, a[2] ?? 1, a[3] ?? 0, a[4] ?? 0, a[5] ?? 0, a[6] ?? 0)
|
|
440
|
-
);
|
|
441
|
-
const pdt = new Temporal.PlainDateTime(
|
|
442
|
-
norm.getUTCFullYear(),
|
|
443
|
-
norm.getUTCMonth() + 1,
|
|
444
|
-
norm.getUTCDate(),
|
|
445
|
-
norm.getUTCHours(),
|
|
446
|
-
norm.getUTCMinutes(),
|
|
447
|
-
norm.getUTCSeconds(),
|
|
448
|
-
norm.getUTCMilliseconds()
|
|
449
|
-
);
|
|
450
|
-
const zdt = pdt.toZonedDateTime(zone, { disambiguation: "compatible" });
|
|
451
|
-
return Math.round(zdt.offsetNanoseconds / 6e10);
|
|
452
|
-
}
|
|
453
310
|
var temporalZonePlugin = null;
|
|
454
311
|
function getTemporalTimeZonePlugin() {
|
|
455
312
|
if (!temporalZonePlugin) {
|
|
@@ -3501,10 +3358,10 @@ function ScopeDialog({
|
|
|
3501
3358
|
}
|
|
3502
3359
|
|
|
3503
3360
|
// src/calendar/scheduling.ts
|
|
3504
|
-
var
|
|
3361
|
+
var pad2 = (n) => String(n).padStart(2, "0");
|
|
3505
3362
|
function dayWindow(date, zone, startHour = 7, endHour = 20) {
|
|
3506
|
-
const startMs = wallToEpochMs(`${date}T${
|
|
3507
|
-
const endMs = endHour >= 24 ? wallToEpochMs(`${date}T23:59`, zone) + 6e4 : wallToEpochMs(`${date}T${
|
|
3363
|
+
const startMs = wallToEpochMs(`${date}T${pad2(startHour)}:00`, zone);
|
|
3364
|
+
const endMs = endHour >= 24 ? wallToEpochMs(`${date}T23:59`, zone) + 6e4 : wallToEpochMs(`${date}T${pad2(endHour)}:00`, zone);
|
|
3508
3365
|
return { startMs, endMs };
|
|
3509
3366
|
}
|
|
3510
3367
|
function placeIntervals(intervals, win) {
|
|
@@ -3549,7 +3406,7 @@ function hourTicks(date, zone, startHour, endHour) {
|
|
|
3549
3406
|
const span = win.endMs - win.startMs;
|
|
3550
3407
|
const ticks = [];
|
|
3551
3408
|
for (let h = startHour; h < endHour; h++) {
|
|
3552
|
-
const ms = wallToEpochMs(`${date}T${
|
|
3409
|
+
const ms = wallToEpochMs(`${date}T${pad2(h)}:00`, zone);
|
|
3553
3410
|
ticks.push({ hour: h, leftPct: (ms - win.startMs) / span * 100 });
|
|
3554
3411
|
}
|
|
3555
3412
|
return ticks;
|
|
@@ -4096,6 +3953,6 @@ function CalendarSettingsForm({
|
|
|
4096
3953
|
);
|
|
4097
3954
|
}
|
|
4098
3955
|
|
|
4099
|
-
export { ARBI_WEBINAR_LABEL, CALENDAR_COLORS, CALENDAR_DEFAULT_LABELS, CALENDAR_NARROW_WIDTH, CalendarGrid, CalendarList, CalendarSettingsForm, DEFAULT_RECURRENCE_DESCRIBE_LABELS, DEFAULT_RECURRENCE_EDITOR_LABELS, DEFAULT_REMINDER_FORMAT_LABELS, EventDetails, EventEditor, MiniMonth, REMINDER_PRESETS, RRULE_WEEKDAYS, RecurrenceEditor, RoomFinder, SchedulingAssistant, ScopeDialog, TimeZonePicker,
|
|
3956
|
+
export { ARBI_WEBINAR_LABEL, CALENDAR_COLORS, CALENDAR_DEFAULT_LABELS, CALENDAR_NARROW_WIDTH, CalendarGrid, CalendarList, CalendarSettingsForm, DEFAULT_RECURRENCE_DESCRIBE_LABELS, DEFAULT_RECURRENCE_EDITOR_LABELS, DEFAULT_REMINDER_FORMAT_LABELS, EventDetails, EventEditor, MiniMonth, REMINDER_PRESETS, RRULE_WEEKDAYS, RecurrenceEditor, RoomFinder, SchedulingAssistant, ScopeDialog, TimeZonePicker, allDayInclusiveEnd, attendeeKey, buildRRule, contrastText, dayWindow, defaultRecurrenceForm, describeRecurrence, draftFromSlot, draftRangeUtc, effectiveCalendarView, eventStateClasses, formatEventWhen, formatReminder, formatZoneLabel, getTemporalTimeZonePlugin, hourTicks, isAllDayDraft, isWebinarConference, outsideIntervals, parseRRule, placeIntervals, reminderToMinutes, setDraftAllDay, setDraftEnd, setDraftStart, setPosOf, specDate, specTime, splitReminderMinutes, toBusinessHours, validateDraft, weekdayOf, workWeekHiddenDays };
|
|
4100
3957
|
//# sourceMappingURL=index.js.map
|
|
4101
3958
|
//# sourceMappingURL=index.js.map
|