@lowdefy/blocks-native 0.0.0-stage → 7.2.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/LICENSE +201 -0
- package/README.md +9 -2
- package/dist/actions/AddCalendarEvent/AddCalendarEvent.js +31 -0
- package/dist/actions/AddCalendarEvent/schema.js +55 -0
- package/dist/actions/AddContact/AddContact.js +24 -0
- package/dist/actions/AddContact/schema.js +49 -0
- package/dist/actions/CancelNotification/CancelNotification.js +23 -0
- package/dist/actions/CancelNotification/schema.js +31 -0
- package/dist/actions/DiscardQueuedRequest/DiscardQueuedRequest.js +23 -0
- package/dist/actions/DiscardQueuedRequest/schema.js +31 -0
- package/dist/actions/GetCalendarEvents/GetCalendarEvents.js +32 -0
- package/dist/actions/GetCalendarEvents/schema.js +35 -0
- package/dist/actions/GetRequestQueue/GetRequestQueue.js +24 -0
- package/dist/actions/GetRequestQueue/schema.js +22 -0
- package/dist/actions/Haptic/Haptic.js +38 -0
- package/dist/actions/Haptic/schema.js +37 -0
- package/dist/actions/KeepAwake/KeepAwake.js +23 -0
- package/dist/actions/KeepAwake/schema.js +28 -0
- package/dist/actions/PickContact/PickContact.js +24 -0
- package/dist/actions/PickContact/schema.js +22 -0
- package/dist/actions/PickFile/PickFile.js +32 -0
- package/dist/actions/PickFile/schema.js +58 -0
- package/dist/actions/PickImage/PickImage.js +32 -0
- package/dist/actions/PickImage/schema.js +76 -0
- package/dist/actions/ReadNfc/ReadNfc.js +24 -0
- package/dist/actions/ReadNfc/schema.js +27 -0
- package/dist/actions/RefreshWidgets/RefreshWidgets.js +24 -0
- package/dist/actions/RefreshWidgets/schema.js +22 -0
- package/dist/actions/RequestNotificationPermission/RequestNotificationPermission.js +24 -0
- package/dist/actions/RequestNotificationPermission/schema.js +22 -0
- package/dist/actions/RetryRequestQueue/RetryRequestQueue.js +24 -0
- package/dist/actions/RetryRequestQueue/schema.js +27 -0
- package/dist/actions/ScanCode/ScanCode.js +24 -0
- package/dist/actions/ScanCode/schema.js +54 -0
- package/dist/actions/ScanDocument/ScanDocument.js +32 -0
- package/dist/actions/ScanDocument/schema.js +57 -0
- package/dist/actions/ScheduleNotification/ScheduleNotification.js +27 -0
- package/dist/actions/ScheduleNotification/schema.js +67 -0
- package/dist/actions/SetBadgeCount/SetBadgeCount.js +27 -0
- package/dist/actions/SetBadgeCount/schema.js +31 -0
- package/dist/actions/SetBrightness/SetBrightness.js +24 -0
- package/dist/actions/SetBrightness/schema.js +33 -0
- package/dist/actions/Share/Share.js +50 -0
- package/dist/actions/Share/schema.js +51 -0
- package/dist/actions/Speak/Speak.js +27 -0
- package/dist/actions/Speak/schema.js +44 -0
- package/dist/actions/StartGeofencing/StartGeofencing.js +29 -0
- package/dist/actions/StartGeofencing/schema.js +63 -0
- package/dist/actions/StartLocationTracking/StartLocationTracking.js +29 -0
- package/dist/actions/StartLocationTracking/schema.js +59 -0
- package/dist/actions/StartRecording/StartRecording.js +23 -0
- package/dist/actions/StartRecording/schema.js +32 -0
- package/dist/actions/StopGeofencing/StopGeofencing.js +23 -0
- package/dist/actions/StopGeofencing/schema.js +22 -0
- package/dist/actions/StopLocationTracking/StopLocationTracking.js +23 -0
- package/dist/actions/StopLocationTracking/schema.js +22 -0
- package/dist/actions/StopRecording/StopRecording.js +37 -0
- package/dist/actions/StopRecording/schema.js +46 -0
- package/dist/actions/StopSpeaking/StopSpeaking.js +23 -0
- package/dist/actions/StopSpeaking/schema.js +22 -0
- package/dist/actions/TakePhoto/TakePhoto.js +31 -0
- package/dist/actions/TakePhoto/schema.js +67 -0
- package/dist/actions/WriteNfc/WriteNfc.js +28 -0
- package/dist/actions/WriteNfc/schema.js +61 -0
- package/dist/actions/uploadFiles.js +51 -0
- package/dist/actions.js +47 -0
- package/dist/blocks/ActivityTimeline/ActivityTimeline.js +507 -0
- package/dist/blocks/ActivityTimeline/CommentBody.js +176 -0
- package/dist/blocks/ActivityTimeline/CommentItem.js +302 -0
- package/dist/blocks/ActivityTimeline/EditBox.js +143 -0
- package/dist/blocks/ActivityTimeline/LineText.js +71 -0
- package/dist/blocks/ActivityTimeline/RailIcon.js +41 -0
- package/dist/blocks/ActivityTimeline/RailRow.js +74 -0
- package/dist/blocks/ActivityTimeline/ReactionPicker.js +68 -0
- package/dist/blocks/ActivityTimeline/ReactionPills.js +112 -0
- package/dist/blocks/ActivityTimeline/ThreadCard.js +160 -0
- package/dist/blocks/ActivityTimeline/TimelineMarkdownRenderer.js +48 -0
- package/dist/blocks/ActivityTimeline/buildTimelineRows.js +194 -0
- package/dist/blocks/ActivityTimeline/describeEvent.js +61 -0
- package/dist/blocks/ActivityTimeline/describeGap.js +71 -0
- package/dist/blocks/ActivityTimeline/fillTemplate.js +84 -0
- package/dist/blocks/ActivityTimeline/fillText.js +38 -0
- package/dist/blocks/ActivityTimeline/formatRelativeTime.js +68 -0
- package/dist/blocks/ActivityTimeline/getActor.js +41 -0
- package/dist/blocks/ActivityTimeline/getCommentMenuActions.js +85 -0
- package/dist/blocks/ActivityTimeline/getCommentView.js +72 -0
- package/dist/blocks/ActivityTimeline/getTimelineColors.js +71 -0
- package/dist/blocks/ActivityTimeline/getToneColor.js +49 -0
- package/dist/blocks/ActivityTimeline/getVisibleReplies.js +36 -0
- package/dist/blocks/ActivityTimeline/isThreadShown.js +28 -0
- package/dist/blocks/ActivityTimeline/joinList.js +21 -0
- package/dist/blocks/ActivityTimeline/meta.js +320 -0
- package/dist/blocks/ActivityTimeline/parseTimelineHref.js +43 -0
- package/dist/blocks/ActivityTimeline/selectEventRule.js +69 -0
- package/dist/blocks/ActivityTimeline/summariseEvents.js +51 -0
- package/dist/blocks/ActivityTimeline/toPlainText.js +32 -0
- package/dist/blocks/ActivityTimeline/toTime.js +36 -0
- package/dist/blocks/ActivityTimeline/toTimelineMarkdown.js +57 -0
- package/dist/blocks/ActivityTimeline/toggleReaction.js +74 -0
- package/dist/blocks/ActivityTimeline/useNow.js +24 -0
- package/dist/blocks/AgentChat/AgentChat.js +726 -0
- package/dist/blocks/AgentChat/AssistantMessage.js +243 -0
- package/dist/blocks/AgentChat/ChatComposer.js +401 -0
- package/dist/blocks/AgentChat/ChatError.js +129 -0
- package/dist/blocks/AgentChat/ChatSkeleton.js +97 -0
- package/dist/blocks/AgentChat/ReasoningDisclosure.js +125 -0
- package/dist/blocks/AgentChat/ThinkingIndicator.js +103 -0
- package/dist/blocks/AgentChat/ThreadsSheet.js +347 -0
- package/dist/blocks/AgentChat/ToolApprovalCard.js +190 -0
- package/dist/blocks/AgentChat/ToolCallRow.js +187 -0
- package/dist/blocks/AgentChat/ToolDetail.js +137 -0
- package/dist/blocks/AgentChat/UserMessage.js +84 -0
- package/dist/blocks/AgentChat/WelcomeView.js +100 -0
- package/dist/blocks/AgentChat/createAgentTransport.js +74 -0
- package/dist/blocks/AgentChat/describeToolPart.js +133 -0
- package/dist/blocks/AgentChat/getChatSeed.js +44 -0
- package/dist/blocks/AgentChat/getFirstExchange.js +43 -0
- package/dist/blocks/AgentChat/getMessageSegments.js +73 -0
- package/dist/blocks/AgentChat/getMessageText.js +25 -0
- package/dist/blocks/AgentChat/getPageStateUpdates.js +47 -0
- package/dist/blocks/AgentChat/getProvisionalTitle.js +32 -0
- package/dist/blocks/AgentChat/getReadableRows.js +157 -0
- package/dist/blocks/AgentChat/getThreadEndpoints.js +54 -0
- package/dist/blocks/AgentChat/getToolIcon.js +110 -0
- package/dist/blocks/AgentChat/humanizeToolName.js +30 -0
- package/dist/blocks/AgentChat/messageParts.js +86 -0
- package/dist/blocks/AgentChat/meta.js +530 -0
- package/dist/blocks/AgentChat/mintConversationId.js +29 -0
- package/dist/blocks/AgentChat/replayableMessages.js +62 -0
- package/dist/blocks/AgentChat/showMessageMenu.js +49 -0
- package/dist/blocks/AgentChat/summarizeToolInput.js +36 -0
- package/dist/blocks/AgentChat/summarizeToolOutput.js +49 -0
- package/dist/blocks/AgentChat/useAgentEvents.js +218 -0
- package/dist/blocks/AgentChat/useChatDictation.js +151 -0
- package/dist/blocks/AgentChat/useChatThreads.js +450 -0
- package/dist/blocks/AgentChat/useFollowScroll.js +80 -0
- package/dist/blocks/AgentChat/useThinkingMessage.js +77 -0
- package/dist/blocks/Alert/Alert.js +167 -0
- package/dist/blocks/Alert/meta.js +200 -0
- package/dist/blocks/Avatar/Avatar.js +51 -0
- package/dist/blocks/Avatar/AvatarCircle.js +114 -0
- package/dist/blocks/Avatar/AvatarPhoto.js +68 -0
- package/dist/blocks/Avatar/AvatarStack.js +89 -0
- package/dist/blocks/Avatar/getAvatarColor.js +84 -0
- package/dist/blocks/Avatar/getAvatarImage.js +97 -0
- package/dist/blocks/Avatar/getInitials.js +51 -0
- package/dist/blocks/Avatar/meta.js +57 -0
- package/dist/blocks/Box/Box.js +118 -0
- package/dist/blocks/Box/getRubberBand.js +29 -0
- package/dist/blocks/Box/getSwipeDirection.js +45 -0
- package/dist/blocks/Box/isSwipeGesture.js +41 -0
- package/dist/blocks/Box/meta.js +46 -0
- package/dist/blocks/Box/useSwipeGesture.js +113 -0
- package/dist/blocks/Button/Button.js +136 -0
- package/dist/blocks/Button/getButtonColors.js +216 -0
- package/dist/blocks/Button/meta.js +137 -0
- package/dist/blocks/Card/Card.js +185 -0
- package/dist/blocks/Card/meta.js +203 -0
- package/dist/blocks/ChipSelector/Chip.js +178 -0
- package/dist/blocks/ChipSelector/ChipSelector.js +313 -0
- package/dist/blocks/ChipSelector/EdgeFade.js +68 -0
- package/dist/blocks/ChipSelector/getChipColors.js +88 -0
- package/dist/blocks/ChipSelector/getFadeRanges.js +55 -0
- package/dist/blocks/ChipSelector/getOverscrollSwipe.js +44 -0
- package/dist/blocks/ChipSelector/getScrollTarget.js +41 -0
- package/dist/blocks/ChipSelector/meta.js +156 -0
- package/dist/blocks/Composer/Composer.js +511 -0
- package/dist/blocks/Composer/MentionTextInput.js +91 -0
- package/dist/blocks/Composer/SuggestionList.js +165 -0
- package/dist/blocks/Composer/applyDisplayEdit.js +81 -0
- package/dist/blocks/Composer/convertSpokenMentions.js +234 -0
- package/dist/blocks/Composer/createMentionPattern.js +40 -0
- package/dist/blocks/Composer/findTrigger.js +51 -0
- package/dist/blocks/Composer/getSendState.js +38 -0
- package/dist/blocks/Composer/getSpokenMentionWords.js +35 -0
- package/dist/blocks/Composer/indexSpokenNames.js +50 -0
- package/dist/blocks/Composer/insertLink.js +36 -0
- package/dist/blocks/Composer/insertMention.js +43 -0
- package/dist/blocks/Composer/matchSpokenName.js +88 -0
- package/dist/blocks/Composer/meta.js +212 -0
- package/dist/blocks/Composer/parseMentionValue.js +55 -0
- package/dist/blocks/Composer/placeDictation.js +51 -0
- package/dist/blocks/Composer/rankMentions.js +51 -0
- package/dist/blocks/Composer/replaceRange.js +48 -0
- package/dist/blocks/Composer/segmentText.js +78 -0
- package/dist/blocks/Composer/shiftOffset.js +37 -0
- package/dist/blocks/Composer/snapSelection.js +37 -0
- package/dist/blocks/Composer/useMentionEditor.js +381 -0
- package/dist/blocks/Composer/withPartial.js +50 -0
- package/dist/blocks/DateSelector/DateSelector.js +250 -0
- package/dist/blocks/DateSelector/formatDateValue.js +34 -0
- package/dist/blocks/DateSelector/getDateMenuActions.js +96 -0
- package/dist/blocks/DateSelector/meta.js +109 -0
- package/dist/blocks/DateSelector/toBoundDate.js +40 -0
- package/dist/blocks/DateSelector/toPickerDate.js +31 -0
- package/dist/blocks/DateSelector/toUtcDay.js +25 -0
- package/dist/blocks/Divider/Divider.js +159 -0
- package/dist/blocks/Divider/meta.js +108 -0
- package/dist/blocks/Empty/Empty.js +107 -0
- package/dist/blocks/Empty/meta.js +61 -0
- package/dist/blocks/FileInput/FileInput.js +253 -0
- package/dist/blocks/FileInput/formatFileSize.js +28 -0
- package/dist/blocks/FileInput/getFileSources.js +48 -0
- package/dist/blocks/FileInput/meta.js +123 -0
- package/dist/blocks/Icon/Icon.js +41 -0
- package/dist/blocks/Icon/meta.js +80 -0
- package/dist/blocks/Illustration/Illustration.js +154 -0
- package/dist/blocks/Illustration/IllustrationLayer.js +105 -0
- package/dist/blocks/Illustration/colorNodes.js +72 -0
- package/dist/blocks/Illustration/createIllustrationMotion.js +172 -0
- package/dist/blocks/Illustration/getIllustrationBox.js +54 -0
- package/dist/blocks/Illustration/getIllustrationColors.js +48 -0
- package/dist/blocks/Illustration/getKeyframeRange.js +99 -0
- package/dist/blocks/Illustration/getLayerBounds.js +74 -0
- package/dist/blocks/Illustration/getLayers.js +113 -0
- package/dist/blocks/Illustration/getNodePoints.js +210 -0
- package/dist/blocks/Illustration/meta.js +196 -0
- package/dist/blocks/Illustration/parseIllustration.js +84 -0
- package/dist/blocks/Illustration/toBoundingBoxGradients.js +188 -0
- package/dist/blocks/Illustration/useIllustrationMotion.js +75 -0
- package/dist/blocks/Label/Label.js +111 -0
- package/dist/blocks/Label/getLabelProperties.js +38 -0
- package/dist/blocks/Label/getLabelState.js +59 -0
- package/dist/blocks/List/List.js +159 -0
- package/dist/blocks/List/ListRow.js +74 -0
- package/dist/blocks/List/ListRowContext.js +20 -0
- package/dist/blocks/List/SectionHeader.js +119 -0
- package/dist/blocks/List/getSections.js +161 -0
- package/dist/blocks/List/meta.js +190 -0
- package/dist/blocks/ListItem/ListItem.js +440 -0
- package/dist/blocks/ListItem/ListItemContextMenu.js +58 -0
- package/dist/blocks/ListItem/getListItemParts.js +101 -0
- package/dist/blocks/ListItem/getSfSymbol.js +33 -0
- package/dist/blocks/ListItem/meta.js +284 -0
- package/dist/blocks/Map/Map.js +78 -0
- package/dist/blocks/Map/meta.js +153 -0
- package/dist/blocks/Markdown/ChipWidthContext.js +20 -0
- package/dist/blocks/Markdown/ChipWidthView.js +40 -0
- package/dist/blocks/Markdown/LinkChip.js +151 -0
- package/dist/blocks/Markdown/Markdown.js +70 -0
- package/dist/blocks/Markdown/MarkdownCode.js +67 -0
- package/dist/blocks/Markdown/MarkdownContent.js +119 -0
- package/dist/blocks/Markdown/MarkdownImage.js +77 -0
- package/dist/blocks/Markdown/MarkdownList.js +97 -0
- package/dist/blocks/Markdown/MarkdownListContext.js +22 -0
- package/dist/blocks/Markdown/MarkdownRenderer.js +231 -0
- package/dist/blocks/Markdown/MarkdownTable.js +96 -0
- package/dist/blocks/Markdown/MarkdownTokenizer.js +43 -0
- package/dist/blocks/Markdown/TaskBox.js +58 -0
- package/dist/blocks/Markdown/TaskMark.js +37 -0
- package/dist/blocks/Markdown/getChipMaxWidth.js +33 -0
- package/dist/blocks/Markdown/getLinkChip.js +95 -0
- package/dist/blocks/Markdown/getLinkChipColors.js +51 -0
- package/dist/blocks/Markdown/getListMarker.js +116 -0
- package/dist/blocks/Markdown/getMarkdownStyles.js +206 -0
- package/dist/blocks/Markdown/getNodeText.js +37 -0
- package/dist/blocks/Markdown/layoutLinkChips.js +209 -0
- package/dist/blocks/Markdown/matchLinkChip.js +82 -0
- package/dist/blocks/Markdown/meta.js +56 -0
- package/dist/blocks/Markdown/restyleText.js +40 -0
- package/dist/blocks/Markdown/trimOuterSpace.js +42 -0
- package/dist/blocks/Menu/Menu.js +96 -0
- package/dist/blocks/Menu/getMenuActions.js +66 -0
- package/dist/blocks/Menu/meta.js +159 -0
- package/dist/blocks/MultipleSelector/MultipleSelector.js +290 -0
- package/dist/blocks/MultipleSelector/MultipleSelectorRow.js +71 -0
- package/dist/blocks/MultipleSelector/ValueSummary.js +130 -0
- package/dist/blocks/MultipleSelector/getOptionIndices.js +30 -0
- package/dist/blocks/MultipleSelector/getSessionOptions.js +38 -0
- package/dist/blocks/MultipleSelector/getSummaryCount.js +35 -0
- package/dist/blocks/MultipleSelector/meta.js +284 -0
- package/dist/blocks/MultipleSelector/toggleValue.js +50 -0
- package/dist/blocks/NumberInput/NumberInput.js +251 -0
- package/dist/blocks/NumberInput/StepButton.js +46 -0
- package/dist/blocks/NumberInput/formatNumber.js +35 -0
- package/dist/blocks/NumberInput/getNumberKeyboardType.js +32 -0
- package/dist/blocks/NumberInput/meta.js +123 -0
- package/dist/blocks/NumberInput/normalizeNumber.js +38 -0
- package/dist/blocks/NumberInput/parseNumberText.js +46 -0
- package/dist/blocks/PageDots/PageDots.js +131 -0
- package/dist/blocks/PageDots/meta.js +48 -0
- package/dist/blocks/Paragraph/Paragraph.js +52 -0
- package/dist/blocks/Paragraph/meta.js +295 -0
- package/dist/blocks/QRScanner/QRScanner.js +94 -0
- package/dist/blocks/QRScanner/createScanFilter.js +44 -0
- package/dist/blocks/QRScanner/meta.js +80 -0
- package/dist/blocks/Screen/meta.js +197 -0
- package/dist/blocks/SegmentedControl/SegmentedControl.js +77 -0
- package/dist/blocks/SegmentedControl/meta.js +78 -0
- package/dist/blocks/Selector/NoValueAvatar.js +42 -0
- package/dist/blocks/Selector/PickerOptionRow.js +130 -0
- package/dist/blocks/Selector/PickerRowLeading.js +57 -0
- package/dist/blocks/Selector/PickerSearchField.js +85 -0
- package/dist/blocks/Selector/PickerSheet.js +239 -0
- package/dist/blocks/Selector/Selector.js +122 -0
- package/dist/blocks/Selector/SelectorMenu.js +97 -0
- package/dist/blocks/Selector/SelectorRow.js +86 -0
- package/dist/blocks/Selector/SelectorSheet.js +131 -0
- package/dist/blocks/Selector/getOptionIndex.js +39 -0
- package/dist/blocks/Selector/getOptionLabel.js +32 -0
- package/dist/blocks/Selector/getOptionValue.js +20 -0
- package/dist/blocks/Selector/getPickerSheetDetents.js +45 -0
- package/dist/blocks/Selector/getPickerSheetRows.js +174 -0
- package/dist/blocks/Selector/getPickerSheetScrollIndex.js +35 -0
- package/dist/blocks/Selector/getSelectorMenuActions.js +61 -0
- package/dist/blocks/Selector/meta.js +195 -0
- package/dist/blocks/Selector/normalizeSearchText.js +27 -0
- package/dist/blocks/Selector/setSelectorValue.js +54 -0
- package/dist/blocks/Sheet/Sheet.js +174 -0
- package/dist/blocks/Sheet/getSheetDetents.js +56 -0
- package/dist/blocks/Sheet/meta.js +72 -0
- package/dist/blocks/SignaturePad/SignaturePad.js +182 -0
- package/dist/blocks/SignaturePad/meta.js +74 -0
- package/dist/blocks/SignaturePad/toSignatureValue.js +52 -0
- package/dist/blocks/Skeleton/Skeleton.js +131 -0
- package/dist/blocks/Skeleton/SkeletonCard.js +42 -0
- package/dist/blocks/Skeleton/SkeletonHero.js +72 -0
- package/dist/blocks/Skeleton/SkeletonInsetGroup.js +82 -0
- package/dist/blocks/Skeleton/SkeletonListRow.js +90 -0
- package/dist/blocks/Skeleton/SkeletonParagraph.js +36 -0
- package/dist/blocks/Skeleton/SkeletonRows.js +58 -0
- package/dist/blocks/Skeleton/SkeletonTimeline.js +88 -0
- package/dist/blocks/Skeleton/getBarWidth.js +45 -0
- package/dist/blocks/Skeleton/getParagraphWidths.js +56 -0
- package/dist/blocks/Skeleton/getSectionCounts.js +33 -0
- package/dist/blocks/Skeleton/getSkeletonVariant.js +27 -0
- package/dist/blocks/Skeleton/meta.js +98 -0
- package/dist/blocks/Spinner/Spinner.js +68 -0
- package/dist/blocks/Spinner/meta.js +35 -0
- package/dist/blocks/StatusIcon/StatusGlyph.js +247 -0
- package/dist/blocks/StatusIcon/StatusIcon.js +34 -0
- package/dist/blocks/StatusIcon/StatusMark.js +87 -0
- package/dist/blocks/StatusIcon/getPiePath.js +41 -0
- package/dist/blocks/StatusIcon/getStatusColor.js +61 -0
- package/dist/blocks/StatusIcon/meta.js +38 -0
- package/dist/blocks/StatusIcon/statusLabels.js +33 -0
- package/dist/blocks/Switch/Switch.js +85 -0
- package/dist/blocks/Switch/meta.js +78 -0
- package/dist/blocks/Tabs/Tabs.js +269 -0
- package/dist/blocks/Tabs/meta.js +305 -0
- package/dist/blocks/Tag/TONE_PALETTES.js +34 -0
- package/dist/blocks/Tag/Tag.js +173 -0
- package/dist/blocks/Tag/getTagColors.js +120 -0
- package/dist/blocks/Tag/getTagDotColor.js +32 -0
- package/dist/blocks/Tag/meta.js +131 -0
- package/dist/blocks/TextArea/ComposerSendButton.js +69 -0
- package/dist/blocks/TextArea/TextArea.js +167 -0
- package/dist/blocks/TextArea/meta.js +96 -0
- package/dist/blocks/TextInput/TextInput.js +253 -0
- package/dist/blocks/TextInput/applyReplaceInput.js +30 -0
- package/dist/blocks/TextInput/getKeyboardProps.js +64 -0
- package/dist/blocks/TextInput/getSearchBoxStyle.js +39 -0
- package/dist/blocks/TextInput/meta.js +113 -0
- package/dist/blocks/Title/Title.js +62 -0
- package/dist/blocks/Title/meta.js +355 -0
- package/dist/blocks.js +52 -0
- package/dist/device/getDeviceFeature.js +81 -0
- package/dist/device/playFeedback.js +32 -0
- package/dist/device.js +18 -0
- package/dist/dictation.js +17 -0
- package/dist/htmlToText.js +32 -0
- package/dist/metas.js +53 -0
- package/dist/schemas/avatar.js +40 -0
- package/dist/schemas/icon.js +65 -0
- package/dist/schemas/inputLabel.js +96 -0
- package/dist/schemas/inputProperties.js +92 -0
- package/dist/schemas/linkChips.js +85 -0
- package/dist/schemas/status.js +75 -0
- package/dist/schemas/textStyle.js +33 -0
- package/dist/schemas/tone.js +28 -0
- package/dist/schemas.js +47 -0
- package/dist/shared/ClearButton.js +53 -0
- package/dist/shared/CountText.js +38 -0
- package/dist/shared/MissingFeature.js +43 -0
- package/dist/shared/NativeMenu.js +69 -0
- package/dist/shared/OptionGlyph.js +59 -0
- package/dist/shared/PropertyRow.js +89 -0
- package/dist/shared/SheetCloseButton.js +51 -0
- package/dist/shared/SheetDoneButton.js +44 -0
- package/dist/shared/SwipeContext.js +20 -0
- package/dist/shared/SwipeableRow.js +294 -0
- package/dist/shared/SystemIcon.js +72 -0
- package/dist/shared/dictation/DictationButton.js +77 -0
- package/dist/shared/dictation/DictationWarning.js +89 -0
- package/dist/shared/dictation/LevelMeter.js +57 -0
- package/dist/shared/dictation/ListeningRow.js +100 -0
- package/dist/shared/dictation/PartialSpans.js +50 -0
- package/dist/shared/dictation/checkDictationAvailable.js +65 -0
- package/dist/shared/dictation/claimMic.js +68 -0
- package/dist/shared/dictation/createQueuedRecognizer.js +213 -0
- package/dist/shared/dictation/getDictationLevel.js +30 -0
- package/dist/shared/dictation/getDictationWarning.js +40 -0
- package/dist/shared/dictation/getLevelBars.js +38 -0
- package/dist/shared/dictation/getRecognizer.js +46 -0
- package/dist/shared/dictation/getStartOptions.js +42 -0
- package/dist/shared/dictation/insertAtSelection.js +48 -0
- package/dist/shared/dictation/pickRecognitionLocale.js +37 -0
- package/dist/shared/dictation/useDictation.js +299 -0
- package/dist/shared/getControlSize.js +50 -0
- package/dist/shared/getInputBoxStyle.js +93 -0
- package/dist/shared/getPropertyRowTextStyles.js +40 -0
- package/dist/shared/getSemanticColors.js +96 -0
- package/dist/shared/getToneColor.js +51 -0
- package/dist/shared/iosTextStyles.js +49 -0
- package/dist/shared/useBlockTokens.js +41 -0
- package/dist/skeleton/SkeletonFrameContext.js +21 -0
- package/dist/skeleton/SkeletonLine.js +46 -0
- package/dist/skeleton/SkeletonShape.js +140 -0
- package/dist/skeleton/createShimmerClock.js +57 -0
- package/dist/skeleton/shimmerClock.js +20 -0
- package/dist/skeleton/skeletonText.js +44 -0
- package/dist/skeleton/useShimmer.js +34 -0
- package/dist/types.js +23 -0
- package/dist/typography/TITLE_LEVEL_STYLES.js +24 -0
- package/dist/typography/TypographyText.js +78 -0
- package/dist/typography/getIosTextStyle.js +33 -0
- package/dist/typography/getTextStyle.js +94 -0
- package/dist/useComponentTokens.js +38 -0
- package/package.json +94 -3
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import textStyle from '../../schemas/textStyle.js';
|
|
16
|
+
export default {
|
|
17
|
+
category: 'display',
|
|
18
|
+
icons: [],
|
|
19
|
+
valueType: null,
|
|
20
|
+
cssKeys: {
|
|
21
|
+
element: 'The Title element.',
|
|
22
|
+
copyableIcon: 'The copyable icon in the Title. Not drawn on mobile.',
|
|
23
|
+
actions: 'The expand button next to the text.'
|
|
24
|
+
},
|
|
25
|
+
events: {
|
|
26
|
+
onExpand: {
|
|
27
|
+
description: 'Trigger action when the ellipsis expand or collapse button is clicked.',
|
|
28
|
+
event: {
|
|
29
|
+
expanded: 'True when the text was expanded, false when it was collapsed.'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
onCopy: 'Trigger action when copy text is clicked. Never fires on mobile.'
|
|
33
|
+
},
|
|
34
|
+
properties: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
additionalProperties: false,
|
|
37
|
+
properties: {
|
|
38
|
+
actions: {
|
|
39
|
+
nativeIgnored: true,
|
|
40
|
+
type: 'object',
|
|
41
|
+
additionalProperties: false,
|
|
42
|
+
description: 'Configure the bar of action buttons, such as copy and expand. Ignored on mobile.',
|
|
43
|
+
properties: {
|
|
44
|
+
placement: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
enum: [
|
|
47
|
+
'start',
|
|
48
|
+
'end'
|
|
49
|
+
],
|
|
50
|
+
default: 'end',
|
|
51
|
+
description: 'Place the action buttons before or after the text.'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
code: {
|
|
56
|
+
type: 'boolean',
|
|
57
|
+
default: false,
|
|
58
|
+
description: 'Apply code style.'
|
|
59
|
+
},
|
|
60
|
+
color: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'Title color.',
|
|
63
|
+
docs: {
|
|
64
|
+
displayType: 'color'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
content: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
description: 'Title text content - supports html. On mobile, tags are removed and the text is shown plain.'
|
|
70
|
+
},
|
|
71
|
+
copyable: {
|
|
72
|
+
nativeIgnored: true,
|
|
73
|
+
default: false,
|
|
74
|
+
oneOf: [
|
|
75
|
+
{
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
description: 'Provide copy text button. Ignored on mobile.'
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: 'object',
|
|
81
|
+
additionalProperties: false,
|
|
82
|
+
properties: {
|
|
83
|
+
text: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
description: 'Paragraph text to copy when clicked.'
|
|
86
|
+
},
|
|
87
|
+
icon: {
|
|
88
|
+
type: [
|
|
89
|
+
'string',
|
|
90
|
+
'object',
|
|
91
|
+
'array'
|
|
92
|
+
],
|
|
93
|
+
description: 'Copy icon, can be an array or two icons for before and after clicked.',
|
|
94
|
+
docs: {
|
|
95
|
+
displayType: 'icon'
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
tooltips: {
|
|
99
|
+
type: [
|
|
100
|
+
'string',
|
|
101
|
+
'array'
|
|
102
|
+
],
|
|
103
|
+
description: 'Tooltip text, can be an array or two strings for before and after clicked.',
|
|
104
|
+
docs: {
|
|
105
|
+
displayType: 'string'
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
delete: {
|
|
113
|
+
type: 'boolean',
|
|
114
|
+
default: false,
|
|
115
|
+
description: 'Apply deleted (strikethrough) style.'
|
|
116
|
+
},
|
|
117
|
+
disabled: {
|
|
118
|
+
type: 'boolean',
|
|
119
|
+
default: false,
|
|
120
|
+
description: 'Apply disabled style.'
|
|
121
|
+
},
|
|
122
|
+
ellipsis: {
|
|
123
|
+
default: false,
|
|
124
|
+
oneOf: [
|
|
125
|
+
{
|
|
126
|
+
type: 'boolean',
|
|
127
|
+
description: 'Display ellipsis when text overflows a single line.'
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: 'object',
|
|
131
|
+
additionalProperties: false,
|
|
132
|
+
properties: {
|
|
133
|
+
rows: {
|
|
134
|
+
type: 'number',
|
|
135
|
+
description: 'Max rows of content.'
|
|
136
|
+
},
|
|
137
|
+
expandable: {
|
|
138
|
+
type: [
|
|
139
|
+
'boolean',
|
|
140
|
+
'string'
|
|
141
|
+
],
|
|
142
|
+
enum: [
|
|
143
|
+
true,
|
|
144
|
+
false,
|
|
145
|
+
'collapsible'
|
|
146
|
+
],
|
|
147
|
+
description: "Show a button that expands the hidden content. Set to 'collapsible' to also allow collapsing it again."
|
|
148
|
+
},
|
|
149
|
+
defaultExpanded: {
|
|
150
|
+
type: 'boolean',
|
|
151
|
+
default: false,
|
|
152
|
+
description: 'Start with the content expanded.'
|
|
153
|
+
},
|
|
154
|
+
suffix: {
|
|
155
|
+
type: 'string',
|
|
156
|
+
description: 'Suffix of ellipses content.'
|
|
157
|
+
},
|
|
158
|
+
symbol: {
|
|
159
|
+
type: [
|
|
160
|
+
'string',
|
|
161
|
+
'array'
|
|
162
|
+
],
|
|
163
|
+
items: {
|
|
164
|
+
type: 'string'
|
|
165
|
+
},
|
|
166
|
+
description: 'Text of the expand button, or an array of two strings for the expand and collapse buttons.',
|
|
167
|
+
docs: {
|
|
168
|
+
displayType: 'string'
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
tooltip: {
|
|
172
|
+
type: [
|
|
173
|
+
'boolean',
|
|
174
|
+
'string'
|
|
175
|
+
],
|
|
176
|
+
nativeIgnored: true,
|
|
177
|
+
description: 'Show a tooltip when the text is truncated. true shows the full text, a string shows that text. Ignored on mobile.',
|
|
178
|
+
docs: {
|
|
179
|
+
displayType: 'string'
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
italic: {
|
|
187
|
+
type: 'boolean',
|
|
188
|
+
default: false,
|
|
189
|
+
description: 'Apply italic style.'
|
|
190
|
+
},
|
|
191
|
+
keyboard: {
|
|
192
|
+
type: 'boolean',
|
|
193
|
+
default: false,
|
|
194
|
+
description: 'Apply keyboard key style.'
|
|
195
|
+
},
|
|
196
|
+
level: {
|
|
197
|
+
type: 'number',
|
|
198
|
+
default: 1,
|
|
199
|
+
enum: [
|
|
200
|
+
1,
|
|
201
|
+
2,
|
|
202
|
+
3,
|
|
203
|
+
4,
|
|
204
|
+
5
|
|
205
|
+
],
|
|
206
|
+
description: 'Set title type. Matches with h1, h2, h3 and h4. On mobile the levels take the iOS text styles largeTitle (1), title1 (2), title2 (3), title3 (4) and headline (5).'
|
|
207
|
+
},
|
|
208
|
+
mark: {
|
|
209
|
+
type: 'boolean',
|
|
210
|
+
default: false,
|
|
211
|
+
description: 'Apply marked (highlighted) style.'
|
|
212
|
+
},
|
|
213
|
+
type: {
|
|
214
|
+
type: 'string',
|
|
215
|
+
default: 'default',
|
|
216
|
+
enum: [
|
|
217
|
+
'default',
|
|
218
|
+
'secondary',
|
|
219
|
+
'warning',
|
|
220
|
+
'danger',
|
|
221
|
+
'success'
|
|
222
|
+
],
|
|
223
|
+
description: "Additional types. Don't specify for default."
|
|
224
|
+
},
|
|
225
|
+
underline: {
|
|
226
|
+
type: 'boolean',
|
|
227
|
+
default: false,
|
|
228
|
+
description: 'Apply underline style.'
|
|
229
|
+
},
|
|
230
|
+
textStyle: {
|
|
231
|
+
...textStyle,
|
|
232
|
+
description: `${textStyle.description} Defaults to the style of the level.`
|
|
233
|
+
},
|
|
234
|
+
theme: {
|
|
235
|
+
type: 'object',
|
|
236
|
+
description: 'Antd design token overrides for this block. See <a href="https://ant.design/components/overview#design-token">antd design tokens</a>.',
|
|
237
|
+
docs: {
|
|
238
|
+
displayType: 'yaml',
|
|
239
|
+
link: 'https://ant.design/components/typography#design-token'
|
|
240
|
+
},
|
|
241
|
+
properties: {
|
|
242
|
+
titleMarginBottom: {
|
|
243
|
+
type: [
|
|
244
|
+
'string',
|
|
245
|
+
'number'
|
|
246
|
+
],
|
|
247
|
+
default: '0.5em',
|
|
248
|
+
description: 'Margin bottom of title, as a CSS length or a number of pixels.',
|
|
249
|
+
docs: {
|
|
250
|
+
displayType: 'string'
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
titleMarginTop: {
|
|
254
|
+
type: [
|
|
255
|
+
'string',
|
|
256
|
+
'number'
|
|
257
|
+
],
|
|
258
|
+
default: '1.2em',
|
|
259
|
+
description: 'Margin top of title, as a CSS length or a number of pixels.',
|
|
260
|
+
docs: {
|
|
261
|
+
displayType: 'string'
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
fontSizeHeading1: {
|
|
265
|
+
type: 'number',
|
|
266
|
+
default: 38,
|
|
267
|
+
description: 'Font size of h1 heading.'
|
|
268
|
+
},
|
|
269
|
+
fontSizeHeading2: {
|
|
270
|
+
type: 'number',
|
|
271
|
+
default: 30,
|
|
272
|
+
description: 'Font size of h2 heading.'
|
|
273
|
+
},
|
|
274
|
+
fontSizeHeading3: {
|
|
275
|
+
type: 'number',
|
|
276
|
+
default: 24,
|
|
277
|
+
description: 'Font size of h3 heading.'
|
|
278
|
+
},
|
|
279
|
+
fontSizeHeading4: {
|
|
280
|
+
type: 'number',
|
|
281
|
+
default: 20,
|
|
282
|
+
description: 'Font size of h4 heading.'
|
|
283
|
+
},
|
|
284
|
+
fontSizeHeading5: {
|
|
285
|
+
type: 'number',
|
|
286
|
+
default: 16,
|
|
287
|
+
description: 'Font size of h5 heading.'
|
|
288
|
+
},
|
|
289
|
+
lineHeightHeading1: {
|
|
290
|
+
type: 'number',
|
|
291
|
+
default: 1.2105,
|
|
292
|
+
description: 'Line height of h1 heading.'
|
|
293
|
+
},
|
|
294
|
+
lineHeightHeading2: {
|
|
295
|
+
type: 'number',
|
|
296
|
+
default: 1.2667,
|
|
297
|
+
description: 'Line height of h2 heading.'
|
|
298
|
+
},
|
|
299
|
+
lineHeightHeading3: {
|
|
300
|
+
type: 'number',
|
|
301
|
+
default: 1.3333,
|
|
302
|
+
description: 'Line height of h3 heading.'
|
|
303
|
+
},
|
|
304
|
+
lineHeightHeading4: {
|
|
305
|
+
type: 'number',
|
|
306
|
+
default: 1.4,
|
|
307
|
+
description: 'Line height of h4 heading.'
|
|
308
|
+
},
|
|
309
|
+
lineHeightHeading5: {
|
|
310
|
+
type: 'number',
|
|
311
|
+
default: 1.5,
|
|
312
|
+
description: 'Line height of h5 heading.'
|
|
313
|
+
},
|
|
314
|
+
fontWeightStrong: {
|
|
315
|
+
type: 'number',
|
|
316
|
+
default: 600,
|
|
317
|
+
description: 'Font weight for strong text.'
|
|
318
|
+
},
|
|
319
|
+
fontFamilyCode: {
|
|
320
|
+
type: 'string',
|
|
321
|
+
description: 'Font family for code style text.'
|
|
322
|
+
},
|
|
323
|
+
colorText: {
|
|
324
|
+
type: 'string',
|
|
325
|
+
description: 'Default text color.'
|
|
326
|
+
},
|
|
327
|
+
colorTextSecondary: {
|
|
328
|
+
type: 'string',
|
|
329
|
+
description: 'Secondary text color.'
|
|
330
|
+
},
|
|
331
|
+
colorSuccess: {
|
|
332
|
+
type: 'string',
|
|
333
|
+
description: 'Success text color.'
|
|
334
|
+
},
|
|
335
|
+
colorWarning: {
|
|
336
|
+
type: 'string',
|
|
337
|
+
description: 'Warning text color.'
|
|
338
|
+
},
|
|
339
|
+
colorError: {
|
|
340
|
+
type: 'string',
|
|
341
|
+
description: 'Danger/error text color.'
|
|
342
|
+
},
|
|
343
|
+
colorTextDisabled: {
|
|
344
|
+
type: 'string',
|
|
345
|
+
description: 'Disabled text color.'
|
|
346
|
+
},
|
|
347
|
+
colorLink: {
|
|
348
|
+
type: 'string',
|
|
349
|
+
description: 'Link color.'
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
};
|
package/dist/blocks.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export { default as ActivityTimeline } from './blocks/ActivityTimeline/ActivityTimeline.js';
|
|
16
|
+
export { default as AgentChat } from './blocks/AgentChat/AgentChat.js';
|
|
17
|
+
export { default as Alert } from './blocks/Alert/Alert.js';
|
|
18
|
+
export { default as Avatar } from './blocks/Avatar/Avatar.js';
|
|
19
|
+
export { default as Box } from './blocks/Box/Box.js';
|
|
20
|
+
export { default as Button } from './blocks/Button/Button.js';
|
|
21
|
+
export { default as Card } from './blocks/Card/Card.js';
|
|
22
|
+
export { default as ChipSelector } from './blocks/ChipSelector/ChipSelector.js';
|
|
23
|
+
export { default as Composer } from './blocks/Composer/Composer.js';
|
|
24
|
+
export { default as DateSelector } from './blocks/DateSelector/DateSelector.js';
|
|
25
|
+
export { default as Divider } from './blocks/Divider/Divider.js';
|
|
26
|
+
export { default as Empty } from './blocks/Empty/Empty.js';
|
|
27
|
+
export { default as FileInput } from './blocks/FileInput/FileInput.js';
|
|
28
|
+
export { default as Icon } from './blocks/Icon/Icon.js';
|
|
29
|
+
export { default as Illustration } from './blocks/Illustration/Illustration.js';
|
|
30
|
+
export { default as List } from './blocks/List/List.js';
|
|
31
|
+
export { default as ListItem } from './blocks/ListItem/ListItem.js';
|
|
32
|
+
export { default as Map } from './blocks/Map/Map.js';
|
|
33
|
+
export { default as Markdown } from './blocks/Markdown/Markdown.js';
|
|
34
|
+
export { default as Menu } from './blocks/Menu/Menu.js';
|
|
35
|
+
export { default as MultipleSelector } from './blocks/MultipleSelector/MultipleSelector.js';
|
|
36
|
+
export { default as NumberInput } from './blocks/NumberInput/NumberInput.js';
|
|
37
|
+
export { default as PageDots } from './blocks/PageDots/PageDots.js';
|
|
38
|
+
export { default as Paragraph } from './blocks/Paragraph/Paragraph.js';
|
|
39
|
+
export { default as QRScanner } from './blocks/QRScanner/QRScanner.js';
|
|
40
|
+
export { default as SegmentedControl } from './blocks/SegmentedControl/SegmentedControl.js';
|
|
41
|
+
export { default as Selector } from './blocks/Selector/Selector.js';
|
|
42
|
+
export { default as Sheet } from './blocks/Sheet/Sheet.js';
|
|
43
|
+
export { default as SignaturePad } from './blocks/SignaturePad/SignaturePad.js';
|
|
44
|
+
export { default as Skeleton } from './blocks/Skeleton/Skeleton.js';
|
|
45
|
+
export { default as Spinner } from './blocks/Spinner/Spinner.js';
|
|
46
|
+
export { default as StatusIcon } from './blocks/StatusIcon/StatusIcon.js';
|
|
47
|
+
export { default as Switch } from './blocks/Switch/Switch.js';
|
|
48
|
+
export { default as Tabs } from './blocks/Tabs/Tabs.js';
|
|
49
|
+
export { default as Tag } from './blocks/Tag/Tag.js';
|
|
50
|
+
export { default as TextArea } from './blocks/TextArea/TextArea.js';
|
|
51
|
+
export { default as TextInput } from './blocks/TextInput/TextInput.js';
|
|
52
|
+
export { default as Title } from './blocks/Title/Title.js';
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // The shell that carries each device feature: a capability profile, or a shell extension.
|
|
16
|
+
const FEATURE_SHELLS = {
|
|
17
|
+
audio: 'profile field',
|
|
18
|
+
brightness: 'profile field',
|
|
19
|
+
calendar: 'the calendar extension',
|
|
20
|
+
camera: 'profile field',
|
|
21
|
+
contacts: 'the contacts extension',
|
|
22
|
+
documentScanner: 'profile field',
|
|
23
|
+
files: 'profile basic',
|
|
24
|
+
haptics: 'profile basic',
|
|
25
|
+
keepAwake: 'profile basic',
|
|
26
|
+
location: 'profile field',
|
|
27
|
+
maps: 'profile field',
|
|
28
|
+
nfc: 'profile field-nfc',
|
|
29
|
+
notifications: 'profile basic',
|
|
30
|
+
photos: 'profile basic',
|
|
31
|
+
requestQueue: 'profile basic',
|
|
32
|
+
share: 'profile basic',
|
|
33
|
+
speech: 'profile basic',
|
|
34
|
+
tracking: 'profile field-tracking',
|
|
35
|
+
upload: 'profile basic',
|
|
36
|
+
widgets: 'the widgets extension'
|
|
37
|
+
};
|
|
38
|
+
// The device features the shell installed at boot (installDevice). blocks-native imports no native
|
|
39
|
+
// module for them: the shell owns every module and installs only what its profile carries.
|
|
40
|
+
let installed = {};
|
|
41
|
+
/**
|
|
42
|
+
* Installs the device features native actions and blocks reach the phone through:
|
|
43
|
+
* `{ [feature]: implementation }`, with the features of FEATURE_SHELLS. The shell installs the ones
|
|
44
|
+
* its profile and extensions carry; Lowdefy Dev wraps them so injected results answer first.
|
|
45
|
+
*
|
|
46
|
+
* @param {Object} device
|
|
47
|
+
* @returns {() => void} Removes it.
|
|
48
|
+
*/ function installDevice(device) {
|
|
49
|
+
installed = device;
|
|
50
|
+
return ()=>{
|
|
51
|
+
if (installed === device) {
|
|
52
|
+
installed = {};
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Whether the shell carries a device feature.
|
|
58
|
+
*
|
|
59
|
+
* @param {string} feature
|
|
60
|
+
*/ function hasDeviceFeature(feature) {
|
|
61
|
+
return installed[feature] !== undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* One device feature, for the action that needs it. A shell without it throws a message naming the
|
|
65
|
+
* profile or extension that carries it, which the action's onError can handle.
|
|
66
|
+
*
|
|
67
|
+
* @param {Object} params
|
|
68
|
+
* @param {string} params.feature A key of FEATURE_SHELLS.
|
|
69
|
+
* @param {string} params.action The action or block asking, for the message.
|
|
70
|
+
*/ function getDeviceFeature({ feature, action }) {
|
|
71
|
+
if (!Object.prototype.hasOwnProperty.call(FEATURE_SHELLS, feature)) {
|
|
72
|
+
throw new Error(`Unknown device feature ${JSON.stringify(feature)}.`);
|
|
73
|
+
}
|
|
74
|
+
const implementation = installed[feature];
|
|
75
|
+
if (implementation === undefined) {
|
|
76
|
+
throw new Error(`${action} needs a shell that carries ${feature} (${FEATURE_SHELLS[feature]}). This app's shell does not.`);
|
|
77
|
+
}
|
|
78
|
+
return implementation;
|
|
79
|
+
}
|
|
80
|
+
export { FEATURE_SHELLS, hasDeviceFeature, installDevice };
|
|
81
|
+
export default getDeviceFeature;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { hasDeviceFeature } from './getDeviceFeature.js';
|
|
16
|
+
import getDeviceFeature from './getDeviceFeature.js';
|
|
17
|
+
/**
|
|
18
|
+
* The light haptic a native control plays when it changes (a toggle, a pick, a full swipe). Every
|
|
19
|
+
* shell carries haptics; under Jest, or where the shell installed none, the control is silent.
|
|
20
|
+
* Never awaited: feedback must not hold up the change.
|
|
21
|
+
*
|
|
22
|
+
* @param {'selection'|'light'|'medium'|'heavy'|'success'|'warning'|'error'} type
|
|
23
|
+
*/ function playFeedback(type = 'selection') {
|
|
24
|
+
if (!hasDeviceFeature('haptics')) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
getDeviceFeature({
|
|
28
|
+
feature: 'haptics',
|
|
29
|
+
action: 'feedback'
|
|
30
|
+
})(type).catch(()=>{});
|
|
31
|
+
}
|
|
32
|
+
export default playFeedback;
|
package/dist/device.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // The shell's hook into the native actions and blocks: it installs the device features its profile
|
|
16
|
+
// carries at boot (src/device/getDeviceFeature.js).
|
|
17
|
+
export { FEATURE_SHELLS, hasDeviceFeature, installDevice } from './device/getDeviceFeature.js';
|
|
18
|
+
export { default as getDeviceFeature } from './device/getDeviceFeature.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // Lowdefy Dev's hook into the native inputs' dictation (src/shared/dictation): it installs a
|
|
16
|
+
// stand-in recogniser that plays injected transcripts.
|
|
17
|
+
export { installDictationSource } from './shared/dictation/getRecognizer.js';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { type } from '@lowdefy/helpers';
|
|
16
|
+
const entities = {
|
|
17
|
+
'&': '&',
|
|
18
|
+
'<': '<',
|
|
19
|
+
'>': '>',
|
|
20
|
+
'"': '"',
|
|
21
|
+
''': "'",
|
|
22
|
+
' ': ' '
|
|
23
|
+
};
|
|
24
|
+
// Text properties that "support html" on the web are shown as plain text on a phone: line breaks
|
|
25
|
+
// and paragraph ends become new lines, other tags are dropped and the common entities decoded.
|
|
26
|
+
function htmlToText(html) {
|
|
27
|
+
if (!type.isString(html)) {
|
|
28
|
+
return html;
|
|
29
|
+
}
|
|
30
|
+
return html.replace(/<br\s*\/?>/gi, '\n').replace(/<\/p>\s*<p[^>]*>/gi, '\n').replace(/<[^<>]*>/g, '').replace(/&(amp|lt|gt|quot|#39|nbsp);/g, (entity)=>entities[entity]);
|
|
31
|
+
}
|
|
32
|
+
export default htmlToText;
|
package/dist/metas.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export { default as ActivityTimeline } from './blocks/ActivityTimeline/meta.js';
|
|
16
|
+
export { default as AgentChat } from './blocks/AgentChat/meta.js';
|
|
17
|
+
export { default as Alert } from './blocks/Alert/meta.js';
|
|
18
|
+
export { default as Avatar } from './blocks/Avatar/meta.js';
|
|
19
|
+
export { default as Box } from './blocks/Box/meta.js';
|
|
20
|
+
export { default as Button } from './blocks/Button/meta.js';
|
|
21
|
+
export { default as Card } from './blocks/Card/meta.js';
|
|
22
|
+
export { default as ChipSelector } from './blocks/ChipSelector/meta.js';
|
|
23
|
+
export { default as Composer } from './blocks/Composer/meta.js';
|
|
24
|
+
export { default as DateSelector } from './blocks/DateSelector/meta.js';
|
|
25
|
+
export { default as Divider } from './blocks/Divider/meta.js';
|
|
26
|
+
export { default as Empty } from './blocks/Empty/meta.js';
|
|
27
|
+
export { default as FileInput } from './blocks/FileInput/meta.js';
|
|
28
|
+
export { default as Icon } from './blocks/Icon/meta.js';
|
|
29
|
+
export { default as Illustration } from './blocks/Illustration/meta.js';
|
|
30
|
+
export { default as List } from './blocks/List/meta.js';
|
|
31
|
+
export { default as ListItem } from './blocks/ListItem/meta.js';
|
|
32
|
+
export { default as Map } from './blocks/Map/meta.js';
|
|
33
|
+
export { default as Markdown } from './blocks/Markdown/meta.js';
|
|
34
|
+
export { default as Menu } from './blocks/Menu/meta.js';
|
|
35
|
+
export { default as MultipleSelector } from './blocks/MultipleSelector/meta.js';
|
|
36
|
+
export { default as NumberInput } from './blocks/NumberInput/meta.js';
|
|
37
|
+
export { default as PageDots } from './blocks/PageDots/meta.js';
|
|
38
|
+
export { default as Paragraph } from './blocks/Paragraph/meta.js';
|
|
39
|
+
export { default as QRScanner } from './blocks/QRScanner/meta.js';
|
|
40
|
+
export { default as Screen } from './blocks/Screen/meta.js';
|
|
41
|
+
export { default as SegmentedControl } from './blocks/SegmentedControl/meta.js';
|
|
42
|
+
export { default as Selector } from './blocks/Selector/meta.js';
|
|
43
|
+
export { default as Sheet } from './blocks/Sheet/meta.js';
|
|
44
|
+
export { default as SignaturePad } from './blocks/SignaturePad/meta.js';
|
|
45
|
+
export { default as Skeleton } from './blocks/Skeleton/meta.js';
|
|
46
|
+
export { default as Spinner } from './blocks/Spinner/meta.js';
|
|
47
|
+
export { default as StatusIcon } from './blocks/StatusIcon/meta.js';
|
|
48
|
+
export { default as Switch } from './blocks/Switch/meta.js';
|
|
49
|
+
export { default as Tabs } from './blocks/Tabs/meta.js';
|
|
50
|
+
export { default as Tag } from './blocks/Tag/meta.js';
|
|
51
|
+
export { default as TextArea } from './blocks/TextArea/meta.js';
|
|
52
|
+
export { default as TextInput } from './blocks/TextInput/meta.js';
|
|
53
|
+
export { default as Title } from './blocks/Title/meta.js';
|