Skip to content

Commit 7d973dc

Browse files
stibel5ZYSZ3K
authored andcommitted
fix(packages): install missing packages, restore @jsamr packages
1 parent 10205a2 commit 7d973dc

File tree

12 files changed

+40
-147
lines changed

12 files changed

+40
-147
lines changed

apps/benchmarking/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"eject": "expo eject"
1010
},
1111
"dependencies": {
12+
"@jsamr/counter-style": "^2.0.2",
13+
"@jsamr/react-native-li": "^2.3.1",
14+
"css-to-react-native": "^3.2.0",
1215
"expo": "^54.0.15",
1316
"expo-keep-awake": "~15.0.7",
1417
"expo-status-bar": "~3.0.8",
@@ -20,7 +23,8 @@
2023
"react-native-render-html-v5": "npm:react-native-render-html@^5.0.0",
2124
"react-native-safe-area-context": "^5.6.1",
2225
"react-native-web": "^0.21.2",
23-
"react-states": "^5.0.0"
26+
"react-states": "^5.0.0",
27+
"urijs": "^1.19.11"
2428
},
2529
"devDependencies": {
2630
"@babel/core": "^7.28.4"

apps/benchmarking/profiles.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
// import ProfileSimple from './profiles/ProfileSimple';
21
import ProfileV5 from './profiles/ProfileV5';
32
import ProfileV6Source from './profiles/ProfileV6Source';
43

54
const profiles = [
6-
// Disabled because of htmlparser resolution
7-
// {
8-
// name: 'Simple implementation',
9-
// component: ProfileSimple
10-
// },
115
{
126
name: 'V5',
137
component: ProfileV5,

apps/benchmarking/profiles/ProfileSimple.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

apps/benchmarking/profiles/RenderHtmlSimple.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

apps/discovery/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@expo-google-fonts/space-mono": "^0.4.2",
2424
"@expo/vector-icons": "^15.0.3",
2525
"@gorhom/bottom-sheet": "^5.2.6",
26+
"@jsamr/counter-style": "^2.0.2",
2627
"@jsamr/react-native-li": "^2.3.1",
2728
"@mobily/stacks": "^2.2.2",
2829
"@react-native-community/masked-view": "0.1.11",
@@ -34,6 +35,7 @@
3435
"@react-navigation/stack": "^7.4.10",
3536
"change-case": "^5.4.4",
3637
"color": "^5.0.2",
38+
"css-to-react-native": "^3.2.0",
3739
"deepmerge": "^4.3.1",
3840
"expo": "^54.0.15",
3941
"expo-asset": "~12.0.9",

apps/discovery/src/providers/PageToolkitProvider.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import CardColorRolesProvider from '../components/croles/CardColorRolesProvider'
2626
import { Linking, StyleSheet } from 'react-native';
2727
import BoxNucleon from '../components/nucleons/BoxNucleon';
2828
import { WEBSITE_URL } from '@doc/constants';
29-
import URI from 'urijs';
3029
import TNodeTransformDisplayOrganism from '../components/TNodeTransformDisplayOrganism';
3130
import UICardContainer from '../components/UICardContainer';
3231
import { BODY_PARAGRAPH_SPACING } from '../constants';
@@ -82,7 +81,7 @@ function RefAPI({
8281
const fullName =
8382
(member && full ? `${name}.${member}` : member ? member : name) +
8483
pluralMark;
85-
const fullUrl = new URI(WEBSITE_URL + url).normalizePath().href();
84+
const fullUrl = new URL(url, WEBSITE_URL).href;
8685
return (
8786
<UIHyperlinkAtom
8887
role="bodyAPIRef"

packages/css-processor/src/CSSInlineParseRun.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
// TEMPORARY: Commented out for benchmarking app compatibility
2-
// import { getPropertyName } from 'css-to-react-native';
3-
4-
// TEMPORARY: Simple stub to convert CSS property names to camelCase
5-
function getPropertyName(cssProperty: string): string {
6-
return cssProperty.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
7-
}
8-
1+
import { getPropertyName } from 'css-to-react-native';
92
import { CSSParseRun } from './CSSParseRun';
103
import { MixedStyleDeclaration } from './CSSProcessor';
114
import { CSSPropertiesValidationRegistry } from './CSSPropertiesValidationRegistry';

packages/css-processor/src/validators/expandCSSToRN.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
// TEMPORARY: Commented out for benchmarking app compatibility
2-
// import { getStylesForProperty } from 'css-to-react-native';
3-
4-
// TEMPORARY: Simple stub that returns null (skips shorthand expansion)
5-
// In production, this would use css-to-react-native to expand shorthand properties
6-
function getStylesForProperty(propertyName: string, value: string): any {
7-
// Return a simple object with the property - not a full expansion but sufficient for benchmarking
8-
const camelCaseName = propertyName.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
9-
return { [camelCaseName]: value };
10-
}
1+
import { getStylesForProperty } from 'css-to-react-native';
112

123
export default function expandCSSToRN(propertyName: string, value: string) {
134
try {

packages/render-html/src/elements/ListElement.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
import { DimensionValue, StyleSheet, View } from 'react-native';
22
import React from 'react';
33
import { TBlock, TNode } from '@native-html/transient-render-engine';
4-
// TEMPORARY: Commented out for benchmarking app compatibility
5-
// import { MarkedListItem, useMarkedList } from '@jsamr/react-native-li';
6-
7-
// TEMPORARY: Simple stubs for benchmarking
8-
const MarkedListItem = ({ children, style }: any) => <View style={style}>{children}</View>;
9-
const useMarkedList = (config: any) => ({
10-
markerTextStyle: config.markerTextStyle || {},
11-
markerBoxStyle: config.markerBoxStyle || {},
12-
markerTextWidth: false as const,
13-
style: {},
14-
});
15-
4+
import { MarkedListItem, useMarkedList } from '@jsamr/react-native-li';
165
import type {
176
DefaultSupportedListStyleType,
187
InternalRendererProps,

packages/render-html/src/elements/defaultListStyleSpecs.ts

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
// TEMPORARY: Commented out for benchmarking app compatibility
2-
// import CounterStyle from '@jsamr/counter-style';
3-
// import decimal from '@jsamr/counter-style/presets/decimal';
4-
// import decimalLeadingZero from '@jsamr/counter-style/presets/decimalLeadingZero';
5-
// import lowerRoman from '@jsamr/counter-style/presets/lowerRoman';
6-
// import lowerAlpha from '@jsamr/counter-style/presets/lowerAlpha';
7-
// import lowerGreek from '@jsamr/counter-style/presets/lowerGreek';
8-
// import upperAlpha from '@jsamr/counter-style/presets/upperAlpha';
9-
// import upperRoman from '@jsamr/counter-style/presets/upperRoman';
1+
import CounterStyle from '@jsamr/counter-style';
2+
import decimal from '@jsamr/counter-style/presets/decimal';
3+
import decimalLeadingZero from '@jsamr/counter-style/presets/decimalLeadingZero';
4+
import lowerRoman from '@jsamr/counter-style/presets/lowerRoman';
5+
import lowerAlpha from '@jsamr/counter-style/presets/lowerAlpha';
6+
import lowerGreek from '@jsamr/counter-style/presets/lowerGreek';
7+
import upperAlpha from '@jsamr/counter-style/presets/upperAlpha';
8+
import upperRoman from '@jsamr/counter-style/presets/upperRoman';
109
import DisclosureClosedSymbolRenderer from './symbolic/DisclosureClosedSymbolRenderer';
1110
import DisclosureOpenSymbolRenderer from './symbolic/DisclosureOpenSymbolRenderer';
1211
import CircleSymbolRenderer from './symbolic/CircleSymbolRenderer';
@@ -17,25 +16,16 @@ import type {
1716
ListStyleSpec
1817
} from '../shared-types';
1918

20-
// TEMPORARY: Simple stub renderer
21-
const stubRenderer = {
22-
renderCounter: (index: number) => `${index}`,
23-
renderPrefix: () => '',
24-
renderSuffix: () => '. ',
25-
withSuffix: (suffix: string | null) => stubRenderer,
26-
format: (index: number) => `${index}.`
27-
} as any;
28-
29-
const unitaryRenderer = stubRenderer; // CounterStyle.cyclic('*').withSuffix(' ');
19+
const unitaryRenderer = CounterStyle.cyclic('*').withSuffix(' ');
3020

3121
const lowerAlphaSpec = {
3222
type: 'textual',
33-
counterStyleRenderer: stubRenderer // lowerAlpha
23+
counterStyleRenderer: lowerAlpha
3424
} as const;
3525

3626
const upperAlphaSpec = {
3727
type: 'textual',
38-
counterStyleRenderer: stubRenderer // upperAlpha
28+
counterStyleRenderer: upperAlpha
3929
} as const;
4030

4131
/**
@@ -49,7 +39,7 @@ const defaultListStyleSpecs: Record<
4939
> = {
5040
'decimal-leading-zero': {
5141
type: 'textual',
52-
counterStyleRenderer: stubRenderer // decimalLeadingZero
42+
counterStyleRenderer: decimalLeadingZero
5343
},
5444
'disclosure-closed': {
5545
counterStyleRenderer: unitaryRenderer,
@@ -64,18 +54,18 @@ const defaultListStyleSpecs: Record<
6454
'lower-alpha': lowerAlphaSpec,
6555
'lower-greek': {
6656
type: 'textual',
67-
counterStyleRenderer: stubRenderer // lowerGreek
57+
counterStyleRenderer: lowerGreek
6858
},
6959
'lower-latin': lowerAlphaSpec,
7060
'lower-roman': {
7161
type: 'textual',
72-
counterStyleRenderer: stubRenderer // lowerRoman
62+
counterStyleRenderer: lowerRoman
7363
},
7464
'upper-alpha': upperAlphaSpec,
7565
'upper-latin': upperAlphaSpec,
7666
'upper-roman': {
7767
type: 'textual',
78-
counterStyleRenderer: stubRenderer // upperRoman
68+
counterStyleRenderer: upperRoman
7969
},
8070
circle: {
8171
counterStyleRenderer: unitaryRenderer,
@@ -84,15 +74,15 @@ const defaultListStyleSpecs: Record<
8474
},
8575
decimal: {
8676
type: 'textual',
87-
counterStyleRenderer: stubRenderer // decimal
77+
counterStyleRenderer: decimal
8878
},
8979
disc: {
9080
counterStyleRenderer: unitaryRenderer,
9181
type: 'unitary',
9282
Component: DiscSymbolRenderer
9383
},
9484
none: {
95-
counterStyleRenderer: stubRenderer, // CounterStyle.symbolic('').withSuffix(null),
85+
counterStyleRenderer: CounterStyle.symbolic('').withSuffix(null),
9686
type: 'unitary',
9787
Component: () => null
9888
},

0 commit comments

Comments
 (0)