Repository navigation
v1.1.8
Fixes for npm install in projects created with npx jops-core init, more complete type definitions, and documentation corrections. The library only adds the Element export; its behaviour is unchanged.
Fixes
npm installfailed where nobody can answer a question (CI, Docker) in web, Cordova and Capacitor projects created bynpx jops-core init: their"postinstall": "npx jops-core init"stopped at the template question and exited with an error. When input ends without an answer,initnow uses 5 (None), which only refreshes the library and adds what is missing. A piped answer (echo 2 | npx jops-core init) still works.initnow adds"postinstall": "jops-core update", which only copies the library. Existing projects keep their script; changing it tojops-core updateavoids the question.- Hello World template: the stylesheet was loaded twice (by
setStyle()and by a<link>in the layout); the layout's<link>is removed.Media.jsis referenced with a root-based path like the other views.
Types
Element(returned byget()andfind(id)) is exported, so it can be used in your own type annotations.Viewdeclares the optional lifecycle hooksonLayout(),onResume(),onPause()andonBackPressed(), so editors suggest and document them in subclasses.- Internal members (names starting with
_) are no longer part of the type definitions. hide(),show(),destroy()andinflate()describe their behaviour for layouts with several top-level elements.
Docs
- README:
setStyle()has no effect in any hosted mode (Next.js, WordPress,mount()), not only in Next.js; the default entry point whendata-appis missing (./src/App.js); the Electron exception to thefile://note; how the layout cache handles views loading the same file at the same moment; where to read route params; the missingimport { Router }in the Capacitor back-button example; the pin example uses the current version. - AI guide: written against 1.1.8; the same
setStyle()andpostinstallcorrections.