Package-level declarations
Functions
Streams this PlatformFile's content as a Flow of chunkSize-byte chunks, without loading the whole file into memory at once — the mechanism behind GetFile's flowOfBytes() output type, meant for large files where arrayOfBytes() would be wasteful. Actual reading is platform-specific (expect/actual), since each platform's own file APIs differ.
Collects this SharedFlow inside a LaunchedEffect keyed on key, running action for each emitted value via collectLatest — a still-running action from a previous emission is cancelled when a new one arrives, rather than queued. The shared low-level primitive behind observeScreenTileBroadcastChannel and observeSystemBroadcastChannel below.
Converts epoch millis (as produced by Compose M3's DatePickerState) to the ISO yyyy-MM-dd string DatePicker's schema stores/produces (selectedDate).
Same as extractAndPutIfPresent, but also copies an explicit null value from data (applying ifPresent to it too) — only skips the copy when key is entirely absent from data.
Filters the children a container tile should render according to its filterChildrenByTerm.
Whether this DatePicker's state is ERROR — used by its renderer to switch the underlying Material field into error styling.
Whether this DropdownList's state is ERROR — used by its renderer to switch the underlying Material field into error styling.
Whether this TextField's state is ERROR — used by its renderer to switch the underlying Material field into error styling.
Whether this TimePicker's state is ERROR — used by its renderer to switch the underlying Material field into error styling.
Formats an hour/minute pair as the zero-padded ISO HH:mm string TimePicker's schema stores/produces (selectedTime).
Wraps this optional IconSchema into a clickable @Composable lambda — an IconButton wrapping Icon and firing onClick. Used by tiles like TextField, where clickableLeadingIcon/ clickableTrailingIcon decides whether the optional icon should be wrapped this way or rendered plainly via iconOrNull instead.
Wraps this optional IconSchema into a plain, non-clickable @Composable lambda rendering it via Icon — the usual way a tile with an optional icon field (e.g. AssistChip.leadingIcon) conditionally renders it without an explicit if (icon != null) at every call site.
Converts an ISO yyyy-MM-dd string (DatePicker.selectedDate) to epoch millis, for feeding Compose M3's DatePickerState — the inverse of epochMillisToIsoDate.
Parses an ISO HH:mm string (TimePicker.selectedTime) back into an hour/minute pair — the inverse of hourMinuteToIsoTime.
Converts this TextField's own nested keyboardOptions schema into a Compose KeyboardOptions — showKeyboardOnFocus (schema field name; the DSL builder's own parameter for it is howKeyboardOnFocus, a typo in the framework's own keyboardOptions() builder function, not in this schema) maps directly to Compose's own showKeyboardOnFocus.
Applies block to this Result's exception, replacing it with the returned Throwable — a no-op on a successful Result. Used to translate a lower-level exception (e.g. a raw NetworkResponseException) into a more specific one before it reaches an EventRunner's onFailure handling.
Subscribes this tile to its screen's own broadcast channel (reached via LocalScreenTilesBroadcastChannel), running action for every emitted ScreenTilesBroadcastData of type T — the composable-side counterpart of EventRunningScope.broadcastData, and the mechanism a tile's own renderer uses to react to a screen-scoped command addressed to it (scroll commands, overlay open/close, etc.).
Same as the LazyListState overload above, for a plain (non-lazy) ScrollState — the mechanism behind Column/Row's own OnScrolled trigger when scrollable = true. Direction is derived by comparing the current scroll offset (ScrollState.value) against the previous one.
Observes this LazyListState's scroll position and calls onScrollForward/onScrollBackward every time the scroll direction actually changes (not on every scroll delta) — the real mechanism behind LazyColumn/LazyRow's OnScrolled trigger (ScrollDirection.Bottom/End maps to onScrollForward, ScrollDirection.Top/Start to onScrollBackward).
Subscribes to the app-wide SystemBroadcastChannel (resolved via Koin), running action for every published SystemBroadcastData — the composable-side counterpart of BroadcastToSystem, and the mechanism behind SystemBroadcastListener's OnSystemBroadcast(broadcastId) trigger, reaching across screens rather than being scoped to one.
callbackFor specialized for EventTriggers.onClick() — the standard way a tile renderer wires up Modifier.styledWith's onClick/a composable's own onClick parameter, only when the tile actually declares an OnClick event.
Fires EventTriggers.onDisplay() once, the first time this composable enters composition — the standard way every built-in container/interactive tile implements its own OnDisplay trigger. Keyed on tileId, so it re-fires only if the tile identity itself changes (a new instance with a different id), not on every recomposition.
callbackFor specialized for EventTriggers.onLongPress() — same pattern as onClick, for Modifier.styledWith's onLongClick.
Resolves an OffsetType to a concrete pixel offset given the axis' fullSize — a slide transition's initialOffset/targetOffset is one of these, since Compose's own slideInHorizontally/slideInVertically only learn the real container size at draw time.
Runs riskyBlock (an HTTP call) via safeResult, additionally treating a non-2xx response as a failure — turning it into a failed Result carrying a NetworkResponseException (with the response's status and body text) rather than a successful Result wrapping an error response.
Runs riskyBlock, wrapping any thrown Throwable into a failed Result instead of letting it propagate — the standard way a use case in mosaic-client/.../domain turns a throwing call into a Result-returning one.
Sniffs the mime type of raw image bytes from their magic-byte signature.
Fires onThresholdReached when the last visible item of lazyListState comes within this many items of the end of the list — the infinite-scroll pagination guard behind LazyColumn/LazyRow's scrollThreshold and their OnScrollThresholdReached trigger. Public and reusable outside the built-in lazy tiles for a custom lazy-list-style tile that wants the same pagination behavior.
Converts the wire-format AlignmentSchema.Horizontal into its Compose Alignment.Horizontal counterpart — used by any renderer applying alignHorizontallyToX().
Converts the wire-format AlignmentSchema.TwoDimensional into its Compose Alignment counterpart — used by Box/AsyncImage/Popup and any other tile taking a 2D alignment.
Converts the wire-format AlignmentSchema.Vertical into its Compose Alignment.Vertical counterpart — used by any renderer applying alignVerticallyToX().
Converts a horizontal ArrangementSchema — including the axis-agnostic ArrangementSchema.HorizontalOrVertical cases — into its Compose Arrangement.Horizontal counterpart. Used by Row/LazyRow/FlowRow's arrangement.
Converts the axis-agnostic ArrangementSchema.HorizontalOrVertical cases (Center, SpaceAround, SpaceBetween, SpaceEvenly) into their Compose counterpart, valid on either axis.
Converts a vertical ArrangementSchema — including the axis-agnostic ArrangementSchema.HorizontalOrVertical cases — into its Compose Arrangement.Vertical counterpart. Used by Column/LazyColumn's arrangement.
Converts a BackgroundSchema into the Compose Brush that renders it.
Combines every entry into a single Compose EnterTransition via repeated + composition — an empty list resolves to EnterTransition.None.
Combines every entry into a single Compose ExitTransition via repeated + composition — an empty list resolves to ExitTransition.None.
Converts a ColorSchema into its Compose Color counterpart — ColorSchema.Hex and ColorSchema.Rgba resolve directly, while ColorSchema.Theme reads the matching role off MaterialTheme.colorScheme, which is why this is @Composable at all (and, in turn, why it always reflects the app's current theme, including a live SetTheme swap).
Converts the wire-format EasingType into its Compose Easing counterpart, used inside AnimationSpecSchema.toTweenOrSpring to build a tween's curve.
Converts the wire-format WindowInsetsSchema into its Compose WindowInsets counterpart — used by Modifier.styledWith to apply style.windowInsets, the first modifier in the fixed style application order.
Converts a CompressionScheme (TakePicture/GetImageFromGallery's compression) into the cmpimgcompress library's own CompressionConfig.
Converts AsyncImage's own nested ContentScale enum into its Compose ContentScale counterpart. A distinct type from ImageContentScaleSchema.toContentScale below despite the identical set of cases — AsyncImage and Image each declare their own ContentScale type on the wire, so their DSL helpers (cropContentScale() vs imageCropContentScale(), etc.) aren't interchangeable either.
Converts Image's own nested ContentScale enum into its Compose ContentScale counterpart — see AsyncContentScaleSchema.toContentScale above for why this is a separate function rather than a shared one.
Converts a ContentTransitionSchema (a screen/entry's declared transition/popTransition/ predictivePopTransition) into the Compose ContentTransform NavDisplay's transitionSpec expects — the mechanism behind MosaicApplication's screen transition wiring.
Converts an EnterTransitionSchema into its Compose EnterTransition counterpart.
Converts an ExitTransitionSchema into its Compose ExitTransition counterpart. ExitTransitionSchema.KeepUntilTransitionsFinished currently resolves to ExitTransition.None as a placeholder, pending Compose's own ExitTransition.KeepUntilTransitionsFinished becoming public API.
Converts OpenFilePicker's pickMode into the filekit library's own FileKitMode. Only Single exists on the schema today, matching filekit's own FileKitMode.Single.
Converts OpenFilePicker's fileType into the filekit library's own FileKitType, which OpenFilePickerEventRunner passes to the platform's native file picker dialog.
Converts the wire-format FontFamilySchema into its Compose FontFamily counterpart — used wherever SimpleText/TextField and similar text-bearing tiles resolve fontFamily.
Converts the wire-format FontStyleSchema into its Compose FontStyle counterpart — used wherever SimpleText/TextField resolve fontStyle.
Converts the wire-format FontWeightSchema into its Compose FontWeight counterpart — used wherever SimpleText/TextField resolve fontWeight.
Converts the wire-format HttpMethod into Ktor's own HttpMethod — every networking event (SendNetworkRequest, UploadFile, the download events, GetScreen/RefreshScreen) resolves its method through this before issuing the real request.
Converts the wire-format IconSchema.Style into the MaterialSymbolStyle the Icon composable expects.
Converts a MarginSchema into a Compose PaddingValues — used by Modifier.styledWith to apply style.margin. style.padding is a distinct dev.catbit.mosaic.core.data.schemas.tile.style.PaddingSchema with its own PaddingSchema.toPaddingValues extension, despite the identical field shape.
Converts a PaddingSchema into a Compose PaddingValues — used by Modifier.styledWith to apply style.padding. style.margin is a distinct dev.catbit.mosaic.core.data.schemas.tile.style.MarginSchema with its own MarginSchema.toPaddingValues extension, despite the identical field shape.
Converts an ImageResizeOptions (TakePicture/GetImageFromGallery's resize) into the cmpimgcompress library's own ResizeOptions. Only takes effect when paired with a non-null CompressionScheme — resizing is applied as part of the same re-encode pass.
Converts a RadiusSchema into a Compose RoundedCornerShape — used for style.border's own corner radius, and (via ShapeSchema.toShape) for style.clip's RoundedCornerRectangle variant.
Converts a ShapeSchema into its Compose Shape counterpart — used by Modifier.styledWith to apply style.clip.
Converts the wire-format TextAlignSchema into its Compose TextAlign counterpart — used by SimpleText's textAlign.
Converts an AutoSizeSchema into its Compose TextAutoSize counterpart — used by SimpleText's autoSize to shrink/grow the font to fit the available space.
Converts the wire-format TextDecorationSchema into its Compose TextDecoration counterpart — used by SimpleText's textDecoration.
Converts the wire-format TextOverflowSchema into its Compose TextOverflow counterpart — used by SimpleText's overflow.
Converts the wire-format TypographySchema into the matching TextStyle off MaterialTheme.typography — used by SimpleText's typography to resolve the base text style, which every other styling field on SimpleText then overrides one property of.
Applies block to a MutableStateFlow<*>'s current value as if it were statically typed MutableStateFlow<R> — for call sites holding a type-erased state flow (e.g. a sealed UI-state flow narrowed to one specific subtype at a given point) that still want a type-safe update {}. A no-op if the flow's current value isn't actually non-null (via withNotNull) — this doesn't itself verify the value is really an instance of R; an unchecked cast that doesn't hold throws inside block.
Converts this TextField's visualTransformation into a Compose VisualTransformation — Password maps to Compose's own dot-masking transform, Custom(mask) to CustomVisualTransformation below, anything else (including null) to VisualTransformation.None.