Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/mobile/deps/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The Enriched Markdown tarball comes from Julius's [`fork/t3-mobile` branch](https://github.com/pingdotgg/enriched-markdown/tree/fork/t3-mobile). Its `t3-fork.json` records the exact source commit and upstream base. React block renderers and signed image sources (`renderers`, `resolveImageSource`) are upstream. The fork carries native streaming memory bounds (an 8 MiB measurement-key budget and coalesced pending renders), plus changes with an open upstream PR: the `onLinksChange` link list that link pills and iOS link menus read ([#1088](https://github.com/software-mansion/enriched-markdown/pull/1088)), Android inline image alignment ([#1089](https://github.com/software-mansion/enriched-markdown/pull/1089)), clipboard link metadata ([#962](https://github.com/software-mansion/enriched-markdown/pull/962)), development-host autolinks ([#961](https://github.com/software-mansion/enriched-markdown/pull/961)), and `md4cFlags.preserveWindowsPaths`, which keeps backslashes in Windows drive paths in prose ([#1105](https://github.com/software-mansion/enriched-markdown/pull/1105), after [md4c#5](https://github.com/software-mansion-labs/md4c/pull/5)).
The Enriched Markdown tarball's `t3-fork.json` records its source repository, exact commit, and upstream base. The current archive comes from [the icon-preserving link wrapping fork](https://github.com/PixPMusic/enriched-markdown/commit/879c08a7), based on Julius's `fork/t3-mobile` branch. React block renderers and signed image sources (`renderers`, `resolveImageSource`) are upstream. The fork carries native streaming memory bounds (an 8 MiB measurement-key budget and coalesced pending renders), plus changes with an open upstream PR: the `onLinksChange` link list that link pills and iOS link menus read ([#1088](https://github.com/software-mansion/enriched-markdown/pull/1088)), Android inline image alignment ([#1089](https://github.com/software-mansion/enriched-markdown/pull/1089)), clipboard link metadata ([#962](https://github.com/software-mansion/enriched-markdown/pull/962)), development-host autolinks ([#961](https://github.com/software-mansion/enriched-markdown/pull/961)), and `md4cFlags.preserveWindowsPaths`, which keeps backslashes in Windows drive paths in prose ([#1105](https://github.com/software-mansion/enriched-markdown/pull/1105), after [md4c#5](https://github.com/software-mansion-labs/md4c/pull/5)).

To replace it, commit the fork changes, run `yarn install --immutable` and `yarn workspace react-native-enriched-markdown prepare` in the fork checkout, then `node scripts/pack-t3.mjs /path/to/t3code/apps/mobile/deps`. Keep the package version aligned with Julius's `fork/t3-mobile` branch. Rename the archive to include the first eight characters of the source commit, such as `react-native-enriched-markdown-1.2.0-t3.16-8d2f84a8.tgz`, so each build has a distinct dependency path without version bumps. Update the tarball path in `apps/mobile/package.json` and `pnpm-workspace.yaml`'s `allowBuilds`, and run `vp i` to update the lockfile. Native clients need rebuilding when this dependency changes.

Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"react-dom": "catalog:",
"react-native": "0.88.0",
"react-native-blob-util": "0.25.1",
"react-native-enriched-markdown": "file:deps/react-native-enriched-markdown-1.2.0-t3.16-29ddd424.tgz",
"react-native-enriched-markdown": "file:deps/react-native-enriched-markdown-1.2.0-t3.16-879c08a7.tgz",
"react-native-gesture-handler": "~3.3.0",
"react-native-image-viewing": "^0.2.2",
"react-native-keyboard-controller": "1.22.8",
Expand Down
6 changes: 4 additions & 2 deletions apps/mobile/src/native/useEnrichedLinkVariants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,17 @@ export function useEnrichedLinkVariants(
Object.fromEntries(
[...links].map(([url, link]) => {
const chipForeground = chipForegrounds.get(url);
const wrap = !link.chip && link.label === undefined;
return [
enrichedLinkVariantPattern(url),
{
pill: {
wrap,
borderColor: "transparent",
borderWidth: 0,
borderRadius: 6,
paddingHorizontal: 5,
paddingVertical: 2,
paddingHorizontal: wrap ? 0 : 5,
paddingVertical: wrap ? 0 : 2,
},
fontFamily: chipForeground ? FONT_FAMILIES.medium : textStyle.fontFamily,
color: chipForeground ?? link.color ?? textStyle.fileTextColor,
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ allowBuilds:
node-pty: true
# Ships N-API prebuilds; its install script only rebuilds from source.
objc-js: false
"react-native-enriched-markdown@file:apps/mobile/deps/react-native-enriched-markdown-1.2.0-t3.16-29ddd424.tgz": true
"react-native-enriched-markdown@file:apps/mobile/deps/react-native-enriched-markdown-1.2.0-t3.16-879c08a7.tgz": true
sharp: true
utf-8-validate: false
workerd: false
Expand Down
Loading