@applicaster/quick-brick-core 12.0.0-alpha.5353184830 → 12.0.0-alpha.5432134741

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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="../../" />
2
2
  import * as R from "ramda";
3
- import { log_debug, log_warning } from "./logger";
3
+ import { log_debug, log_verbose, log_warning } from "./logger";
4
4
  import { CacheManager } from "./CacheManager";
5
5
 
6
6
  import {
@@ -84,6 +84,8 @@ export async function cacheAssets({
84
84
  };
85
85
  }
86
86
 
87
+ const time = performance.now();
88
+
87
89
  try {
88
90
  const { assetFiles, cellAssets, pluginAssets, layoutAssets } =
89
91
  await getLayoutAssets({
@@ -141,18 +143,20 @@ export async function cacheAssets({
141
143
 
142
144
  newCacheState.forEach(({ file, url }) => (urlFileMap[url] = file));
143
145
 
144
- const updatedLayout = remapAssetPath(layoutAssets, layout, urlFileMap);
146
+ const updatedLayout = remapAssetPath(layoutAssets, layout, urlFileMap, "layoutAssets");
145
147
 
146
148
  const updatedPluginConfigurations = remapAssetPath(
147
149
  pluginAssets,
148
150
  pluginConfigurations,
149
- urlFileMap
151
+ urlFileMap,
152
+ "pluginAssets"
150
153
  );
151
154
 
152
155
  const updatedCellStyles = remapAssetPath(
153
156
  cellAssets,
154
157
  cellStyles,
155
- urlFileMap
158
+ urlFileMap,
159
+ "cellStyles"
156
160
  );
157
161
 
158
162
  return {
@@ -164,5 +168,7 @@ export async function cacheAssets({
164
168
  log_warning(`cacheAssets: Error caching assets, message: ${error.message}`);
165
169
 
166
170
  return { layout, pluginConfigurations, cellStyles };
171
+ } finally {
172
+ log_verbose(`cacheAssets: caching assets took ${performance.now() - time} ms`);
167
173
  }
168
174
  }
@@ -99,19 +99,11 @@ const MemoizedThemeContextProvider = React.memo(
99
99
  function ThemeManagerComponent({ children, plugins }: Props) {
100
100
  const isTablet = useIsTablet();
101
101
 
102
- const [themes, setThemes] = React.useState(selectThemes(isTablet, plugins));
102
+ const themes = selectThemes(isTablet, plugins);
103
103
 
104
104
  const [selectedThemeId, setSelectedThemeId] =
105
105
  React.useState(DEFAULT_THEME_ID);
106
106
 
107
- React.useEffect(() => {
108
- setThemes((oldThemes) => {
109
- const newThemes = selectThemes(isTablet, plugins);
110
-
111
- return R.equals(oldThemes, newThemes) ? oldThemes : newThemes;
112
- });
113
- }, [plugins]);
114
-
115
107
  return (
116
108
  <MemoizedThemeContextProvider
117
109
  themes={themes}
package/App/index.tsx CHANGED
@@ -5,11 +5,6 @@ import {
5
5
  initialWindowMetrics,
6
6
  } from "react-native-safe-area-context";
7
7
 
8
- import type {
9
- AppComponentProps,
10
- ZappApp,
11
- } from "@applicaster/zapp-react-native-flow-types";
12
-
13
8
  import { ErrorBoundary } from "./ErrorBoundary";
14
9
  import { RouteManager } from "./RouteManager";
15
10
  import { withNavigationProvider } from "./NavigationProvider";
@@ -8,11 +8,6 @@ import * as React from "react";
8
8
  import * as R from "ramda";
9
9
  import { Dimensions } from "react-native";
10
10
 
11
- import type {
12
- AppComponentProps,
13
- ZappAppConfig,
14
- } from "@applicaster/zapp-react-native-flow-types";
15
-
16
11
  import {
17
12
  createZappReduxStore,
18
13
  loadAppContextData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-core",
3
- "version": "12.0.0-alpha.5353184830",
3
+ "version": "12.0.0-alpha.5432134741",
4
4
  "description": "Core package for Applicaster's Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "homepage": "https://github.com/applicaster/quickbrick#readme",
32
32
  "dependencies": {
33
- "@applicaster/applicaster-types": "12.0.0-alpha.5353184830",
34
- "@applicaster/quick-brick-core-plugins": "12.0.0-alpha.5353184830",
35
- "@applicaster/zapp-pipes-v2-client": "12.0.0-alpha.5353184830",
36
- "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5353184830",
37
- "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5353184830",
38
- "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5353184830",
39
- "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5353184830",
33
+ "@applicaster/applicaster-types": "12.0.0-alpha.5432134741",
34
+ "@applicaster/quick-brick-core-plugins": "12.0.0-alpha.5432134741",
35
+ "@applicaster/zapp-pipes-v2-client": "12.0.0-alpha.5432134741",
36
+ "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5432134741",
37
+ "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5432134741",
38
+ "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5432134741",
39
+ "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5432134741",
40
40
  "atob": "^2.1.2",
41
41
  "axios": "^0.21.2",
42
42
  "btoa": "^1.2.1",
@@ -58,7 +58,6 @@
58
58
  "react-native-safe-area-context": "*"
59
59
  },
60
60
  "devDependencies": {
61
- "@applicaster/zapp-react-native-flow-types": "1.5.0",
62
61
  "@types/react-native": "0.69.6",
63
62
  "@types/tizen-tv-webapis": "^2.0.1",
64
63
  "nock": "^10.0.0",