@geastack/core 0.1.26 → 0.1.27
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.
package/include/image.h
CHANGED
|
@@ -124,11 +124,9 @@ private:
|
|
|
124
124
|
void materializeDeferred(int id) const;
|
|
125
125
|
int decodeGif(ImageSlot &image, const std::uint8_t *data, int length);
|
|
126
126
|
int decodeStatic(ImageSlot &image, const std::uint8_t *data, int length, bool opaqueHint);
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
// large covers so they fit the fragmented PSRAM). Fills `image`, returns 0/-1.
|
|
127
|
+
// Native JPEG backends, selected automatically when provided by the target.
|
|
128
|
+
int decodeJpegEsp(ImageSlot &image, const std::uint8_t *data, int length);
|
|
130
129
|
int decodeJpegTjpgd(ImageSlot &image, const std::uint8_t *data, int length);
|
|
131
|
-
#endif
|
|
132
130
|
int decodeNextGifFrame(ImageSlot &image);
|
|
133
131
|
// dispose() body without taking slotMutex_ (callers hold it).
|
|
134
132
|
void disposeLocked(int id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geastack/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"description": "GeaStack app API, reactivity headers, runtime sources, and type declarations.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"@babel/parser": "^7.23.0",
|
|
61
61
|
"@babel/traverse": "^7.23.0",
|
|
62
62
|
"@babel/types": "^7.23.0",
|
|
63
|
-
"@geajs/core": "1.
|
|
64
|
-
"@geajs/vite-plugin": "1.
|
|
63
|
+
"@geajs/core": "1.5.1",
|
|
64
|
+
"@geajs/vite-plugin": "1.5.0",
|
|
65
65
|
"@geastack/compiler": "^1.0.15",
|
|
66
|
-
"@geastack/geatsc-plugin-gea": "^0.1.
|
|
66
|
+
"@geastack/geatsc-plugin-gea": "^0.1.8",
|
|
67
67
|
"opentype.js": "^2.0.0",
|
|
68
68
|
"vite": "^8.0.0"
|
|
69
69
|
}
|
|
@@ -493,6 +493,7 @@ function writeCompatViteConfig({ configPath, compatSrcDir, appDir, entry, viteOu
|
|
|
493
493
|
.join('\n')
|
|
494
494
|
const config = `import { resolve } from 'node:path'
|
|
495
495
|
import { geaPlugin } from ${q(geaPluginResolved)}
|
|
496
|
+
import { geaNativeStylePlugin } from ${q(path.join(coreRoot, 'scripts/gea-native-style-plugin.mjs'))}
|
|
496
497
|
import { geaAppleNativeModuleAliases, geaModuleGraphPlugins } from ${q(moduleGraphPluginPath)}
|
|
497
498
|
|
|
498
499
|
const root = ${q(compatSrcDir)}
|
|
@@ -510,7 +511,7 @@ export default {
|
|
|
510
511
|
define: {
|
|
511
512
|
${defineEntries}
|
|
512
513
|
},
|
|
513
|
-
plugins: [geaPlugin({ ir: { enabled: true, outFile: ${q(geaIrPath)} } }), ...geaModuleGraph],
|
|
514
|
+
plugins: [geaNativeStylePlugin({ runtimeEntry: ${q(compilerRuntimeEntry)} }), geaPlugin({ ir: { enabled: true, outFile: ${q(geaIrPath)} } }), ...geaModuleGraph],
|
|
514
515
|
resolve: {
|
|
515
516
|
alias: [
|
|
516
517
|
${compilerRuntimeAlias}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
|
|
4
|
+
/** Native lengths are raw numbers; only an authored CSS unit may introduce scaling. */
|
|
5
|
+
export function geaNativeStylePlugin({ runtimeEntry }) {
|
|
6
|
+
if (!runtimeEntry) throw new Error('Native Gea styles require the typed @geajs/core source entry')
|
|
7
|
+
const sourceRoot = path.dirname(fs.realpathSync(runtimeEntry))
|
|
8
|
+
const serializer = path.join(sourceRoot, 'runtime/style-value.ts')
|
|
9
|
+
return {
|
|
10
|
+
name: 'geastack-native-style-units',
|
|
11
|
+
enforce: 'pre',
|
|
12
|
+
// Keep all compiler-generated runtime imports on the same typed source tree.
|
|
13
|
+
// Aliasing only the root left compiler-runtime on the browser dist path.
|
|
14
|
+
resolveId(id) {
|
|
15
|
+
const name = id === '@geajs/core' ? 'index' : id.startsWith('@geajs/core/') ? id.slice('@geajs/core/'.length) : null
|
|
16
|
+
if (name === null) return null
|
|
17
|
+
return [path.join(sourceRoot, `${name}.ts`), path.join(sourceRoot, name, 'index.ts')].find(entry => fs.existsSync(entry)) || null
|
|
18
|
+
},
|
|
19
|
+
load(id) {
|
|
20
|
+
if (id.split('?')[0] !== serializer) return null
|
|
21
|
+
// This module is the browser serialization boundary, not the JSX IR.
|
|
22
|
+
// Replacing it here preserves numeric values in the native IR and prevents
|
|
23
|
+
// browser px defaults from reaching native runtime-backed components/h().
|
|
24
|
+
return `export function styleProp(key: string): string {
|
|
25
|
+
return key.startsWith('--') ? key : key.replace(/[A-Z]/g, c => '-' + c.toLowerCase())
|
|
26
|
+
}
|
|
27
|
+
export function styleValue(_property: string, value: unknown): string { return String(value) }
|
|
28
|
+
`
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
}
|