@chelone/core 0.6.0 → 0.7.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.
- package/dist/assistant/assistant-session.d.ts +6 -0
- package/dist/assistant/assistant-session.js +204 -181
- package/dist/assistant/echo-transport.js +26 -29
- package/dist/assistant/http-transport.d.ts +10 -0
- package/dist/assistant/http-transport.js +98 -0
- package/dist/assistant/types.d.ts +1 -7
- package/dist/auth/access-control.d.ts +13 -5
- package/dist/auth/access-control.js +25 -21
- package/dist/auth/auth-options.d.ts +21 -17
- package/dist/auth/auth-options.js +80 -48
- package/dist/auth/permission-matrix.d.ts +12 -0
- package/dist/auth/permission-matrix.js +67 -0
- package/dist/auth/types.d.ts +14 -4
- package/dist/block-editor/block-document.d.ts +60 -0
- package/dist/block-editor/block-document.js +143 -0
- package/dist/block-editor/data-blocks.d.ts +63 -0
- package/dist/block-editor/data-blocks.js +117 -0
- package/dist/chart/chart-data.js +46 -44
- package/dist/command-menu/hotkey.js +58 -47
- package/dist/command-menu/recents.js +8 -11
- package/dist/command-menu/registry.d.ts +9 -5
- package/dist/command-menu/registry.js +36 -46
- package/dist/controller/calendar-dates.js +82 -113
- package/dist/controller/calendar-events.js +93 -88
- package/dist/controller/client-list-controller.d.ts +2 -2
- package/dist/controller/client-list-controller.js +251 -254
- package/dist/controller/data-table-columns.d.ts +2 -0
- package/dist/controller/data-table-columns.js +50 -56
- package/dist/controller/deep-equal.d.ts +1 -0
- package/dist/controller/deep-equal.js +14 -0
- package/dist/controller/filter-toggle.js +36 -44
- package/dist/controller/in-place-editor.d.ts +42 -0
- package/dist/controller/in-place-editor.js +42 -0
- package/dist/controller/infinite-list-controller.js +219 -189
- package/dist/controller/inspector.d.ts +49 -0
- package/dist/controller/inspector.js +64 -0
- package/dist/controller/job-monitor.d.ts +3 -4
- package/dist/controller/job-monitor.js +37 -47
- package/dist/controller/kanban-board.d.ts +2 -3
- package/dist/controller/kanban-board.js +43 -24
- package/dist/controller/list-controller.d.ts +5 -5
- package/dist/controller/list-controller.js +444 -400
- package/dist/controller/list-params.js +96 -87
- package/dist/controller/pivot-grid.js +89 -95
- package/dist/controller/prev-next.d.ts +2 -2
- package/dist/controller/prev-next.js +74 -54
- package/dist/controller/record-controllers.d.ts +14 -6
- package/dist/controller/record-controllers.js +288 -257
- package/dist/controller/record-diff.d.ts +21 -0
- package/dist/controller/record-diff.js +50 -0
- package/dist/controller/record-timeline.js +42 -30
- package/dist/controller/record-tree.js +57 -47
- package/dist/controller/record-workflow.d.ts +38 -16
- package/dist/controller/record-workflow.js +85 -64
- package/dist/controller/reference-many-controller.js +198 -192
- package/dist/controller/reference-one-controller.d.ts +1 -1
- package/dist/controller/reference-one-controller.js +63 -56
- package/dist/controller/saved-queries.js +104 -91
- package/dist/controller/translate-fallback.js +10 -6
- package/dist/csv/export.d.ts +2 -1
- package/dist/csv/export.js +43 -40
- package/dist/csv/import-controller.js +185 -169
- package/dist/csv/match-headers.js +29 -22
- package/dist/csv/parse-with.js +60 -54
- package/dist/csv/run-import.js +69 -72
- package/dist/csv/validate-rows.d.ts +1 -1
- package/dist/csv/validate-rows.js +65 -52
- package/dist/data/cache-ops.d.ts +5 -4
- package/dist/data/cache-ops.js +208 -188
- package/dist/data/combine-data-providers.js +25 -23
- package/dist/data/data-provider-log.d.ts +45 -0
- package/dist/data/data-provider-log.js +93 -0
- package/dist/data/errors.js +14 -10
- package/dist/data/fake-provider.d.ts +6 -3
- package/dist/data/fake-provider.js +129 -114
- package/dist/data/fetch-utils.js +61 -44
- package/dist/data/filter-branch.d.ts +5 -0
- package/dist/data/filter-branch.js +10 -0
- package/dist/data/get-many-aggregate.js +84 -76
- package/dist/data/http-error.js +17 -12
- package/dist/data/keys.js +50 -36
- package/dist/data/mutation-options.d.ts +14 -9
- package/dist/data/mutation-options.js +93 -109
- package/dist/data/query-options.js +73 -68
- package/dist/data/remove-empty.d.ts +3 -0
- package/dist/data/remove-empty.js +11 -0
- package/dist/data/undoable.d.ts +2 -2
- package/dist/data/undoable.js +190 -174
- package/dist/data/with-lifecycle-callbacks.d.ts +45 -17
- package/dist/data/with-lifecycle-callbacks.js +66 -52
- package/dist/environment/application-update-store.js +58 -55
- package/dist/environment/offline-store.js +21 -21
- package/dist/form/array-binding.d.ts +30 -11
- package/dist/form/array-binding.js +184 -166
- package/dist/form/choice-ids.d.ts +7 -0
- package/dist/form/choice-ids.js +11 -0
- package/dist/form/choices-controller.d.ts +3 -2
- package/dist/form/choices-controller.js +302 -275
- package/dist/form/date-format.d.ts +38 -0
- package/dist/form/date-format.js +89 -0
- package/dist/form/dirty-values.d.ts +2 -2
- package/dist/form/dirty-values.js +22 -11
- package/dist/form/duration.d.ts +22 -0
- package/dist/form/duration.js +49 -0
- package/dist/form/edit-create-form.d.ts +12 -5
- package/dist/form/edit-create-form.js +243 -188
- package/dist/form/event-value.d.ts +6 -0
- package/dist/form/event-value.js +17 -0
- package/dist/form/field-error.d.ts +14 -0
- package/dist/form/field-error.js +28 -0
- package/dist/form/field-name.d.ts +20 -0
- package/dist/form/field-name.js +6 -0
- package/dist/form/filter-form-values.js +63 -49
- package/dist/form/form-controller.d.ts +9 -1
- package/dist/form/form-controller.js +165 -160
- package/dist/form/form-groups.d.ts +4 -3
- package/dist/form/form-groups.js +79 -79
- package/dist/form/form-handle.d.ts +175 -0
- package/dist/form/form-handle.js +68 -0
- package/dist/form/input-binding.d.ts +56 -31
- package/dist/form/input-binding.js +169 -118
- package/dist/form/input-values.d.ts +130 -0
- package/dist/form/input-values.js +177 -0
- package/dist/form/json-text.js +51 -37
- package/dist/form/save-pipeline.d.ts +6 -8
- package/dist/form/save-pipeline.js +91 -82
- package/dist/form/set-form-values.d.ts +6 -0
- package/dist/form/set-form-values.js +10 -0
- package/dist/form/source.js +97 -65
- package/dist/form/text-of.d.ts +2 -0
- package/dist/form/text-of.js +7 -0
- package/dist/form/validators.d.ts +58 -19
- package/dist/form/validators.js +97 -71
- package/dist/geo/bbox.d.ts +5 -4
- package/dist/geo/bbox.js +69 -48
- package/dist/geo/bounds.d.ts +14 -3
- package/dist/geo/bounds.js +98 -68
- package/dist/geo/constraints.js +88 -93
- package/dist/geo/coordinates.js +31 -23
- package/dist/geo/editor.d.ts +13 -13
- package/dist/geo/editor.js +176 -153
- package/dist/geo/geocoding.d.ts +4 -4
- package/dist/geo/geocoding.js +38 -41
- package/dist/geo/geojson.d.ts +12 -74
- package/dist/geo/geojson.js +52 -40
- package/dist/geo/geometry-math.d.ts +4 -4
- package/dist/geo/geometry-math.js +100 -93
- package/dist/geo/index.d.ts +7 -6
- package/dist/geo/map-layers.d.ts +42 -7
- package/dist/geo/map-layers.js +88 -62
- package/dist/geo/map-style.js +31 -32
- package/dist/geo/messages.js +48 -45
- package/dist/geo/nominatim.js +88 -80
- package/dist/geo/osm-presets.d.ts +4 -3
- package/dist/geo/osm-presets.js +108 -86
- package/dist/geo/osm-tags.js +14 -12
- package/dist/geo/overpass.d.ts +14 -2
- package/dist/geo/overpass.js +83 -90
- package/dist/geo/shape-value.d.ts +9 -5
- package/dist/geo/shape-value.js +169 -146
- package/dist/geo/snap-to-roads.d.ts +3 -3
- package/dist/geo/snap-to-roads.js +55 -50
- package/dist/geo/throttle.js +36 -39
- package/dist/guards.d.ts +37 -0
- package/dist/guards.js +62 -0
- package/dist/i18n/default-messages.js +34 -29
- package/dist/i18n/english-messages.js +187 -189
- package/dist/i18n/i18n.d.ts +2 -2
- package/dist/i18n/i18n.js +47 -60
- package/dist/i18n/inflection.d.ts +34 -0
- package/dist/i18n/inflection.js +82 -0
- package/dist/i18n/messages.d.ts +10 -2
- package/dist/i18n/messages.js +17 -4
- package/dist/i18n/missing-keys.js +66 -62
- package/dist/i18n/translatable.d.ts +16 -1
- package/dist/i18n/translatable.js +40 -47
- package/dist/index.d.ts +71 -24
- package/dist/index.js +40 -288
- package/dist/json/deep-equal.d.ts +8 -0
- package/dist/json/deep-equal.js +24 -0
- package/dist/json/strip-json-comments.js +38 -42
- package/dist/noop.d.ts +2 -0
- package/dist/noop.js +4 -0
- package/dist/notification/error-message.d.ts +2 -0
- package/dist/notification/error-message.js +10 -0
- package/dist/notification/notification-store.d.ts +3 -2
- package/dist/notification/notification-store.js +41 -45
- package/dist/onboarding-tour/placement.js +63 -78
- package/dist/onboarding-tour/tour-controller.js +46 -54
- package/dist/realtime/add-events-for-mutations.js +75 -81
- package/dist/realtime/announce-lock.js +16 -13
- package/dist/realtime/broadcast-channel-transport.js +65 -59
- package/dist/realtime/copy-members.js +22 -14
- package/dist/realtime/in-memory-lock-provider.js +40 -48
- package/dist/realtime/live.js +95 -101
- package/dist/realtime/lock-options.js +16 -16
- package/dist/realtime/lock-session.js +91 -78
- package/dist/realtime/memory-transport.js +25 -25
- package/dist/realtime/presence.js +120 -122
- package/dist/realtime/realtime-data-provider.d.ts +10 -0
- package/dist/realtime/realtime-data-provider.js +45 -42
- package/dist/realtime/reconnect-backoff.js +17 -0
- package/dist/realtime/sse-transport.d.ts +31 -0
- package/dist/realtime/sse-transport.js +235 -0
- package/dist/realtime/status-store.js +23 -28
- package/dist/realtime/topic-hub.js +62 -71
- package/dist/realtime/topics.js +10 -12
- package/dist/realtime/types.js +10 -12
- package/dist/realtime/unread-count.js +21 -21
- package/dist/realtime/websocket-transport.d.ts +32 -0
- package/dist/realtime/websocket-transport.js +306 -0
- package/dist/resource/describe-resource.d.ts +2 -0
- package/dist/resource/describe-resource.js +232 -219
- package/dist/resource/get-at-path.js +29 -14
- package/dist/resource/identifier.d.ts +18 -0
- package/dist/resource/identifier.js +27 -0
- package/dist/resource/record.d.ts +4 -0
- package/dist/resource/record.js +10 -0
- package/dist/resource/register.d.ts +7 -0
- package/dist/resource/registry-store.d.ts +45 -15
- package/dist/resource/registry-store.js +67 -60
- package/dist/resource/registry.d.ts +10 -0
- package/dist/resource/registry.js +8 -4
- package/dist/resource/source-path.d.ts +16 -1
- package/dist/rich-text/rich-text-extras.d.ts +132 -0
- package/dist/rich-text/rich-text-extras.js +179 -0
- package/dist/rich-text/rich-text-image.d.ts +124 -0
- package/dist/rich-text/rich-text-image.js +163 -0
- package/dist/rich-text/rich-text.d.ts +6 -0
- package/dist/rich-text/rich-text.js +125 -88
- package/dist/router/location.d.ts +22 -4
- package/dist/router/location.js +41 -18
- package/dist/router/match.js +47 -39
- package/dist/router/paths.js +40 -34
- package/dist/router/record-from-location.d.ts +1 -1
- package/dist/router/record-from-location.js +25 -17
- package/dist/store/adapters.js +51 -55
- package/dist/store/micro-store.js +57 -59
- package/dist/store/shallow-equal.d.ts +12 -0
- package/dist/store/shallow-equal.js +20 -0
- package/dist/store/store.js +54 -57
- package/package.json +13 -11
package/dist/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { revalidateLogic } from "@tanstack/form-core";
|
|
2
1
|
import { createAssistantSession } from "./assistant/assistant-session.js";
|
|
3
2
|
import { echoAssistantTransport } from "./assistant/echo-transport.js";
|
|
3
|
+
import { httpAssistantTransport } from "./assistant/http-transport.js";
|
|
4
4
|
import { canAccessWithPermissions } from "./auth/access-control.js";
|
|
5
5
|
import { authStateQueryOptions, canAccessQueryOptions, checkError, identityQueryOptions, permissionsQueryOptions } from "./auth/auth-options.js";
|
|
6
|
+
import { getPermissionCell, isPermissionRowGranted, setPermissionRow, togglePermission } from "./auth/permission-matrix.js";
|
|
7
|
+
import { createBlockRegistry, describeBlockAttrs, emptyBlockDocument, getBlockDefaultAttrs, isBlockDoc, isEmptyBlockDocument, matchBlocks, toEmbedSrc, unknownBlockType, unwrapUnknownBlocks, wrapUnknownBlocks } from "./block-editor/block-document.js";
|
|
8
|
+
import { aggregateChartData, chartBlockSpec, dataBlockNames, formatDataBlockValue, pickDataBlockFields, readDataBlockValue, recordListBlockSpec, referenceRecordBlockSpec } from "./block-editor/data-blocks.js";
|
|
6
9
|
import { DEFAULT_CHART_COLORS, chartColor, getMetricDelta, hasChartValues, toCartesianRows, toDonutSlices } from "./chart/chart-data.js";
|
|
7
10
|
import { isTypingTarget, matchesHotkey, shouldHandleHotkey } from "./command-menu/hotkey.js";
|
|
8
11
|
import { recentsKey, rememberRecent } from "./command-menu/recents.js";
|
|
@@ -10,9 +13,11 @@ import { createCommandRegistry, getVisibleCommands, groupCommands } from "./comm
|
|
|
10
13
|
import { calendarDayKey, calendarDays, calendarLabels, calendarRange, parseCalendarDate, shiftCalendarAnchor } from "./controller/calendar-dates.js";
|
|
11
14
|
import { calendarEventsInHour, calendarEventsOnDay, calendarRangeFilter, groupCalendarAgenda, moveCalendarEvent, omitCalendarRangeFilter, staleCalendarRangeKeys, toCalendarEvents } from "./controller/calendar-events.js";
|
|
12
15
|
import { createClientListController } from "./controller/client-list-controller.js";
|
|
13
|
-
import { arrangeColumns, columnLabelMatches, dataTableColumnKeys, defaultDataTableStoreKey, getDataTableColumnId, moveColumn, toggleHiddenColumn } from "./controller/data-table-columns.js";
|
|
16
|
+
import { arrangeColumns, columnLabelMatches, dataTableColumnKeys, defaultDataTableStoreKey, getDataTableColumnId, moveColumn, moveColumnTo, toggleHiddenColumn } from "./controller/data-table-columns.js";
|
|
14
17
|
import { isFilterSelected, toggleFilterValue } from "./controller/filter-toggle.js";
|
|
18
|
+
import { nextInPlaceEditorState, planInPlaceSave } from "./controller/in-place-editor.js";
|
|
15
19
|
import { createInfiniteListController } from "./controller/infinite-list-controller.js";
|
|
20
|
+
import { clampInspectorPosition, configurableInputColumns, createInspector, defaultConfigurableInputsStoreKey, inspectorPositionKey } from "./controller/inspector.js";
|
|
16
21
|
import { DEFAULT_JOB_TABS, getJobActions, planJobCancel, planJobRetry } from "./controller/job-monitor.js";
|
|
17
22
|
import { buildKanbanBuckets, planKanbanMove } from "./controller/kanban-board.js";
|
|
18
23
|
import { createListController, listControllerActions } from "./controller/list-controller.js";
|
|
@@ -20,9 +25,10 @@ import { hasCustomParams, listPatchFromSearch, parseListParams, serializeListPar
|
|
|
20
25
|
import { buildPivotTable, formatPivotValue } from "./controller/pivot-grid.js";
|
|
21
26
|
import { canUseCachedPage, getPrevNextParams, resolvePrevNext } from "./controller/prev-next.js";
|
|
22
27
|
import { createCreateController, createDeleteController, createEditController, createShowController } from "./controller/record-controllers.js";
|
|
28
|
+
import { diffRecords, formatDiffValue } from "./controller/record-diff.js";
|
|
23
29
|
import { formatRelativeTime, toTimelineEntries } from "./controller/record-timeline.js";
|
|
24
30
|
import { buildRecordTree } from "./controller/record-tree.js";
|
|
25
|
-
import { buildApprovalUpdate, getAllowedTransitions, getApprovalState } from "./controller/record-workflow.js";
|
|
31
|
+
import { buildApprovalUpdate, buildRejectionUpdate, getAllowedTransitions, getApprovalState } from "./controller/record-workflow.js";
|
|
26
32
|
import { createReferenceManyController } from "./controller/reference-many-controller.js";
|
|
27
33
|
import { createReferenceOneController } from "./controller/reference-one-controller.js";
|
|
28
34
|
import { createSavedQueriesController, extractValidSavedQueries, isSavedQueryActive, savedQueriesKey } from "./controller/saved-queries.js";
|
|
@@ -35,9 +41,11 @@ import { csvErrorRows, runCsvImport } from "./csv/run-import.js";
|
|
|
35
41
|
import { applyCsvMapping, csvSchemaFields, validateCsvRows } from "./csv/validate-rows.js";
|
|
36
42
|
import { removeRecordsFromCache, updateRecordsInCache } from "./data/cache-ops.js";
|
|
37
43
|
import { combineDataProviders } from "./data/combine-data-providers.js";
|
|
44
|
+
import { createDataProviderLog } from "./data/data-provider-log.js";
|
|
38
45
|
import { ValidationError } from "./data/errors.js";
|
|
39
46
|
import { fakeDataProvider } from "./data/fake-provider.js";
|
|
40
47
|
import { fetchUtils } from "./data/fetch-utils.js";
|
|
48
|
+
import { isFilterBranch } from "./data/filter-branch.js";
|
|
41
49
|
import { getManyAggregateOptions } from "./data/get-many-aggregate.js";
|
|
42
50
|
import { HttpError } from "./data/http-error.js";
|
|
43
51
|
import { infiniteListKey, listKey, lockKey, locksKey, manyKey, manyReferenceKey, oneKey, resourceKey } from "./data/keys.js";
|
|
@@ -48,15 +56,24 @@ import { withLifecycleCallbacks } from "./data/with-lifecycle-callbacks.js";
|
|
|
48
56
|
import { createApplicationUpdateStore } from "./environment/application-update-store.js";
|
|
49
57
|
import { createOfflineStore } from "./environment/offline-store.js";
|
|
50
58
|
import { createArrayBinding } from "./form/array-binding.js";
|
|
59
|
+
import { toIdentifierList } from "./form/choice-ids.js";
|
|
51
60
|
import { createChoicesController } from "./form/choices-controller.js";
|
|
61
|
+
import { formatDate, formatDateTime, formatTime, isValidDate, isValidDateTime, isValidTime, parseDateTimeToISO, parseTimeToDate } from "./form/date-format.js";
|
|
52
62
|
import { getDirtyFormValues } from "./form/dirty-values.js";
|
|
63
|
+
import { compactDuration, parseIsoDuration, relativeDuration } from "./form/duration.js";
|
|
53
64
|
import { createCreateFormController, createEditFormController } from "./form/edit-create-form.js";
|
|
65
|
+
import { extractEventValue } from "./form/event-value.js";
|
|
66
|
+
import { firstFieldError } from "./form/field-error.js";
|
|
54
67
|
import { filterFormReflectShape, getFilterFormValues, mergeFilterValues } from "./form/filter-form-values.js";
|
|
55
68
|
import { createFormController, normalizeFormError } from "./form/form-controller.js";
|
|
56
69
|
import { createFormGroups, reduceGroupState } from "./form/form-groups.js";
|
|
70
|
+
import { createFormHandle, isResourceHandle, toFormContextHandle, toResourceFormHandle } from "./form/form-handle.js";
|
|
57
71
|
import { createFieldBinding, defaultFormat, defaultParse } from "./form/input-binding.js";
|
|
72
|
+
import { choiceIdOf, fileEntryKey, fileEntryPreview, isTransformedFile, resolveChoiceValue, toBooleanValue, toChoiceValue, toChoiceValues, toCurrencyComposite, toCurrencyValue, toDateInputValue, toFileEntries, toFileInputValue, toFileSelection, toNullableBooleanValue, toNumberValue, toTextList, toTextValue, toWebhookValue } from "./form/input-values.js";
|
|
58
73
|
import { detectJsonShape, formatJsonValue, fromJsonText, toJsonText } from "./form/json-text.js";
|
|
74
|
+
import { setFormValues } from "./form/set-form-values.js";
|
|
59
75
|
import { composeSource, createArraySourceScope, createLocaleSourceScope, createRowSourceScope, rootSourceScope } from "./form/source.js";
|
|
76
|
+
import { textOf } from "./form/text-of.js";
|
|
60
77
|
import { choices, composeValidators, email, isEmpty, isRequired, maxLength, maxValue, minLength, minValue, number, regex, required } from "./form/validators.js";
|
|
61
78
|
import { aspectLockedBBox, bboxToPolygon, polygonToBBox } from "./geo/bbox.js";
|
|
62
79
|
import { geoBounds, isLngLatBox } from "./geo/bounds.js";
|
|
@@ -64,7 +81,7 @@ import { countVertices, maxVertices, minAreaM2, minVertices, noSelfIntersection
|
|
|
64
81
|
import { latitude, longitude, toCoordinate } from "./geo/coordinates.js";
|
|
65
82
|
import { editorStyles, fromEditorFeatures, toEditorFeatures } from "./geo/editor.js";
|
|
66
83
|
import { geocodeQueryOptions, reverseGeocodeQueryOptions } from "./geo/geocoding.js";
|
|
67
|
-
import { isGeoBBox, isGeoFeature, isGeoFeatureCollection, isGeoGeometry, isGeoJsonValue } from "./geo/geojson.js";
|
|
84
|
+
import { isGeoArea, isGeoBBox, isGeoFeature, isGeoFeatureCollection, isGeoGeometry, isGeoJsonValue, placedFeatures } from "./geo/geojson.js";
|
|
68
85
|
import { areaInTypeOf, geoAreaM2, hasSelfIntersection } from "./geo/geometry-math.js";
|
|
69
86
|
import { DEFAULT_SHAPE_STYLE, asFeatureCollection, shapeLayerSpecs } from "./geo/map-layers.js";
|
|
70
87
|
import { expandTileUrl, latLngToLngLat, lngLatToLatLng, rasterTileStyle } from "./geo/map-style.js";
|
|
@@ -72,16 +89,21 @@ import { mapMessages } from "./geo/messages.js";
|
|
|
72
89
|
import { createNominatimProvider } from "./geo/nominatim.js";
|
|
73
90
|
import { OSM_PRESETS, buildOverpassQuery, findPresetForTags } from "./geo/osm-presets.js";
|
|
74
91
|
import { tagToFilter } from "./geo/osm-tags.js";
|
|
75
|
-
import { OverpassError, OverpassRateLimitError, OverpassTimeoutError, createOverpassProvider, overpassQueryOptions } from "./geo/overpass.js";
|
|
92
|
+
import { OverpassError, OverpassRateLimitError, OverpassTimeoutError, createOverpassProvider, isOverpassAnswer, overpassQueryOptions } from "./geo/overpass.js";
|
|
76
93
|
import { featuresToShape, heldFeatures, shapeToFeatures } from "./geo/shape-value.js";
|
|
77
94
|
import { createOsrmProvider } from "./geo/snap-to-roads.js";
|
|
95
|
+
import { isRecord, isThenable } from "./guards.js";
|
|
78
96
|
import { defaultMessages } from "./i18n/default-messages.js";
|
|
79
97
|
import { englishMessages } from "./i18n/english-messages.js";
|
|
80
98
|
import { createI18n } from "./i18n/i18n.js";
|
|
81
|
-
import {
|
|
99
|
+
import { humanize, humanizeField, pluralize } from "./i18n/inflection.js";
|
|
100
|
+
import { defineMessages, definedParams, pickTranslateParamValues } from "./i18n/messages.js";
|
|
82
101
|
import { createMissingKeyStore } from "./i18n/missing-keys.js";
|
|
83
102
|
import { createTranslatableController, getRecordForLocale } from "./i18n/translatable.js";
|
|
103
|
+
import { deepEqual } from "./json/deep-equal.js";
|
|
84
104
|
import { stripJsonComments } from "./json/strip-json-comments.js";
|
|
105
|
+
import { noop } from "./noop.js";
|
|
106
|
+
import { errorMessageOf } from "./notification/error-message.js";
|
|
85
107
|
import { createNotificationStore } from "./notification/notification-store.js";
|
|
86
108
|
import { placeTourCard, tourSpotlightPath } from "./onboarding-tour/placement.js";
|
|
87
109
|
import { createTourController, onboardingTourKey } from "./onboarding-tour/tour-controller.js";
|
|
@@ -94,300 +116,30 @@ import { getLockOptions, getLocksOptions } from "./realtime/lock-options.js";
|
|
|
94
116
|
import { createLockSession, resolveLockIdentity } from "./realtime/lock-session.js";
|
|
95
117
|
import { memoryTransport } from "./realtime/memory-transport.js";
|
|
96
118
|
import { createPresenceSession, getPresenceInitials, toPresenceUser } from "./realtime/presence.js";
|
|
97
|
-
import { assertRealtimeDataProvider, isRealtimeDataProvider, realtimeDataProvider } from "./realtime/realtime-data-provider.js";
|
|
119
|
+
import { assertRealtimeDataProvider, hasTransportMembers, isRealtimeDataProvider, realtimeDataProvider } from "./realtime/realtime-data-provider.js";
|
|
120
|
+
import { sseTransport } from "./realtime/sse-transport.js";
|
|
98
121
|
import { createRealtimeStatusStore } from "./realtime/status-store.js";
|
|
99
122
|
import { createTopicHub } from "./realtime/topic-hub.js";
|
|
100
123
|
import { lockResourceTopic, lockTopic, presenceTopic, recordTopic, resourceTopic } from "./realtime/topics.js";
|
|
101
124
|
import { LockConflictError } from "./realtime/types.js";
|
|
102
125
|
import { clearUnread, subscribeUnreadCount, unreadKey } from "./realtime/unread-count.js";
|
|
126
|
+
import { webSocketTransport } from "./realtime/websocket-transport.js";
|
|
103
127
|
import { describeResource } from "./resource/describe-resource.js";
|
|
104
128
|
import { getAtPath } from "./resource/get-at-path.js";
|
|
129
|
+
import { identifiersOf, isIdentifier, isIdentifierArray } from "./resource/identifier.js";
|
|
130
|
+
import { isLooseRecord, isResourceRecord } from "./resource/record.js";
|
|
105
131
|
import { defineResources } from "./resource/registry.js";
|
|
106
132
|
import { computeDefinition, createResourceRegistry } from "./resource/registry-store.js";
|
|
107
|
-
import { isSafeImageSrc, isSafeLinkUrl, richTextBlockTypes, richTextSanitizeOptions, richTextStarterKitOptions, richTextToolbarItems } from "./rich-text/rich-text.js";
|
|
108
|
-
import {
|
|
133
|
+
import { isSafeFileUrl, isSafeImageSrc, isSafeLinkUrl, richTextBlockTypes, richTextSanitizeOptions, richTextStarterKitOptions, richTextToolbarItems } from "./rich-text/rich-text.js";
|
|
134
|
+
import { checkRichTextImageFile, clampRichTextImageWidth, defaultRichTextImageRules, endColorOnEnter, normalizeRichTextUpload, richTextCodeBlockOptions, richTextColors, richTextExtraToolbarItems, richTextImageActions, richTextImageFileName, richTextStyledSanitizeOptions, sanitizeRichTextStyle } from "./rich-text/rich-text-extras.js";
|
|
135
|
+
import { copyRichTextImage, downloadRichTextImage, isRichTextImageConfigSource, prepareRichTextImages, resolveRichTextImageConfig, richTextImageAttributes, richTextImageUploadState, sanitizeRichTextImageElement, setRichTextImageUploading, storeRichTextImageFile } from "./rich-text/rich-text-image.js";
|
|
136
|
+
import { parseLocation, toLocationState } from "./router/location.js";
|
|
109
137
|
import { matchPath } from "./router/match.js";
|
|
110
138
|
import { createPath, joinBasename, removeDoubleSlashes } from "./router/paths.js";
|
|
111
139
|
import { getRecordFromLocation } from "./router/record-from-location.js";
|
|
112
140
|
import { localStorageAdapter, memoryStoreAdapter } from "./store/adapters.js";
|
|
113
141
|
import { createMicroStore } from "./store/micro-store.js";
|
|
142
|
+
import { shallowEqual } from "./store/shallow-equal.js";
|
|
114
143
|
import { createStore } from "./store/store.js";
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
DEFAULT_JOB_TABS,
|
|
118
|
-
DEFAULT_SHAPE_STYLE,
|
|
119
|
-
HttpError,
|
|
120
|
-
LockConflictError,
|
|
121
|
-
OSM_PRESETS,
|
|
122
|
-
OverpassError,
|
|
123
|
-
OverpassRateLimitError,
|
|
124
|
-
OverpassTimeoutError,
|
|
125
|
-
ValidationError,
|
|
126
|
-
addEventsForMutations,
|
|
127
|
-
announceLock,
|
|
128
|
-
applyCsvMapping,
|
|
129
|
-
areaInTypeOf,
|
|
130
|
-
arrangeColumns,
|
|
131
|
-
asFeatureCollection,
|
|
132
|
-
aspectLockedBBox,
|
|
133
|
-
assertRealtimeDataProvider,
|
|
134
|
-
authStateQueryOptions,
|
|
135
|
-
bboxToPolygon,
|
|
136
|
-
broadcastChannelTransport,
|
|
137
|
-
buildApprovalUpdate,
|
|
138
|
-
buildKanbanBuckets,
|
|
139
|
-
buildOverpassQuery,
|
|
140
|
-
buildPivotTable,
|
|
141
|
-
buildRecordTree,
|
|
142
|
-
calendarDayKey,
|
|
143
|
-
calendarDays,
|
|
144
|
-
calendarEventsInHour,
|
|
145
|
-
calendarEventsOnDay,
|
|
146
|
-
calendarLabels,
|
|
147
|
-
calendarRange,
|
|
148
|
-
calendarRangeFilter,
|
|
149
|
-
canAccessQueryOptions,
|
|
150
|
-
canAccessWithPermissions,
|
|
151
|
-
canUseCachedPage,
|
|
152
|
-
chartColor,
|
|
153
|
-
checkError,
|
|
154
|
-
choices,
|
|
155
|
-
clearUnread,
|
|
156
|
-
columnLabelMatches,
|
|
157
|
-
combineDataProviders,
|
|
158
|
-
commitAllUndoables,
|
|
159
|
-
composeSource,
|
|
160
|
-
composeValidators,
|
|
161
|
-
computeDefinition,
|
|
162
|
-
countVertices,
|
|
163
|
-
createApplicationUpdateStore,
|
|
164
|
-
createArrayBinding,
|
|
165
|
-
createArraySourceScope,
|
|
166
|
-
createAssistantSession,
|
|
167
|
-
createChoicesController,
|
|
168
|
-
createClientListController,
|
|
169
|
-
createCommandRegistry,
|
|
170
|
-
createCreateController,
|
|
171
|
-
createCreateFormController,
|
|
172
|
-
createCsvImportController,
|
|
173
|
-
createDeleteController,
|
|
174
|
-
createEditController,
|
|
175
|
-
createEditFormController,
|
|
176
|
-
createFieldBinding,
|
|
177
|
-
createFormController,
|
|
178
|
-
createFormGroups,
|
|
179
|
-
createI18n,
|
|
180
|
-
createInfiniteListController,
|
|
181
|
-
createListController,
|
|
182
|
-
createLocaleSourceScope,
|
|
183
|
-
createLockSession,
|
|
184
|
-
createMicroStore,
|
|
185
|
-
createMissingKeyStore,
|
|
186
|
-
createMutationOptions,
|
|
187
|
-
createNominatimProvider,
|
|
188
|
-
createNotificationStore,
|
|
189
|
-
createOfflineStore,
|
|
190
|
-
createOsrmProvider,
|
|
191
|
-
createOverpassProvider,
|
|
192
|
-
createPath,
|
|
193
|
-
createPresenceSession,
|
|
194
|
-
createRealtimeStatusStore,
|
|
195
|
-
createReferenceManyController,
|
|
196
|
-
createReferenceOneController,
|
|
197
|
-
createResourceRegistry,
|
|
198
|
-
createRowSourceScope,
|
|
199
|
-
createSavedQueriesController,
|
|
200
|
-
createShowController,
|
|
201
|
-
createStore,
|
|
202
|
-
createTopicHub,
|
|
203
|
-
createTourController,
|
|
204
|
-
createTranslatableController,
|
|
205
|
-
csvErrorRows,
|
|
206
|
-
csvSchemaFields,
|
|
207
|
-
dataTableColumnKeys,
|
|
208
|
-
defaultDataTableStoreKey,
|
|
209
|
-
defaultExporter,
|
|
210
|
-
defaultFormat,
|
|
211
|
-
defaultMessages,
|
|
212
|
-
defaultParse,
|
|
213
|
-
defineMessages,
|
|
214
|
-
defineResources,
|
|
215
|
-
deleteMutationOptions,
|
|
216
|
-
describeResource,
|
|
217
|
-
detectJsonShape,
|
|
218
|
-
downloadCSV,
|
|
219
|
-
echoAssistantTransport,
|
|
220
|
-
editorStyles,
|
|
221
|
-
email,
|
|
222
|
-
englishMessages,
|
|
223
|
-
expandTileUrl,
|
|
224
|
-
extractValidSavedQueries,
|
|
225
|
-
fakeDataProvider,
|
|
226
|
-
featuresToShape,
|
|
227
|
-
fetchUtils,
|
|
228
|
-
filterFormReflectShape,
|
|
229
|
-
findPresetForTags,
|
|
230
|
-
formatJsonValue,
|
|
231
|
-
formatPivotValue,
|
|
232
|
-
formatRelativeTime,
|
|
233
|
-
fromEditorFeatures,
|
|
234
|
-
fromJsonText,
|
|
235
|
-
geoAreaM2,
|
|
236
|
-
geoBounds,
|
|
237
|
-
geocodeQueryOptions,
|
|
238
|
-
getAllowedTransitions,
|
|
239
|
-
getApprovalState,
|
|
240
|
-
getAtPath,
|
|
241
|
-
getDataTableColumnId,
|
|
242
|
-
getDirtyFormValues,
|
|
243
|
-
getFilterFormValues,
|
|
244
|
-
getInfiniteListOptions,
|
|
245
|
-
getJobActions,
|
|
246
|
-
getListOptions,
|
|
247
|
-
getLockOptions,
|
|
248
|
-
getLocksOptions,
|
|
249
|
-
getManyAggregateOptions,
|
|
250
|
-
getManyOptions,
|
|
251
|
-
getManyReferenceOptions,
|
|
252
|
-
getMetricDelta,
|
|
253
|
-
getOneOptions,
|
|
254
|
-
getPresenceInitials,
|
|
255
|
-
getPrevNextParams,
|
|
256
|
-
getRecordForLocale,
|
|
257
|
-
getRecordFromLocation,
|
|
258
|
-
getVisibleCommands,
|
|
259
|
-
groupCalendarAgenda,
|
|
260
|
-
groupCommands,
|
|
261
|
-
hasChartValues,
|
|
262
|
-
hasCustomParams,
|
|
263
|
-
hasPendingUndoables,
|
|
264
|
-
hasSelfIntersection,
|
|
265
|
-
heldFeatures,
|
|
266
|
-
identityQueryOptions,
|
|
267
|
-
inMemoryLockProvider,
|
|
268
|
-
infiniteListKey,
|
|
269
|
-
isEmpty,
|
|
270
|
-
isFilterSelected,
|
|
271
|
-
isGeoBBox,
|
|
272
|
-
isGeoFeature,
|
|
273
|
-
isGeoFeatureCollection,
|
|
274
|
-
isGeoGeometry,
|
|
275
|
-
isGeoJsonValue,
|
|
276
|
-
isLngLatBox,
|
|
277
|
-
isRealtimeDataProvider,
|
|
278
|
-
isRequired,
|
|
279
|
-
isSafeImageSrc,
|
|
280
|
-
isSafeLinkUrl,
|
|
281
|
-
isSavedQueryActive,
|
|
282
|
-
isTypingTarget,
|
|
283
|
-
joinBasename,
|
|
284
|
-
latLngToLngLat,
|
|
285
|
-
latitude,
|
|
286
|
-
listControllerActions,
|
|
287
|
-
listKey,
|
|
288
|
-
listPatchFromSearch,
|
|
289
|
-
lngLatToLatLng,
|
|
290
|
-
localStorageAdapter,
|
|
291
|
-
lockKey,
|
|
292
|
-
lockResourceTopic,
|
|
293
|
-
lockTopic,
|
|
294
|
-
locksKey,
|
|
295
|
-
longitude,
|
|
296
|
-
manyKey,
|
|
297
|
-
manyReferenceKey,
|
|
298
|
-
mapMessages,
|
|
299
|
-
matchCsvHeaders,
|
|
300
|
-
matchPath,
|
|
301
|
-
matchesHotkey,
|
|
302
|
-
maxLength,
|
|
303
|
-
maxValue,
|
|
304
|
-
maxVertices,
|
|
305
|
-
memoryStoreAdapter,
|
|
306
|
-
memoryTransport,
|
|
307
|
-
mergeFilterValues,
|
|
308
|
-
minAreaM2,
|
|
309
|
-
minLength,
|
|
310
|
-
minValue,
|
|
311
|
-
minVertices,
|
|
312
|
-
moveCalendarEvent,
|
|
313
|
-
moveColumn,
|
|
314
|
-
noSelfIntersection,
|
|
315
|
-
normalizeFormError,
|
|
316
|
-
number,
|
|
317
|
-
omitCalendarRangeFilter,
|
|
318
|
-
onboardingTourKey,
|
|
319
|
-
oneKey,
|
|
320
|
-
overpassQueryOptions,
|
|
321
|
-
parseCalendarDate,
|
|
322
|
-
parseCsvWith,
|
|
323
|
-
parseListParams,
|
|
324
|
-
parseLocation,
|
|
325
|
-
patchedRecord,
|
|
326
|
-
permissionsQueryOptions,
|
|
327
|
-
placeTourCard,
|
|
328
|
-
planJobCancel,
|
|
329
|
-
planJobRetry,
|
|
330
|
-
planKanbanMove,
|
|
331
|
-
polygonToBBox,
|
|
332
|
-
presenceTopic,
|
|
333
|
-
rasterTileStyle,
|
|
334
|
-
realtimeDataProvider,
|
|
335
|
-
recentsKey,
|
|
336
|
-
recordTopic,
|
|
337
|
-
recordsToCSV,
|
|
338
|
-
reduceGroupState,
|
|
339
|
-
regex,
|
|
340
|
-
rememberRecent,
|
|
341
|
-
removeDoubleSlashes,
|
|
342
|
-
removeRecordsFromCache,
|
|
343
|
-
required,
|
|
344
|
-
resolveLockIdentity,
|
|
345
|
-
resolveNotificationKey,
|
|
346
|
-
resolvePrevNext,
|
|
347
|
-
resourceKey,
|
|
348
|
-
resourceTopic,
|
|
349
|
-
revalidateLogic,
|
|
350
|
-
reverseGeocodeQueryOptions,
|
|
351
|
-
richTextBlockTypes,
|
|
352
|
-
richTextSanitizeOptions,
|
|
353
|
-
richTextStarterKitOptions,
|
|
354
|
-
richTextToolbarItems,
|
|
355
|
-
rootSourceScope,
|
|
356
|
-
runCsvImport,
|
|
357
|
-
savedQueriesKey,
|
|
358
|
-
serializeListParams,
|
|
359
|
-
serializeListState,
|
|
360
|
-
shapeLayerSpecs,
|
|
361
|
-
shapeToFeatures,
|
|
362
|
-
shiftCalendarAnchor,
|
|
363
|
-
shouldHandleHotkey,
|
|
364
|
-
staleCalendarRangeKeys,
|
|
365
|
-
startUndoableMutation,
|
|
366
|
-
stripJsonComments,
|
|
367
|
-
subscribeLiveLock,
|
|
368
|
-
subscribeLiveLocks,
|
|
369
|
-
subscribeLiveRecord,
|
|
370
|
-
subscribeLiveRecords,
|
|
371
|
-
subscribeLiveResource,
|
|
372
|
-
subscribeUnreadCount,
|
|
373
|
-
tagToFilter,
|
|
374
|
-
toCalendarEvents,
|
|
375
|
-
toCartesianRows,
|
|
376
|
-
toCoordinate,
|
|
377
|
-
toDonutSlices,
|
|
378
|
-
toEditorFeatures,
|
|
379
|
-
toJsonText,
|
|
380
|
-
toPresenceUser,
|
|
381
|
-
toTimelineEntries,
|
|
382
|
-
toggleFilterValue,
|
|
383
|
-
toggleHiddenColumn,
|
|
384
|
-
tourSpotlightPath,
|
|
385
|
-
undoableCallbacks,
|
|
386
|
-
undoableDeleteOptions,
|
|
387
|
-
undoableUpdateOptions,
|
|
388
|
-
unreadKey,
|
|
389
|
-
updateMutationOptions,
|
|
390
|
-
updateRecordsInCache,
|
|
391
|
-
validateCsvRows,
|
|
392
|
-
withLifecycleCallbacks
|
|
393
|
-
};
|
|
144
|
+
import { revalidateLogic } from "@tanstack/form-core";
|
|
145
|
+
export { DEFAULT_CHART_COLORS, DEFAULT_JOB_TABS, DEFAULT_SHAPE_STYLE, HttpError, LockConflictError, OSM_PRESETS, OverpassError, OverpassRateLimitError, OverpassTimeoutError, ValidationError, addEventsForMutations, aggregateChartData, announceLock, applyCsvMapping, areaInTypeOf, arrangeColumns, asFeatureCollection, aspectLockedBBox, assertRealtimeDataProvider, authStateQueryOptions, bboxToPolygon, broadcastChannelTransport, buildApprovalUpdate, buildKanbanBuckets, buildOverpassQuery, buildPivotTable, buildRecordTree, buildRejectionUpdate, calendarDayKey, calendarDays, calendarEventsInHour, calendarEventsOnDay, calendarLabels, calendarRange, calendarRangeFilter, canAccessQueryOptions, canAccessWithPermissions, canUseCachedPage, chartBlockSpec, chartColor, checkError, checkRichTextImageFile, choiceIdOf, choices, clampInspectorPosition, clampRichTextImageWidth, clearUnread, columnLabelMatches, combineDataProviders, commitAllUndoables, compactDuration, composeSource, composeValidators, computeDefinition, configurableInputColumns, copyRichTextImage, countVertices, createApplicationUpdateStore, createArrayBinding, createArraySourceScope, createAssistantSession, createBlockRegistry, createChoicesController, createClientListController, createCommandRegistry, createCreateController, createCreateFormController, createCsvImportController, createDataProviderLog, createDeleteController, createEditController, createEditFormController, createFieldBinding, createFormController, createFormGroups, createFormHandle, createI18n, createInfiniteListController, createInspector, createListController, createLocaleSourceScope, createLockSession, createMicroStore, createMissingKeyStore, createMutationOptions, createNominatimProvider, createNotificationStore, createOfflineStore, createOsrmProvider, createOverpassProvider, createPath, createPresenceSession, createRealtimeStatusStore, createReferenceManyController, createReferenceOneController, createResourceRegistry, createRowSourceScope, createSavedQueriesController, createShowController, createStore, createTopicHub, createTourController, createTranslatableController, csvErrorRows, csvSchemaFields, dataBlockNames, dataTableColumnKeys, deepEqual, defaultConfigurableInputsStoreKey, defaultDataTableStoreKey, defaultExporter, defaultFormat, defaultMessages, defaultParse, defaultRichTextImageRules, defineMessages, defineResources, definedParams, deleteMutationOptions, describeBlockAttrs, describeResource, detectJsonShape, diffRecords, downloadCSV, downloadRichTextImage, echoAssistantTransport, editorStyles, email, emptyBlockDocument, endColorOnEnter, englishMessages, errorMessageOf, expandTileUrl, extractEventValue, extractValidSavedQueries, fakeDataProvider, featuresToShape, fetchUtils, fileEntryKey, fileEntryPreview, filterFormReflectShape, findPresetForTags, firstFieldError, formatDataBlockValue, formatDate, formatDateTime, formatDiffValue, formatJsonValue, formatPivotValue, formatRelativeTime, formatTime, fromEditorFeatures, fromJsonText, geoAreaM2, geoBounds, geocodeQueryOptions, getAllowedTransitions, getApprovalState, getAtPath, getBlockDefaultAttrs, getDataTableColumnId, getDirtyFormValues, getFilterFormValues, getInfiniteListOptions, getJobActions, getListOptions, getLockOptions, getLocksOptions, getManyAggregateOptions, getManyOptions, getManyReferenceOptions, getMetricDelta, getOneOptions, getPermissionCell, getPresenceInitials, getPrevNextParams, getRecordForLocale, getRecordFromLocation, getVisibleCommands, groupCalendarAgenda, groupCommands, hasChartValues, hasCustomParams, hasPendingUndoables, hasSelfIntersection, hasTransportMembers, heldFeatures, httpAssistantTransport, humanize, humanizeField, identifiersOf, identityQueryOptions, inMemoryLockProvider, infiniteListKey, inspectorPositionKey, isBlockDoc, isEmpty, isEmptyBlockDocument, isFilterBranch, isFilterSelected, isGeoArea, isGeoBBox, isGeoFeature, isGeoFeatureCollection, isGeoGeometry, isGeoJsonValue, isIdentifier, isIdentifierArray, isLngLatBox, isLooseRecord, isOverpassAnswer, isPermissionRowGranted, isRealtimeDataProvider, isRecord, isRequired, isResourceHandle, isResourceRecord, isRichTextImageConfigSource, isSafeFileUrl, isSafeImageSrc, isSafeLinkUrl, isSavedQueryActive, isThenable, isTransformedFile, isTypingTarget, isValidDate, isValidDateTime, isValidTime, joinBasename, latLngToLngLat, latitude, listControllerActions, listKey, listPatchFromSearch, lngLatToLatLng, localStorageAdapter, lockKey, lockResourceTopic, lockTopic, locksKey, longitude, manyKey, manyReferenceKey, mapMessages, matchBlocks, matchCsvHeaders, matchPath, matchesHotkey, maxLength, maxValue, maxVertices, memoryStoreAdapter, memoryTransport, mergeFilterValues, minAreaM2, minLength, minValue, minVertices, moveCalendarEvent, moveColumn, moveColumnTo, nextInPlaceEditorState, noSelfIntersection, noop, normalizeFormError, normalizeRichTextUpload, number, omitCalendarRangeFilter, onboardingTourKey, oneKey, overpassQueryOptions, parseCalendarDate, parseCsvWith, parseDateTimeToISO, parseIsoDuration, parseListParams, parseLocation, parseTimeToDate, patchedRecord, permissionsQueryOptions, pickDataBlockFields, pickTranslateParamValues, placeTourCard, placedFeatures, planInPlaceSave, planJobCancel, planJobRetry, planKanbanMove, pluralize, polygonToBBox, prepareRichTextImages, presenceTopic, rasterTileStyle, readDataBlockValue, realtimeDataProvider, recentsKey, recordListBlockSpec, recordTopic, recordsToCSV, reduceGroupState, referenceRecordBlockSpec, regex, relativeDuration, rememberRecent, removeDoubleSlashes, removeRecordsFromCache, required, resolveChoiceValue, resolveLockIdentity, resolveNotificationKey, resolvePrevNext, resolveRichTextImageConfig, resourceKey, resourceTopic, revalidateLogic, reverseGeocodeQueryOptions, richTextBlockTypes, richTextCodeBlockOptions, richTextColors, richTextExtraToolbarItems, richTextImageActions, richTextImageAttributes, richTextImageFileName, richTextImageUploadState, richTextSanitizeOptions, richTextStarterKitOptions, richTextStyledSanitizeOptions, richTextToolbarItems, rootSourceScope, runCsvImport, sanitizeRichTextImageElement, sanitizeRichTextStyle, savedQueriesKey, serializeListParams, serializeListState, setFormValues, setPermissionRow, setRichTextImageUploading, shallowEqual, shapeLayerSpecs, shapeToFeatures, shiftCalendarAnchor, shouldHandleHotkey, sseTransport, staleCalendarRangeKeys, startUndoableMutation, storeRichTextImageFile, stripJsonComments, subscribeLiveLock, subscribeLiveLocks, subscribeLiveRecord, subscribeLiveRecords, subscribeLiveResource, subscribeUnreadCount, tagToFilter, textOf, toBooleanValue, toCalendarEvents, toCartesianRows, toChoiceValue, toChoiceValues, toCoordinate, toCurrencyComposite, toCurrencyValue, toDateInputValue, toDonutSlices, toEditorFeatures, toEmbedSrc, toFileEntries, toFileInputValue, toFileSelection, toFormContextHandle, toIdentifierList, toJsonText, toLocationState, toNullableBooleanValue, toNumberValue, toPresenceUser, toResourceFormHandle, toTextList, toTextValue, toTimelineEntries, toWebhookValue, toggleFilterValue, toggleHiddenColumn, togglePermission, tourSpotlightPath, undoableCallbacks, undoableDeleteOptions, undoableUpdateOptions, unknownBlockType, unreadKey, unwrapUnknownBlocks, updateMutationOptions, updateRecordsInCache, validateCsvRows, webSocketTransport, withLifecycleCallbacks, wrapUnknownBlocks };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Are `a` and `b` the same value? `===` answers for anything that is the same
|
|
3
|
+
* value; arrays compare by order and length; plain objects compare by content
|
|
4
|
+
* whatever order their keys were written in. A key whose value is `undefined`
|
|
5
|
+
* counts as absent, the way `JSON.stringify` counts it. Anything that is not a
|
|
6
|
+
* plain object - a Date, a Map, a class instance - is equal to itself only.
|
|
7
|
+
*/
|
|
8
|
+
export declare function deepEqual<T>(a: T, b: T): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { isPlainObject } from "../guards.js";
|
|
2
|
+
// src/json/deep-equal.ts
|
|
3
|
+
/**
|
|
4
|
+
* Are `a` and `b` the same value? `===` answers for anything that is the same
|
|
5
|
+
* value; arrays compare by order and length; plain objects compare by content
|
|
6
|
+
* whatever order their keys were written in. A key whose value is `undefined`
|
|
7
|
+
* counts as absent, the way `JSON.stringify` counts it. Anything that is not a
|
|
8
|
+
* plain object - a Date, a Map, a class instance - is equal to itself only.
|
|
9
|
+
*/
|
|
10
|
+
function deepEqual(a, b) {
|
|
11
|
+
return a === b || sameContent(a, b);
|
|
12
|
+
}
|
|
13
|
+
function sameContent(a, b) {
|
|
14
|
+
if (a === b) return true;
|
|
15
|
+
if (Array.isArray(a)) return Array.isArray(b) && sameList(a, b);
|
|
16
|
+
if (!isPlainObject(a) || !isPlainObject(b)) return false;
|
|
17
|
+
const keys = Object.keys(a).filter((key) => a[key] !== void 0);
|
|
18
|
+
const others = Object.keys(b).filter((key) => b[key] !== void 0);
|
|
19
|
+
return keys.length === others.length && keys.every((key) => sameContent(a[key], b[key]));
|
|
20
|
+
}
|
|
21
|
+
function sameList(a, b) {
|
|
22
|
+
return a.length === b.length && a.every((item, index) => sameContent(item, b[index]));
|
|
23
|
+
}
|
|
24
|
+
export { deepEqual };
|
|
@@ -1,50 +1,46 @@
|
|
|
1
|
+
// src/json/strip-json-comments.ts
|
|
2
|
+
/** The index just past the string literal that starts at `start`. */
|
|
1
3
|
function skipString(text, start) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
let i = start + 1;
|
|
5
|
+
while (i < text.length && text[i] !== "\"") i += text[i] === "\\" ? 2 : 1;
|
|
6
|
+
return i + 1;
|
|
5
7
|
}
|
|
6
8
|
function removeComments(text) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} else {
|
|
21
|
-
out += text[i++];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return out;
|
|
9
|
+
let out = "";
|
|
10
|
+
let i = 0;
|
|
11
|
+
while (i < text.length) if (text[i] === "\"") {
|
|
12
|
+
const end = skipString(text, i);
|
|
13
|
+
out += text.slice(i, end);
|
|
14
|
+
i = end;
|
|
15
|
+
} else if (text[i] === "/" && text[i + 1] === "/") while (i < text.length && text[i] !== "\n") i++;
|
|
16
|
+
else if (text[i] === "/" && text[i + 1] === "*") {
|
|
17
|
+
const end = text.indexOf("*/", i + 2);
|
|
18
|
+
i = end === -1 ? text.length : end + 2;
|
|
19
|
+
out += " ";
|
|
20
|
+
} else out += text[i++];
|
|
21
|
+
return out;
|
|
25
22
|
}
|
|
26
23
|
function removeTrailingCommas(text) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
out += text[i++];
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return out;
|
|
24
|
+
let out = "";
|
|
25
|
+
let i = 0;
|
|
26
|
+
while (i < text.length) if (text[i] === "\"") {
|
|
27
|
+
const end = skipString(text, i);
|
|
28
|
+
out += text.slice(i, end);
|
|
29
|
+
i = end;
|
|
30
|
+
} else if (text[i] === ",") {
|
|
31
|
+
let next = i + 1;
|
|
32
|
+
while (/\s/.test(text[next] ?? "")) next++;
|
|
33
|
+
if (text[next] !== "}" && text[next] !== "]") out += ",";
|
|
34
|
+
i++;
|
|
35
|
+
} else out += text[i++];
|
|
36
|
+
return out;
|
|
44
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Removes comments and trailing commas from JSON text, the two things Monaco
|
|
40
|
+
* tolerates when `allowComments` is on and `JSON.parse` does not. String
|
|
41
|
+
* contents are left alone.
|
|
42
|
+
*/
|
|
45
43
|
function stripJsonComments(text) {
|
|
46
|
-
|
|
44
|
+
return removeTrailingCommas(removeComments(text));
|
|
47
45
|
}
|
|
48
|
-
export {
|
|
49
|
-
stripJsonComments
|
|
50
|
-
};
|
|
46
|
+
export { stripJsonComments };
|
package/dist/noop.d.ts
ADDED
package/dist/noop.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/notification/error-message.ts
|
|
2
|
+
/** The text of a thrown value: a string, or the `message` of an object. */
|
|
3
|
+
function errorMessageOf(error) {
|
|
4
|
+
if (typeof error === "string") return error === "" ? void 0 : error;
|
|
5
|
+
if (typeof error === "object" && error !== null && "message" in error) {
|
|
6
|
+
const { message } = error;
|
|
7
|
+
if (typeof message === "string" && message !== "") return message;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export { errorMessageOf };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { TranslateParamValues } from "../i18n/messages.js";
|
|
1
2
|
export interface Notification {
|
|
2
3
|
id: number;
|
|
3
4
|
/** An i18n message KEY — translation/rendering is the UI layer's job. */
|
|
4
5
|
message: string;
|
|
5
6
|
type: "info" | "success" | "warning" | "error";
|
|
6
|
-
messageArgs?:
|
|
7
|
+
messageArgs?: TranslateParamValues;
|
|
7
8
|
/**
|
|
8
9
|
* True for optimistic-with-Undo notifications: the adapter renders an Undo
|
|
9
10
|
* action and treats auto-hide/dismiss as a COMMIT (via `onClose`).
|
|
@@ -29,7 +30,7 @@ export interface Notification {
|
|
|
29
30
|
/** The caller-facing options for `notify` (id and derived fields excluded). */
|
|
30
31
|
export interface NotifyOptions {
|
|
31
32
|
type?: Notification["type"];
|
|
32
|
-
messageArgs?:
|
|
33
|
+
messageArgs?: TranslateParamValues;
|
|
33
34
|
undoable?: boolean;
|
|
34
35
|
autoHideDuration?: number;
|
|
35
36
|
undo?: () => void;
|