mindoodb-app-sdk 0.0.59 → 0.0.61

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as MindooDBAppAttachmentPreviewMode, a as MindooDBAppDragBindSourceOptions, b as MindooDBAppDragStartInput, c as MindooDBAppDragStartResult, d as MindooDBAppDragPreview, e as MindooDBAppBridge, f as MindooDBAppAgentToolErrorCode, g as MindooDBAppHostShortcutBinding, h as MindooDBAppHostShortcutAction, i as MindooDBAppHostingMode, j as MindooDBAppDefinition, k as MindooDBAppDatabase, l as MindooDBAppDocument, m as MindooDBAppRichTextSpan, n as MindooDBAppRichTextSnapshot, o as MindooDBAppCreateDocumentInput } from './types-DkzIJKBw.js';
2
- export { p as MINDOODB_APP_ACCEPTS_MAX, q as MINDOODB_APP_DEFINITION_FILE_NAME, r as MINDOODB_APP_DEFINITION_FORMAT, s as MINDOODB_APP_DEFINITION_PERMISSIONS, t as MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS, u as MINDOODB_APP_DEFINITION_VERSION, v as MINDOODB_APP_LISTING_DESCRIPTION_MAX, w as MINDOODB_APP_LISTING_MAX_SCREENSHOTS, x as MINDOODB_APP_LISTING_SUMMARY_MAX, y as MINDOODB_APP_SEAL_SIGNING_DOMAIN, z as MINDOODB_APP_WELL_KNOWN_DRAG_TYPES, A as MindooDBAppAcceptSpec, B as MindooDBAppAccessDecision, C as MindooDBAppAccessTier, D as MindooDBAppAgentApi, E as MindooDBAppAgentRegistration, F as MindooDBAppAgentTool, G as MindooDBAppAgentToolAnnotations, H as MindooDBAppAgentToolDescriptor, I as MindooDBAppAttachmentApi, J as MindooDBAppAttachmentChunk, K as MindooDBAppAttachmentInfo, L as MindooDBAppAttachmentPreviewOptions, N as MindooDBAppAttachmentPreviewSession, O as MindooDBAppAutomergeChangesPatch, P as MindooDBAppAutomergeChangesSince, Q as MindooDBAppAutomergeGetOptions, R as MindooDBAppAutomergePatchResult, S as MindooDBAppAutomergeSnapshot, T as MindooDBAppBridgeAgentInvokeMessage, U as MindooDBAppBridgeAgentResultMessage, V as MindooDBAppBridgeBeforeCloseAck, W as MindooDBAppBridgeBeforeCloseMessage, X as MindooDBAppBridgeConnectMessage, Y as MindooDBAppBridgeConnectOptions, Z as MindooDBAppBridgeConnectedMessage, _ as MindooDBAppBridgeDragDropMessage, $ as MindooDBAppBridgeDragLeaveMessage, a0 as MindooDBAppBridgeDragOverMessage, a1 as MindooDBAppBridgeErrorPayload, a2 as MindooDBAppBridgeHandshakeErrorMessage, a3 as MindooDBAppBridgeHostFocusChangedMessage, a4 as MindooDBAppBridgeIncomingContentMessage, a5 as MindooDBAppBridgeLocaleChangedMessage, a6 as MindooDBAppBridgePortMessage, a7 as MindooDBAppBridgeQueryResultMessage, a8 as MindooDBAppBridgeRpcError, a9 as MindooDBAppBridgeRpcMessage, aa as MindooDBAppBridgeRpcRequest, ab as MindooDBAppBridgeRpcSuccess, ac as MindooDBAppBridgeShortcutInvokedMessage, ad as MindooDBAppBridgeShortcutsChangedMessage, ae as MindooDBAppBridgeStreamAbortRequest, af as MindooDBAppBridgeStreamAck, ag as MindooDBAppBridgeStreamCloseRequest, ah as MindooDBAppBridgeStreamError, ai as MindooDBAppBridgeStreamMessage, aj as MindooDBAppBridgeStreamOpenResult, ak as MindooDBAppBridgeStreamReadRequest, al as MindooDBAppBridgeStreamWriteRequest, am as MindooDBAppBridgeThemeChangedMessage, an as MindooDBAppBridgeUiPreferencesChangedMessage, ao as MindooDBAppBridgeViewChangedMessage, ap as MindooDBAppBridgeViewportChangedMessage, aq as MindooDBAppBridgeWorkspaceFocusRequestedMessage, ar as MindooDBAppBrowserFeatures, as as MindooDBAppCapability, at as MindooDBAppConfiguredViewCategorizationStyle, au as MindooDBAppConfiguredViewColumn, av as MindooDBAppConfiguredViewColumnRole, aw as MindooDBAppConfiguredViewExpressionMode, ax as MindooDBAppConfiguredViewFieldExpression, ay as MindooDBAppConfiguredViewFilterDefinition, az as MindooDBAppConfiguredViewFilterMode, aA as MindooDBAppConfiguredViewFilterRule, aB as MindooDBAppConfiguredViewFormulaExpression, aC as MindooDBAppConfiguredViewFormulaFilterDefinition, aD as MindooDBAppConfiguredViewPreviewMode, aE as MindooDBAppConfiguredViewRuleFilterDefinition, aF as MindooDBAppConfiguredViewRuleMatchMode, aG as MindooDBAppConfiguredViewRuleOperator, aH as MindooDBAppConfiguredViewValueExpression, aI as MindooDBAppCreateKeyInfo, aJ as MindooDBAppCreateViewInput, aK as MindooDBAppCreateViewNavigatorInput, aL as MindooDBAppDatabaseInfo, aM as MindooDBAppDefinitionDatabase, aN as MindooDBAppDefinitionListing, aO as MindooDBAppDefinitionPermission, aP as MindooDBAppDefinitionRegistrationPermission, aQ as MindooDBAppDefinitionScreenshot, aR as MindooDBAppDefinitionValidation, aS as MindooDBAppDirectoryApi, aT as MindooDBAppDirectoryEntry, aU as MindooDBAppDocumentApi, aV as MindooDBAppDocumentHeadCursorResult, aW as MindooDBAppDocumentHistoryEntry, aX as MindooDBAppDocumentListQuery, aY as MindooDBAppDocumentListResult, aZ as MindooDBAppDocumentQuery, a_ as MindooDBAppDocumentRevisionId, a$ as MindooDBAppDocumentScanPreset, b0 as MindooDBAppDocumentSummary, b1 as MindooDBAppDragApi, b2 as MindooDBAppDragCancelReason, b3 as MindooDBAppDragDropEvent, b4 as MindooDBAppDragEffect, b5 as MindooDBAppDragHoverResult, b6 as MindooDBAppDragOffer, b7 as MindooDBAppDragOverEvent, b8 as MindooDBAppDragPointer, b9 as MindooDBAppDragProfile, ba as MindooDBAppEntryAttachmentRef, bb as MindooDBAppEntryProvenance, bc as MindooDBAppExtractDocumentTextInput, bd as MindooDBAppExtractDocumentTextResult, be as MindooDBAppExtractTextFormat, bf as MindooDBAppExtractionSetup, bg as MindooDBAppFulltextSetup, bh as MindooDBAppHistoricalDocument, bi as MindooDBAppHistoryQuery, bj as MindooDBAppHostTheme, bk as MindooDBAppIdentityApi, bl as MindooDBAppInaccessibleDocument, bm as MindooDBAppInaccessibleDocumentListQuery, bn as MindooDBAppInaccessibleDocumentListResult, bo as MindooDBAppIncomingContent, bp as MindooDBAppIncomingContentHandler, bq as MindooDBAppIncomingContentInfo, br as MindooDBAppIncomingItem, bs as MindooDBAppIncomingItemInfo, bt as MindooDBAppIncomingResult, bu as MindooDBAppIncomingSource, bv as MindooDBAppJsonCounterIncrementPatch, bw as MindooDBAppJsonListDeletePatch, bx as MindooDBAppJsonListInsertPatch, by as MindooDBAppJsonPatch, bz as MindooDBAppJsonSetPatch, bA as MindooDBAppJsonTextMarkPatch, bB as MindooDBAppJsonTextSplicePatch, bC as MindooDBAppJsonTextUnmarkPatch, bD as MindooDBAppJsonUnsetPatch, bE as MindooDBAppLaunchContext, bF as MindooDBAppListUsersOptions, bG as MindooDBAppListUsersPage, bH as MindooDBAppLiveQuerySubscription, bI as MindooDBAppLocalizedText, bJ as MindooDBAppMenuAnchor, bK as MindooDBAppMenuApi, bL as MindooDBAppMenuCommandItem, bM as MindooDBAppMenuDismissReason, bN as MindooDBAppMenuDismissedResult, bO as MindooDBAppMenuItem, bP as MindooDBAppMenuKind, bQ as MindooDBAppMenuPlacement, bR as MindooDBAppMenuPointAnchor, bS as MindooDBAppMenuRect, bT as MindooDBAppMenuRectAnchor, bU as MindooDBAppMenuSelectionResult, bV as MindooDBAppMenuSeparatorItem, bW as MindooDBAppNotificationSeverity, bX as MindooDBAppNotifyInput, bY as MindooDBAppNotifyResult, bZ as MindooDBAppProposeAppInput, b_ as MindooDBAppProposeAppResult, b$ as MindooDBAppQueryCoverage, c0 as MindooDBAppQueryInclude, c1 as MindooDBAppQueryIncludeCardinality, c2 as MindooDBAppQueryIncludeSlots, c3 as MindooDBAppQueryResult, c4 as MindooDBAppQueryRow, c5 as MindooDBAppQuerySortKey, c6 as MindooDBAppQueryTextClause, c7 as MindooDBAppReadableAttachmentStream, c8 as MindooDBAppRecipientOptions, c9 as MindooDBAppResolvedViewDefinition, ca as MindooDBAppResolvedViewSource, cb as MindooDBAppRevisionPhase, cc as MindooDBAppRevisionVerification, cd as MindooDBAppRichTextBlockSpan, ce as MindooDBAppRichTextGetOptions, cf as MindooDBAppRichTextImmutableString, cg as MindooDBAppRichTextMarkRange, ch as MindooDBAppRichTextMaterializeValue, ci as MindooDBAppRichTextPatch, cj as MindooDBAppRichTextScalar, ck as MindooDBAppRichTextSpliceStep, cl as MindooDBAppRichTextStep, cm as MindooDBAppRichTextStepPatch, cn as MindooDBAppRichTextTextSpan, co as MindooDBAppRuntime, cp as MindooDBAppScanAttachmentOptions, cq as MindooDBAppScanAttachmentResult, cr as MindooDBAppScopedDocId, cs as MindooDBAppScopedDocumentSummary, ct as MindooDBAppSealIntent, cu as MindooDBAppSealedChannelOpenInput, cv as MindooDBAppSealedChannelOpenResult, cw as MindooDBAppSealedChannelRequestInput, cx as MindooDBAppSession, cy as MindooDBAppShowMenuInput, cz as MindooDBAppShowMenuResult, cA as MindooDBAppSignPreview, cB as MindooDBAppSignPreviewScope, cC as MindooDBAppSignStatementInput, cD as MindooDBAppSignStatementResult, cE as MindooDBAppStorageApi, cF as MindooDBAppSummarySetup, cG as MindooDBAppTextCursorOptions, cH as MindooDBAppTextCursorPosition, cI as MindooDBAppTextCursorPositionsResult, cJ as MindooDBAppTextCursorsResult, cK as MindooDBAppTextEdit, cL as MindooDBAppTextPatch, cM as MindooDBAppThemeMode, cN as MindooDBAppTimestampApi, cO as MindooDBAppTimestampInput, cP as MindooDBAppTimestampProvider, cQ as MindooDBAppTimestampResult, cR as MindooDBAppUiPreferences, cS as MindooDBAppUpdateDocumentInput, cT as MindooDBAppViewCursorDocumentListResult, cU as MindooDBAppViewCursorResult, cV as MindooDBAppViewEntry, cW as MindooDBAppViewEntryKind, cX as MindooDBAppViewNavigator, cY as MindooDBAppViewNavigatorExpansionState, cZ as MindooDBAppViewNavigatorOpenOptions, c_ as MindooDBAppViewNavigatorPageOptions, c$ as MindooDBAppViewNavigatorPageResult, d0 as MindooDBAppViewNavigatorRangeQuery, d1 as MindooDBAppViewNavigatorSelectionState, d2 as MindooDBAppViewUpdateStats, d3 as MindooDBAppViewport, d4 as MindooDBAppWellKnownDragType, d5 as MindooDBAppWritableAttachmentStream, d6 as mindooDBAppAcceptMatchesType, d7 as resolveMindooDBAppDefinitionUrl, d8 as resolveMindooDBAppListingAssetUrl, d9 as resolveMindooDBAppLocalizedText, da as validateMindooDBAppAccepts, db as validateMindooDBAppDefinition } from './types-DkzIJKBw.js';
1
+ import { M as MindooDBAppAttachmentPreviewMode, a as MindooDBAppDragBindSourceOptions, b as MindooDBAppDragStartInput, c as MindooDBAppDragStartResult, d as MindooDBAppDragPreview, e as MindooDBAppBridge, f as MindooDBAppAgentToolErrorCode, g as MindooDBAppHostShortcutBinding, h as MindooDBAppHostShortcutAction, i as MindooDBAppHostingMode, j as MindooDBAppDefinition, k as MindooDBAppDatabase, l as MindooDBAppDocument, m as MindooDBAppRichTextSpan, n as MindooDBAppRichTextSnapshot, o as MindooDBAppCreateDocumentInput } from './types-BKN_Zh_l.js';
2
+ export { p as MINDOODB_APP_ACCEPTS_MAX, q as MINDOODB_APP_COMPONENTS_MAX, r as MINDOODB_APP_DEFINITION_FILE_NAME, s as MINDOODB_APP_DEFINITION_FORMAT, t as MINDOODB_APP_DEFINITION_PERMISSIONS, u as MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS, v as MINDOODB_APP_DEFINITION_VERSION, w as MINDOODB_APP_LISTING_DESCRIPTION_MAX, x as MINDOODB_APP_LISTING_MAX_SCREENSHOTS, y as MINDOODB_APP_LISTING_SUMMARY_MAX, z as MINDOODB_APP_SEAL_SIGNING_DOMAIN, A as MINDOODB_APP_WELL_KNOWN_DRAG_TYPES, B as MindooDBAppAcceptSpec, C as MindooDBAppAccessDecision, D as MindooDBAppAccessTier, E as MindooDBAppAgentApi, F as MindooDBAppAgentRegistration, G as MindooDBAppAgentTool, H as MindooDBAppAgentToolAnnotations, I as MindooDBAppAgentToolDescriptor, J as MindooDBAppAttachmentApi, K as MindooDBAppAttachmentChunk, L as MindooDBAppAttachmentInfo, N as MindooDBAppAttachmentPreviewOptions, O as MindooDBAppAttachmentPreviewSession, P as MindooDBAppAutomergeChangesPatch, Q as MindooDBAppAutomergeChangesSince, R as MindooDBAppAutomergeGetOptions, S as MindooDBAppAutomergePatchResult, T as MindooDBAppAutomergeSnapshot, U as MindooDBAppBridgeAgentInvokeMessage, V as MindooDBAppBridgeAgentResultMessage, W as MindooDBAppBridgeBeforeCloseAck, X as MindooDBAppBridgeBeforeCloseMessage, Y as MindooDBAppBridgeConnectMessage, Z as MindooDBAppBridgeConnectOptions, _ as MindooDBAppBridgeConnectedMessage, $ as MindooDBAppBridgeDragDropMessage, a0 as MindooDBAppBridgeDragLeaveMessage, a1 as MindooDBAppBridgeDragOverMessage, a2 as MindooDBAppBridgeEmbedEventMessage, a3 as MindooDBAppBridgeErrorPayload, a4 as MindooDBAppBridgeHandshakeErrorMessage, a5 as MindooDBAppBridgeHostFocusChangedMessage, a6 as MindooDBAppBridgeIncomingContentMessage, a7 as MindooDBAppBridgeLocaleChangedMessage, a8 as MindooDBAppBridgePortMessage, a9 as MindooDBAppBridgeQueryResultMessage, aa as MindooDBAppBridgeRpcError, ab as MindooDBAppBridgeRpcMessage, ac as MindooDBAppBridgeRpcRequest, ad as MindooDBAppBridgeRpcSuccess, ae as MindooDBAppBridgeShortcutInvokedMessage, af as MindooDBAppBridgeShortcutsChangedMessage, ag as MindooDBAppBridgeStreamAbortRequest, ah as MindooDBAppBridgeStreamAck, ai as MindooDBAppBridgeStreamCloseRequest, aj as MindooDBAppBridgeStreamError, ak as MindooDBAppBridgeStreamMessage, al as MindooDBAppBridgeStreamOpenResult, am as MindooDBAppBridgeStreamReadRequest, an as MindooDBAppBridgeStreamWriteRequest, ao as MindooDBAppBridgeThemeChangedMessage, ap as MindooDBAppBridgeUiPreferencesChangedMessage, aq as MindooDBAppBridgeViewChangedMessage, ar as MindooDBAppBridgeViewportChangedMessage, as as MindooDBAppBridgeWorkspaceFocusRequestedMessage, at as MindooDBAppBrowserFeatures, au as MindooDBAppCapability, av as MindooDBAppComponentChildren, aw as MindooDBAppComponentFieldValue, ax as MindooDBAppComponentInfo, ay as MindooDBAppComponentIntent, az as MindooDBAppComponentQuery, aA as MindooDBAppComponentSpec, aB as MindooDBAppComponentsApi, aC as MindooDBAppConfiguredViewCategorizationStyle, aD as MindooDBAppConfiguredViewColumn, aE as MindooDBAppConfiguredViewColumnRole, aF as MindooDBAppConfiguredViewExpressionMode, aG as MindooDBAppConfiguredViewFieldExpression, aH as MindooDBAppConfiguredViewFilterDefinition, aI as MindooDBAppConfiguredViewFilterMode, aJ as MindooDBAppConfiguredViewFilterRule, aK as MindooDBAppConfiguredViewFormulaExpression, aL as MindooDBAppConfiguredViewFormulaFilterDefinition, aM as MindooDBAppConfiguredViewPreviewMode, aN as MindooDBAppConfiguredViewRuleFilterDefinition, aO as MindooDBAppConfiguredViewRuleMatchMode, aP as MindooDBAppConfiguredViewRuleOperator, aQ as MindooDBAppConfiguredViewValueExpression, aR as MindooDBAppCreateKeyInfo, aS as MindooDBAppCreateViewInput, aT as MindooDBAppCreateViewNavigatorInput, aU as MindooDBAppDatabaseInfo, aV as MindooDBAppDefinitionDatabase, aW as MindooDBAppDefinitionListing, aX as MindooDBAppDefinitionPermission, aY as MindooDBAppDefinitionRegistrationPermission, aZ as MindooDBAppDefinitionScreenshot, a_ as MindooDBAppDefinitionValidation, a$ as MindooDBAppDirectoryApi, b0 as MindooDBAppDirectoryEntry, b1 as MindooDBAppDocumentApi, b2 as MindooDBAppDocumentHeadCursorResult, b3 as MindooDBAppDocumentHistoryEntry, b4 as MindooDBAppDocumentListQuery, b5 as MindooDBAppDocumentListResult, b6 as MindooDBAppDocumentQuery, b7 as MindooDBAppDocumentRevisionId, b8 as MindooDBAppDocumentScanPreset, b9 as MindooDBAppDocumentSummary, ba as MindooDBAppDragApi, bb as MindooDBAppDragCancelReason, bc as MindooDBAppDragDropEvent, bd as MindooDBAppDragEffect, be as MindooDBAppDragHoverResult, bf as MindooDBAppDragOffer, bg as MindooDBAppDragOverEvent, bh as MindooDBAppDragPointer, bi as MindooDBAppDragProfile, bj as MindooDBAppEmbed, bk as MindooDBAppEmbedCloseReason, bl as MindooDBAppEmbedClosedEvent, bm as MindooDBAppEmbedContext, bn as MindooDBAppEmbedOpenInput, bo as MindooDBAppEmbedRect, bp as MindooDBAppEmbeddingApi, bq as MindooDBAppEmbedsApi, br as MindooDBAppEntryAttachmentRef, bs as MindooDBAppEntryProvenance, bt as MindooDBAppExtractDocumentTextInput, bu as MindooDBAppExtractDocumentTextResult, bv as MindooDBAppExtractTextFormat, bw as MindooDBAppExtractionSetup, bx as MindooDBAppFulltextSetup, by as MindooDBAppHistoricalDocument, bz as MindooDBAppHistoryQuery, bA as MindooDBAppHostTheme, bB as MindooDBAppIdentityApi, bC as MindooDBAppInaccessibleDocument, bD as MindooDBAppInaccessibleDocumentListQuery, bE as MindooDBAppInaccessibleDocumentListResult, bF as MindooDBAppIncomingContent, bG as MindooDBAppIncomingContentHandler, bH as MindooDBAppIncomingContentInfo, bI as MindooDBAppIncomingItem, bJ as MindooDBAppIncomingItemInfo, bK as MindooDBAppIncomingResult, bL as MindooDBAppIncomingSource, bM as MindooDBAppJsonCounterIncrementPatch, bN as MindooDBAppJsonListDeletePatch, bO as MindooDBAppJsonListInsertPatch, bP as MindooDBAppJsonPatch, bQ as MindooDBAppJsonSetPatch, bR as MindooDBAppJsonTextMarkPatch, bS as MindooDBAppJsonTextSplicePatch, bT as MindooDBAppJsonTextUnmarkPatch, bU as MindooDBAppJsonUnsetPatch, bV as MindooDBAppLaunchContext, bW as MindooDBAppListUsersOptions, bX as MindooDBAppListUsersPage, bY as MindooDBAppLiveQuerySubscription, bZ as MindooDBAppLocalizedText, b_ as MindooDBAppMenuAnchor, b$ as MindooDBAppMenuApi, c0 as MindooDBAppMenuCommandItem, c1 as MindooDBAppMenuDismissReason, c2 as MindooDBAppMenuDismissedResult, c3 as MindooDBAppMenuItem, c4 as MindooDBAppMenuKind, c5 as MindooDBAppMenuPlacement, c6 as MindooDBAppMenuPointAnchor, c7 as MindooDBAppMenuRect, c8 as MindooDBAppMenuRectAnchor, c9 as MindooDBAppMenuSelectionResult, ca as MindooDBAppMenuSeparatorItem, cb as MindooDBAppNotificationSeverity, cc as MindooDBAppNotifyInput, cd as MindooDBAppNotifyResult, ce as MindooDBAppProposeAppInput, cf as MindooDBAppProposeAppResult, cg as MindooDBAppQueryCoverage, ch as MindooDBAppQueryInclude, ci as MindooDBAppQueryIncludeCardinality, cj as MindooDBAppQueryIncludeSlots, ck as MindooDBAppQueryResult, cl as MindooDBAppQueryRow, cm as MindooDBAppQuerySortKey, cn as MindooDBAppQueryTextClause, co as MindooDBAppReadableAttachmentStream, cp as MindooDBAppRecipientOptions, cq as MindooDBAppResolvedViewDefinition, cr as MindooDBAppResolvedViewSource, cs as MindooDBAppRevisionPhase, ct as MindooDBAppRevisionVerification, cu as MindooDBAppRichTextBlockSpan, cv as MindooDBAppRichTextGetOptions, cw as MindooDBAppRichTextImmutableString, cx as MindooDBAppRichTextMarkRange, cy as MindooDBAppRichTextMaterializeValue, cz as MindooDBAppRichTextPatch, cA as MindooDBAppRichTextScalar, cB as MindooDBAppRichTextSpliceStep, cC as MindooDBAppRichTextStep, cD as MindooDBAppRichTextStepPatch, cE as MindooDBAppRichTextTextSpan, cF as MindooDBAppRuntime, cG as MindooDBAppScanAttachmentOptions, cH as MindooDBAppScanAttachmentResult, cI as MindooDBAppScopedDocId, cJ as MindooDBAppScopedDocumentSummary, cK as MindooDBAppSealIntent, cL as MindooDBAppSealedChannelOpenInput, cM as MindooDBAppSealedChannelOpenResult, cN as MindooDBAppSealedChannelRequestInput, cO as MindooDBAppSession, cP as MindooDBAppShowMenuInput, cQ as MindooDBAppShowMenuResult, cR as MindooDBAppSignPreview, cS as MindooDBAppSignPreviewScope, cT as MindooDBAppSignStatementInput, cU as MindooDBAppSignStatementResult, cV as MindooDBAppStorageApi, cW as MindooDBAppSummarySetup, cX as MindooDBAppTextCursorOptions, cY as MindooDBAppTextCursorPosition, cZ as MindooDBAppTextCursorPositionsResult, c_ as MindooDBAppTextCursorsResult, c$ as MindooDBAppTextEdit, d0 as MindooDBAppTextPatch, d1 as MindooDBAppThemeMode, d2 as MindooDBAppTimestampApi, d3 as MindooDBAppTimestampInput, d4 as MindooDBAppTimestampProvider, d5 as MindooDBAppTimestampResult, d6 as MindooDBAppUiPreferences, d7 as MindooDBAppUpdateDocumentInput, d8 as MindooDBAppViewCursorDocumentListResult, d9 as MindooDBAppViewCursorResult, da as MindooDBAppViewEntry, db as MindooDBAppViewEntryKind, dc as MindooDBAppViewNavigator, dd as MindooDBAppViewNavigatorExpansionState, de as MindooDBAppViewNavigatorOpenOptions, df as MindooDBAppViewNavigatorPageOptions, dg as MindooDBAppViewNavigatorPageResult, dh as MindooDBAppViewNavigatorRangeQuery, di as MindooDBAppViewNavigatorSelectionState, dj as MindooDBAppViewUpdateStats, dk as MindooDBAppViewport, dl as MindooDBAppWellKnownDragType, dm as MindooDBAppWritableAttachmentStream, dn as mindooDBAppAcceptMatchesType, dp as mindooDBAppComponentFieldsMatch, dq as resolveMindooDBAppDefinitionUrl, dr as resolveMindooDBAppListingAssetUrl, ds as resolveMindooDBAppLocalizedText, dt as validateMindooDBAppAccepts, du as validateMindooDBAppComponents, dv as validateMindooDBAppDefinition } from './types-BKN_Zh_l.js';
3
3
  export { M as MINDOODB_APP_BUNDLE_ARCHIVE_FILE_NAME, a as MINDOODB_APP_BUNDLE_MANIFEST_FILE_NAME, b as MINDOODB_APP_BUNDLE_MANIFEST_FORMAT, c as MINDOODB_APP_BUNDLE_MANIFEST_VERSION, d as MindooDBAppBundleArchive, e as MindooDBAppBundleFileEntry, f as MindooDBAppBundleHash, g as MindooDBAppBundleManifest, h as MindooDBAppBundleManifestValidation, i as buildMindooDBAppBundleContentHashInput, j as isMindooDBAppBundleHash, n as normalizeMindooDBAppBundlePath, v as validateMindooDBAppBundleManifest } from './appBundleManifest-B0xfpaXG.js';
4
4
  import { MindooDBAppBooleanExpression } from 'mindoodb-view-language';
5
5
  export { MindooDBAppBooleanExpression, MindooDBAppExpression, MindooDBAppFilterDefinition, MindooDBAppViewCategoryChildrenPageRequest, MindooDBAppViewColumn, MindooDBAppViewColumnRole, MindooDBAppViewDefinition, MindooDBAppViewExpansionState, MindooDBAppViewExpressionBase, MindooDBAppViewExpressionDatePart, MindooDBAppViewExpressionOperation, MindooDBAppViewFieldExpression, MindooDBAppViewIfExpression, MindooDBAppViewLetExpression, MindooDBAppViewLiteralExpression, MindooDBAppViewLookupByPath, MindooDBAppViewOperationExpression, MindooDBAppViewOriginExpression, MindooDBAppViewPageRequest, MindooDBAppViewPageResult, MindooDBAppViewRow, MindooDBAppViewSortDirection, MindooDBAppViewTotalMode, MindooDBAppViewValueExpressionRef, MindooDBAppViewVariableExpression, createViewLanguage } from 'mindoodb-view-language';
package/dist/index.js CHANGED
@@ -2,6 +2,16 @@ import {
2
2
  DEFAULT_DRAG_LONG_PRESS_MS,
3
3
  DEFAULT_DRAG_POINTER_THRESHOLD_PX,
4
4
  DEFAULT_HAVEN_HOST_SHORTCUTS,
5
+ MINDOODB_APP_ACCEPTS_MAX,
6
+ MINDOODB_APP_COMPONENTS_MAX,
7
+ MINDOODB_APP_DEFINITION_FILE_NAME,
8
+ MINDOODB_APP_DEFINITION_FORMAT,
9
+ MINDOODB_APP_DEFINITION_PERMISSIONS,
10
+ MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS,
11
+ MINDOODB_APP_DEFINITION_VERSION,
12
+ MINDOODB_APP_LISTING_DESCRIPTION_MAX,
13
+ MINDOODB_APP_LISTING_MAX_SCREENSHOTS,
14
+ MINDOODB_APP_LISTING_SUMMARY_MAX,
5
15
  MINDOODB_APP_MAX_DRAG_PAYLOAD_BYTES,
6
16
  MINDOODB_APP_MAX_DRAG_PREVIEW_BYTES,
7
17
  MINDOODB_APP_MAX_DRAG_PREVIEW_EDGE,
@@ -22,14 +32,22 @@ import {
22
32
  isMindooDBAppDragType,
23
33
  isValidMindooDBDocumentId,
24
34
  matchHostShortcut,
35
+ mindooDBAppAcceptMatchesType,
36
+ mindooDBAppComponentFieldsMatch,
25
37
  mindooDBDocumentId,
26
38
  normalizeDragAccepts,
27
39
  normalizeDragPointerInput,
28
40
  normalizeDragStartInput,
29
41
  releaseMindooDBAppBridgeSessions,
42
+ resolveMindooDBAppDefinitionUrl,
43
+ resolveMindooDBAppListingAssetUrl,
44
+ resolveMindooDBAppLocalizedText,
30
45
  sanitizeHostShortcutBindings,
31
- snapshotElementToPng
32
- } from "./chunk-SKPP4T6S.js";
46
+ snapshotElementToPng,
47
+ validateMindooDBAppAccepts,
48
+ validateMindooDBAppComponents,
49
+ validateMindooDBAppDefinition
50
+ } from "./chunk-U4NXI7EH.js";
33
51
  import {
34
52
  MINDOODB_APP_BUNDLE_ARCHIVE_FILE_NAME,
35
53
  MINDOODB_APP_BUNDLE_MANIFEST_FILE_NAME,
@@ -50,514 +68,6 @@ var MINDOODB_APP_WELL_KNOWN_DRAG_TYPES = [
50
68
  ];
51
69
  var MINDOODB_APP_SEAL_SIGNING_DOMAIN = "mindoodb-seal/v1";
52
70
 
53
- // src/appDefinition.ts
54
- var MINDOODB_APP_DEFINITION_FORMAT = "mindoodb.haven.app";
55
- var MINDOODB_APP_DEFINITION_VERSION = 1;
56
- var MINDOODB_APP_DEFINITION_FILE_NAME = "haven-app.json";
57
- var MINDOODB_APP_DEFINITION_PERMISSIONS = [
58
- "write",
59
- "delete",
60
- "history",
61
- "attachments",
62
- "views",
63
- "sign",
64
- "timestamps",
65
- "directory",
66
- "sealedchannel",
67
- "proposeapps"
68
- ];
69
- var MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS = ["proposeapps"];
70
- var MINDOODB_APP_LISTING_SUMMARY_MAX = 300;
71
- var MINDOODB_APP_LISTING_DESCRIPTION_MAX = 4e3;
72
- var MINDOODB_APP_LISTING_MAX_SCREENSHOTS = 8;
73
- var LOGICAL_DATABASE_ID_PATTERN = /^[a-z0-9][a-z0-9._-]*$/i;
74
- function isPlainObject(value) {
75
- return typeof value === "object" && value !== null && !Array.isArray(value);
76
- }
77
- function readOptionalString(raw, key, errors) {
78
- const value = raw[key];
79
- if (value === void 0 || value === null) {
80
- return void 0;
81
- }
82
- if (typeof value !== "string") {
83
- errors.push(`App definition ${key} must be a string.`);
84
- return void 0;
85
- }
86
- const trimmed = value.trim();
87
- return trimmed || void 0;
88
- }
89
- function readOptionalBoolean(raw, key, errors) {
90
- const value = raw[key];
91
- if (value === void 0 || value === null) {
92
- return void 0;
93
- }
94
- if (typeof value !== "boolean") {
95
- errors.push(`App definition ${key} must be a boolean.`);
96
- return void 0;
97
- }
98
- return value || void 0;
99
- }
100
- function readStringRecord(raw, key, errors) {
101
- const value = raw[key];
102
- if (value === void 0 || value === null) {
103
- return void 0;
104
- }
105
- if (!isPlainObject(value)) {
106
- errors.push(`App definition ${key} must be an object of string values.`);
107
- return void 0;
108
- }
109
- const result = {};
110
- for (const [entryKey, entryValue] of Object.entries(value)) {
111
- if (typeof entryValue !== "string") {
112
- errors.push(`App definition ${key}.${entryKey} must be a string.`);
113
- continue;
114
- }
115
- result[entryKey] = entryValue;
116
- }
117
- return Object.keys(result).length ? result : void 0;
118
- }
119
- function readPermissions(value, label, allowed, errors) {
120
- if (value === void 0 || value === null) {
121
- return void 0;
122
- }
123
- if (!Array.isArray(value)) {
124
- errors.push(`${label} must be an array of permission names.`);
125
- return void 0;
126
- }
127
- const result = [];
128
- for (const entry of value) {
129
- if (typeof entry !== "string" || !allowed.includes(entry)) {
130
- errors.push(`${label} contains the unknown permission ${JSON.stringify(entry)}.`);
131
- continue;
132
- }
133
- if (!result.includes(entry)) {
134
- result.push(entry);
135
- }
136
- }
137
- return result.length ? result : void 0;
138
- }
139
- function readNetworkAllowlist(value, errors) {
140
- if (value === void 0 || value === null) {
141
- return void 0;
142
- }
143
- if (!Array.isArray(value)) {
144
- errors.push("App definition networkAllowlist must be an array of origins.");
145
- return void 0;
146
- }
147
- const result = [];
148
- for (const entry of value) {
149
- if (typeof entry !== "string" || !entry.trim()) {
150
- errors.push(`App definition networkAllowlist contains the invalid entry ${JSON.stringify(entry)}.`);
151
- continue;
152
- }
153
- const trimmed = entry.trim();
154
- if (!result.includes(trimmed)) {
155
- result.push(trimmed);
156
- }
157
- }
158
- return result.length ? result : void 0;
159
- }
160
- function readDatabases(value, errors) {
161
- if (value === void 0 || value === null) {
162
- return void 0;
163
- }
164
- if (!Array.isArray(value)) {
165
- errors.push("App definition databases must be an array.");
166
- return void 0;
167
- }
168
- const result = [];
169
- const seen = /* @__PURE__ */ new Set();
170
- value.forEach((entry, index) => {
171
- if (!isPlainObject(entry)) {
172
- errors.push(`App definition database #${index} must be an object.`);
173
- return;
174
- }
175
- const logicalDatabaseId = typeof entry.logicalDatabaseId === "string" ? entry.logicalDatabaseId.trim() : "";
176
- if (!logicalDatabaseId) {
177
- errors.push(`App definition database #${index} is missing a non-empty logicalDatabaseId.`);
178
- return;
179
- }
180
- if (!LOGICAL_DATABASE_ID_PATTERN.test(logicalDatabaseId)) {
181
- errors.push(
182
- `App definition database "${logicalDatabaseId}" must match ${String(LOGICAL_DATABASE_ID_PATTERN)}.`
183
- );
184
- return;
185
- }
186
- if (seen.has(logicalDatabaseId)) {
187
- errors.push(`App definition lists the database "${logicalDatabaseId}" more than once.`);
188
- return;
189
- }
190
- seen.add(logicalDatabaseId);
191
- const databaseId = typeof entry.databaseId === "string" ? entry.databaseId.trim() : "";
192
- if (entry.databaseId !== void 0 && entry.databaseId !== null && !databaseId) {
193
- errors.push(`App definition database "${logicalDatabaseId}" has an empty databaseId.`);
194
- }
195
- result.push({
196
- logicalDatabaseId,
197
- label: typeof entry.label === "string" && entry.label.trim() ? entry.label.trim() : void 0,
198
- databaseId: databaseId || void 0,
199
- permissions: readPermissions(
200
- entry.permissions,
201
- `App definition database "${logicalDatabaseId}" permissions`,
202
- MINDOODB_APP_DEFINITION_PERMISSIONS.filter(
203
- (permission) => !MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS.includes(permission)
204
- ),
205
- errors
206
- ),
207
- create: entry.create === false ? false : void 0
208
- });
209
- });
210
- return result.length ? result : void 0;
211
- }
212
- function readLocalizedText(value, label, maxLength, errors) {
213
- if (value === void 0 || value === null) {
214
- return void 0;
215
- }
216
- if (typeof value === "string") {
217
- const trimmed = value.trim();
218
- if (trimmed.length > maxLength) {
219
- errors.push(`${label} must not be longer than ${maxLength} characters.`);
220
- return void 0;
221
- }
222
- return trimmed || void 0;
223
- }
224
- if (!isPlainObject(value)) {
225
- errors.push(`${label} must be a string or an object of per-locale strings.`);
226
- return void 0;
227
- }
228
- const result = {};
229
- for (const [locale, text] of Object.entries(value)) {
230
- if (typeof text !== "string") {
231
- errors.push(`${label}.${locale} must be a string.`);
232
- continue;
233
- }
234
- const trimmed = text.trim();
235
- if (trimmed.length > maxLength) {
236
- errors.push(`${label}.${locale} must not be longer than ${maxLength} characters.`);
237
- continue;
238
- }
239
- if (trimmed) {
240
- result[locale] = trimmed;
241
- }
242
- }
243
- if (!Object.keys(result).length) {
244
- return void 0;
245
- }
246
- if (!result.en) {
247
- errors.push(`${label} must include an "en" entry as the fallback for other locales.`);
248
- return void 0;
249
- }
250
- return result;
251
- }
252
- var MINDOODB_APP_ACCEPTS_MAX = 16;
253
- var ACCEPT_ID_PATTERN = /^[a-z0-9][a-z0-9_-]{0,47}$/;
254
- var ACCEPT_TYPE_PATTERN = /^(\*|[a-z0-9][a-z0-9.+-]*)\/(\*|[a-z0-9][a-z0-9.+-]*)$/i;
255
- function readAccepts(value, errors) {
256
- if (value === void 0 || value === null) {
257
- return void 0;
258
- }
259
- if (!Array.isArray(value)) {
260
- errors.push("App definition accepts must be an array.");
261
- return void 0;
262
- }
263
- if (value.length > MINDOODB_APP_ACCEPTS_MAX) {
264
- errors.push(`App definition accepts must not have more than ${MINDOODB_APP_ACCEPTS_MAX} entries.`);
265
- return void 0;
266
- }
267
- const result = [];
268
- const ids = /* @__PURE__ */ new Set();
269
- value.forEach((entry, index) => {
270
- const label = `App definition accepts[${index}]`;
271
- if (!isPlainObject(entry)) {
272
- errors.push(`${label} must be an object.`);
273
- return;
274
- }
275
- const id = typeof entry.id === "string" ? entry.id.trim() : "";
276
- if (!ACCEPT_ID_PATTERN.test(id)) {
277
- errors.push(`${label}.id must be 1-48 lowercase letters, digits, "-" or "_", received ${JSON.stringify(entry.id)}.`);
278
- return;
279
- }
280
- if (ids.has(id)) {
281
- errors.push(`${label}.id "${id}" is used twice.`);
282
- return;
283
- }
284
- ids.add(id);
285
- const text = readLocalizedText(entry.label, `${label}.label`, 80, errors);
286
- if (!text) {
287
- errors.push(`${label}.label is required.`);
288
- return;
289
- }
290
- if (!Array.isArray(entry.types) || !entry.types.length) {
291
- errors.push(`${label}.types must be a non-empty array of MIME patterns.`);
292
- return;
293
- }
294
- const types = [];
295
- for (const type of entry.types) {
296
- if (typeof type !== "string" || !ACCEPT_TYPE_PATTERN.test(type.trim())) {
297
- errors.push(`${label}.types contains an invalid MIME pattern ${JSON.stringify(type)}.`);
298
- return;
299
- }
300
- types.push(type.trim().toLowerCase());
301
- }
302
- const folders = readOptionalBoolean(entry, "folders", errors);
303
- const multiple = entry.multiple === false ? false : readOptionalBoolean(entry, "multiple", errors);
304
- let maxBytes;
305
- if (entry.maxBytes !== void 0) {
306
- if (typeof entry.maxBytes !== "number" || !Number.isSafeInteger(entry.maxBytes) || entry.maxBytes <= 0) {
307
- errors.push(`${label}.maxBytes must be a positive integer.`);
308
- return;
309
- }
310
- maxBytes = entry.maxBytes;
311
- }
312
- result.push({ id, label: text, types, folders, multiple, maxBytes });
313
- });
314
- return result.length ? result : void 0;
315
- }
316
- function validateMindooDBAppAccepts(value) {
317
- const errors = [];
318
- const accepts = readAccepts(value, errors);
319
- return { accepts: errors.length ? void 0 : accepts, errors };
320
- }
321
- function mindooDBAppAcceptMatchesType(pattern, type) {
322
- const [patternMajor, patternMinor] = pattern.toLowerCase().split("/");
323
- const [major, minor] = (type || "application/octet-stream").toLowerCase().split(";")[0].trim().split("/");
324
- return (patternMajor === "*" || patternMajor === major) && (patternMinor === "*" || patternMinor === minor);
325
- }
326
- function readListingAssetPath(value, label, errors) {
327
- if (value === void 0 || value === null) {
328
- return void 0;
329
- }
330
- if (typeof value !== "string" || !value.trim()) {
331
- errors.push(`${label} must be a non-empty string.`);
332
- return void 0;
333
- }
334
- const trimmed = value.trim();
335
- const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(trimmed)?.[1]?.toLowerCase();
336
- if (scheme && scheme !== "https") {
337
- errors.push(`${label} must be a path on the app origin or an https: URL.`);
338
- return void 0;
339
- }
340
- if (trimmed.startsWith("//")) {
341
- errors.push(`${label} must be a path on the app origin or an https: URL.`);
342
- return void 0;
343
- }
344
- return trimmed;
345
- }
346
- function readListing(value, errors) {
347
- if (value === void 0 || value === null) {
348
- return void 0;
349
- }
350
- if (!isPlainObject(value)) {
351
- errors.push("App definition listing must be an object.");
352
- return void 0;
353
- }
354
- const listing = {};
355
- const summary = readLocalizedText(
356
- value.summary,
357
- "App definition listing.summary",
358
- MINDOODB_APP_LISTING_SUMMARY_MAX,
359
- errors
360
- );
361
- if (summary) listing.summary = summary;
362
- const description = readLocalizedText(
363
- value.description,
364
- "App definition listing.description",
365
- MINDOODB_APP_LISTING_DESCRIPTION_MAX,
366
- errors
367
- );
368
- if (description) listing.description = description;
369
- const descriptionMarkdown = readLocalizedText(
370
- value.descriptionMarkdown,
371
- "App definition listing.descriptionMarkdown",
372
- MINDOODB_APP_LISTING_DESCRIPTION_MAX,
373
- errors
374
- );
375
- if (descriptionMarkdown) listing.descriptionMarkdown = descriptionMarkdown;
376
- const icon = readListingAssetPath(value.icon, "App definition listing.icon", errors);
377
- if (icon) listing.icon = icon;
378
- if (value.screenshots !== void 0 && value.screenshots !== null) {
379
- if (!Array.isArray(value.screenshots)) {
380
- errors.push("App definition listing.screenshots must be an array.");
381
- } else if (value.screenshots.length > MINDOODB_APP_LISTING_MAX_SCREENSHOTS) {
382
- errors.push(
383
- `App definition listing.screenshots must not list more than ${MINDOODB_APP_LISTING_MAX_SCREENSHOTS} images.`
384
- );
385
- } else {
386
- const screenshots = [];
387
- value.screenshots.forEach((entry, index) => {
388
- const label = `App definition listing.screenshots[${index}]`;
389
- const raw = typeof entry === "string" ? { file: entry } : entry;
390
- if (!isPlainObject(raw)) {
391
- errors.push(`${label} must be a path or an object with a file.`);
392
- return;
393
- }
394
- const file = readListingAssetPath(raw.file, `${label}.file`, errors);
395
- if (!file) {
396
- return;
397
- }
398
- const caption = readLocalizedText(raw.caption, `${label}.caption`, MINDOODB_APP_LISTING_SUMMARY_MAX, errors);
399
- screenshots.push(caption ? { file, caption } : { file });
400
- });
401
- if (screenshots.length) listing.screenshots = screenshots;
402
- }
403
- }
404
- if (value.publisher !== void 0 && value.publisher !== null) {
405
- const publisher = isPlainObject(value.publisher) ? value.publisher : {};
406
- const name = typeof publisher.name === "string" ? publisher.name.trim() : "";
407
- if (!name) {
408
- errors.push("App definition listing.publisher must be an object with a non-empty name.");
409
- } else {
410
- const url = readListingAssetPath(publisher.url, "App definition listing.publisher.url", errors);
411
- if (url && !/^https:\/\//i.test(url)) {
412
- errors.push("App definition listing.publisher.url must be an absolute https: URL.");
413
- } else {
414
- listing.publisher = url ? { name, url } : { name };
415
- }
416
- }
417
- }
418
- return Object.keys(listing).length ? listing : void 0;
419
- }
420
- function resolveMindooDBAppLocalizedText(text, locale) {
421
- if (text === void 0) {
422
- return "";
423
- }
424
- if (typeof text === "string") {
425
- return text;
426
- }
427
- const normalized = locale.trim();
428
- const language = normalized.split(/[-_]/)[0]?.toLowerCase() ?? "";
429
- return text[normalized] ?? text[normalized.toLowerCase()] ?? (language ? text[language] : void 0) ?? text.en;
430
- }
431
- function resolveMindooDBAppListingAssetUrl(path, originUrl) {
432
- try {
433
- const base = new URL(originUrl.endsWith("/") ? originUrl : `${originUrl}/`);
434
- const resolved = new URL(path, base);
435
- if (resolved.protocol !== "https:" && resolved.protocol !== base.protocol) {
436
- return null;
437
- }
438
- return resolved.toString();
439
- } catch {
440
- return null;
441
- }
442
- }
443
- function validateMindooDBAppDefinition(raw) {
444
- const errors = [];
445
- if (!isPlainObject(raw)) {
446
- return { definition: null, errors: ["App definition must be a JSON object."] };
447
- }
448
- if (raw.format !== MINDOODB_APP_DEFINITION_FORMAT) {
449
- errors.push(
450
- `App definition format must be "${MINDOODB_APP_DEFINITION_FORMAT}", received ${JSON.stringify(raw.format)}.`
451
- );
452
- }
453
- if (raw.formatVersion !== MINDOODB_APP_DEFINITION_VERSION) {
454
- errors.push(
455
- `Unsupported app definition version ${JSON.stringify(raw.formatVersion)}, expected ${MINDOODB_APP_DEFINITION_VERSION}.`
456
- );
457
- }
458
- const appId = typeof raw.appId === "string" ? raw.appId.trim() : "";
459
- if (!appId) {
460
- errors.push("App definition is missing a non-empty appId.");
461
- }
462
- const label = typeof raw.label === "string" ? raw.label.trim() : "";
463
- if (!label) {
464
- errors.push("App definition is missing a non-empty label.");
465
- }
466
- const runtime = raw.runtime;
467
- if (runtime !== void 0 && runtime !== "iframe" && runtime !== "window") {
468
- errors.push(`App definition runtime must be "iframe" or "window", received ${JSON.stringify(runtime)}.`);
469
- }
470
- const hosting = raw.hosting;
471
- if (hosting !== void 0 && hosting !== "external" && hosting !== "hosted") {
472
- errors.push(
473
- `App definition hosting must be "external" or "hosted", received ${JSON.stringify(hosting)}.`
474
- );
475
- }
476
- const description = readOptionalString(raw, "description", errors);
477
- const version = readOptionalString(raw, "version", errors);
478
- const defaultLaunchDatabaseId = readOptionalString(raw, "defaultLaunchDatabaseId", errors);
479
- const networkAllowlist = readNetworkAllowlist(raw.networkAllowlist, errors);
480
- const launchParameters = readStringRecord(raw, "launchParameters", errors);
481
- const databases = readDatabases(raw.databases, errors);
482
- const permissions = readPermissions(
483
- raw.permissions,
484
- "App definition permissions",
485
- MINDOODB_APP_DEFINITION_REGISTRATION_PERMISSIONS,
486
- errors
487
- );
488
- const allowPopups = readOptionalBoolean(raw, "allowPopups", errors);
489
- const allowCamera = readOptionalBoolean(raw, "allowCamera", errors);
490
- const allowMicrophone = readOptionalBoolean(raw, "allowMicrophone", errors);
491
- const allowGeolocation = readOptionalBoolean(raw, "allowGeolocation", errors);
492
- const allowClipboardWrite = readOptionalBoolean(raw, "allowClipboardWrite", errors);
493
- const allowMotion = readOptionalBoolean(raw, "allowMotion", errors);
494
- const allowWebRtc = readOptionalBoolean(raw, "allowWebRtc", errors);
495
- const allowWorkers = readOptionalBoolean(raw, "allowWorkers", errors);
496
- const listing = readListing(raw.listing, errors);
497
- const accepts = readAccepts(raw.accepts, errors);
498
- const agentToolPrefix = readOptionalString(raw, "agentToolPrefix", errors);
499
- if (agentToolPrefix !== void 0 && (!/^[a-z][a-z0-9_]{0,15}$/.test(agentToolPrefix) || agentToolPrefix.endsWith("_") || /^haven(?:_|$)/.test(agentToolPrefix))) {
500
- errors.push(
501
- `App definition agentToolPrefix must be 1-16 lowercase letters, digits or "_", start with a letter and not be "haven", received ${JSON.stringify(agentToolPrefix)}.`
502
- );
503
- }
504
- if (defaultLaunchDatabaseId && databases && !databases.some((database) => database.logicalDatabaseId === defaultLaunchDatabaseId)) {
505
- errors.push(
506
- `App definition defaultLaunchDatabaseId "${defaultLaunchDatabaseId}" is not one of the declared databases.`
507
- );
508
- }
509
- if (errors.length) {
510
- return { definition: null, errors };
511
- }
512
- return {
513
- definition: {
514
- format: MINDOODB_APP_DEFINITION_FORMAT,
515
- formatVersion: MINDOODB_APP_DEFINITION_VERSION,
516
- appId,
517
- label,
518
- description,
519
- version,
520
- runtime,
521
- hosting,
522
- networkAllowlist,
523
- allowPopups,
524
- allowCamera,
525
- allowMicrophone,
526
- allowGeolocation,
527
- allowClipboardWrite,
528
- allowMotion,
529
- allowWebRtc,
530
- allowWorkers,
531
- agentToolPrefix,
532
- permissions,
533
- launchParameters,
534
- defaultLaunchDatabaseId,
535
- databases,
536
- accepts,
537
- listing
538
- },
539
- errors: []
540
- };
541
- }
542
- function resolveMindooDBAppDefinitionUrl(baseUrl) {
543
- const trimmed = baseUrl.trim();
544
- if (!trimmed) {
545
- return "";
546
- }
547
- const suffix = `/${MINDOODB_APP_DEFINITION_FILE_NAME}`;
548
- try {
549
- const url = new URL(trimmed);
550
- const path = url.pathname.replace(/\/+$/, "") || "/";
551
- url.search = "";
552
- url.hash = "";
553
- url.pathname = path.endsWith(suffix) || path === suffix ? path : `${path === "/" ? "" : path}${suffix}`;
554
- return url.toString();
555
- } catch {
556
- const withoutSlash = trimmed.replace(/\/+$/, "");
557
- return withoutSlash.toLowerCase().endsWith(suffix) ? withoutSlash : `${withoutSlash}${suffix}`;
558
- }
559
- }
560
-
561
71
  // src/attachmentPreview.ts
562
72
  function canPreviewAttachment(fileName, mimeType) {
563
73
  const normalizedMimeType = mimeType.toLowerCase();
@@ -1777,6 +1287,7 @@ export {
1777
1287
  MINDOODB_APP_BUNDLE_MANIFEST_FILE_NAME,
1778
1288
  MINDOODB_APP_BUNDLE_MANIFEST_FORMAT,
1779
1289
  MINDOODB_APP_BUNDLE_MANIFEST_VERSION,
1290
+ MINDOODB_APP_COMPONENTS_MAX,
1780
1291
  MINDOODB_APP_DEFINITION_FILE_NAME,
1781
1292
  MINDOODB_APP_DEFINITION_FORMAT,
1782
1293
  MINDOODB_APP_DEFINITION_PERMISSIONS,
@@ -1826,6 +1337,7 @@ export {
1826
1337
  listingMarkdownToPlainText,
1827
1338
  matchHostShortcut,
1828
1339
  mindooDBAppAcceptMatchesType,
1340
+ mindooDBAppComponentFieldsMatch,
1829
1341
  mindooDBDocumentId,
1830
1342
  normalizeDragAccepts,
1831
1343
  normalizeDragPointerInput,
@@ -1846,6 +1358,7 @@ export {
1846
1358
  snapshotElementToPng,
1847
1359
  validateMindooDBAppAccepts,
1848
1360
  validateMindooDBAppBundleManifest,
1361
+ validateMindooDBAppComponents,
1849
1362
  validateMindooDBAppDefinition,
1850
1363
  watchWordChunks
1851
1364
  };