All notable changes to this project will be documented in this file.
- added prettier and applied it to the files
- create apps upgraded to latest versions of kit (not Svelte 5!)
- fix as per discord suggestion https://discord.com/channels/520266681499779082/1049388501629681675/1264201865231339520 (style 100% in IonNav)
- bumped Ionic core 8.2.2
- bumped Ionic core to 7.2.1
- bumped Svelte to 4.0.5
- added message referring to Vite PWA to make your app a PWA
- modalController does not function - use inline - which is better for styling and binding anyway
- support for a href and goto routing for IonTabs - solving #76
- this may create an issue with slug navigation - will test later
- migrated the demo-app - see MIGRATION.md https://github.com/Tommertom/svelte-ionic-app/blob/mainMIGRATION.md on how I did so
- Fixed issue with IonTabs - a href and goto navigation not supported - #76
- May create issue with slug-routing
- removed default exports of IonTabs, IonNav and IonPage so non-kit users can use Ionic
- removed defineComponents - deprecated so people use all.js to import components - can cause BREAKING changes for some older implementations
- Bumped to 7.0.3 - including creator scripts
- Fix on MenuI
- IonPage.svelte now holds a secret
- Ionic 7 package landed - demo app is not upgraded yet
- Creator scripts are updated to 7.0.2 as well - fixing to that version as I assume there will be updates on core
- bump create-svelte dependency to latest
- Added platforms back (typescript)
- Ionic core 6.6.0 and create scripts locked to latest of 6 (arrival of 7)
- IonTabs - possibly breaking changes for users - fixed bug when tabs are placed in main route
- added some typings for platform functions
- removed typescript in _.svelte components as Vite does not process them (but does process _.ts)
- removed IonTabsLegacy.svelte - can still be found here https://github.com/Tommertom/svelte-ionic-app/blob/main/src/IonTabsLegacy.svelte for manual inclusion
- Put the NPM package with the demo app in one repo
- css classic style selectors for dark, so developer can do apply dark theme programmatically
- bumped to Ionic 6.5.3
- added dark mode variables (they were missing)
- fixed HMR flag url - there needs to be http://
- Event types fixed - needed CustomEvent wrapper - ionic-team/ionic-framework#26747
- Platform types added
- Updated README to cover HOWTOs
- Changed description for SSR/SPA
- Forgot about the typings for controllers! Added them
- Bumped ionic to 6.4.2 for creator scripts and ionic-svelte
- Ionic Nav and navController cleanup for better API:
Now you can load the ion-nav via <IonNav root={SvelteRootComponent}/>
and this "NavHome" can use the navController
to push
new Sveltecomponents on the stack.
See HOWTO - https://github.com/Tommertom/ionic-svelte-nav-howto
- Typescript update after receiving good support from Svelte community
- Added navController and IonNav.svelte for better nav APIs - experimental, will make a HOWTO to show how it works
- Typings update (exporting the default pages)
- Typings update (exporting the default functions)
- Typings update - some more debugging
- Better HMR support (via dynamic config) - generated for _.json or _.ts approach
- Typings changed using svelte/elements
- NavController added (experimental) - to support IonNav easy DX - not working
- IonNav.svelte introduced as wrapper for Ionic's Nav navigation stack.
- Added
IonNav
component for better API support on an IonNav (experimental)
- Running npx cap init from the script
- Feedback on capacitor config so user can tweak where needed
- Updated to have HMR enabled by default
- Additional instructions for users
- Fixed issues in typings (camelcase to kebabcase for props, and fixed urls to api docs)
- BREAKING change for IonTabs - If you are using IonTabs, please import
IonTabsLegacy.svelte
- Implemented IonTabs which uses SvelteKit Layout System
- If you are not using SvelteKit -> please continue using
IonTabsLegacy.svelte
- See - https://github.com/Tommertom/ionic-svelte-tabs-howto
- Important notes when migrating away from legacy:
- Change your icon reference and include imports
import {close} from 'ionicons/icons';
- Complete the
+layout.svelte
as per howto - Create the subfolders for the routes
- Place your components in
+page.svelte
files - Make sure they are wrapped in
ion-tab
withtab
property
- Change your icon reference and include imports
- Minor text update for creator - explanation CapacitorJS
- fixed Vite4 dependency in creator
- Package size reduction
- Creator 0.0.15 - some fixes & better reference for npx cap init (webdir flag)
- Typings - Added on-handlers for all components per component
- Capacitor added to creator 0.0.8
- Ionicons bug fix in creator - disabled verbose logging for the time being
- Changed the default starter to use the cjs import, also to enable codesplitting - creator 0.0.8
setupIonicSvelte()
deprecated - Changed config routine tosetupIonicBase();
<script lang="ts">
import { setupIonicSvelte } from 'ionic-svelte';
/* Theme variables */
import '../theme/variables.css';
/* Call Ionic's setup routine */
setupIonicSvelte();
</script>
<ion-app>
<slot />
</ion-app>
Should become:
<script lang="ts">
import { setupIonicBase } from 'ionic-svelte';
/* Call Ionic's setup routine */
setupIonicBase();
/* Import all components - or do partial loading - see below */
import 'ionic-svelte/components/all';
/* Theme variables */
import '../theme/variables.css';
/*
This part - import 'ionic-svelte/components/all'; - loads all components at once.
This adds at least >800kb (uncompressed) to your bundle.
You can also choose to import each component you want to use separately. Example:
import 'ionic-svelte/components/ion-app';
import 'ionic-svelte/components/ion-card';
import 'ionic-svelte/components/ion-card-title';
import 'ionic-svelte/components/ion-card-subtitle';
import 'ionic-svelte/components/ion-card-header';
import 'ionic-svelte/components/ion-card-content';
import 'ionic-svelte/components/ion-chip';
import 'ionic-svelte/components/ion-button';
It is recommended to do this in this file, as you only need to do such once. But you are free
to do this elsewhere if you like to code-split differently.
You can find these import lines to copy here by going to the imported file below (ionic-svelte/components/all).
Please don't forget to import ion-app in this file when you decide to code-split:
import 'ionic-svelte/components/ion-app';
*/
</script>
<ion-app>
<slot />
</ion-app>
- Updated typings
- Modular imports available, but not defaulted yet
- Typings for style, default events, class added
- Still problem with ok-text (ion-select), is-open (modal) etc...
- How to deal with svelte specific goodies like use: and bind:....?
- Also padding (with =true), checked (without parameter)
- Fixed issue create-app script (now 0.0.7) - Package warnings are treated as errors
- Ionic event type bindings fix
- Fixes in type definitions (slots)
- Removed Experimental package - no ES-imports because of style encapsulation
- Added typings (need a bit more testing)
- Added create-ionic-svelte-app package
- Fixed issue with generation of slots - experimental is working again
- Package.json main added - so working with new Kit
- Experimental package is BROKEN
- FAIL warning when working with newer SvelteKit versions...
- multiple fixes on generate script (slots missing in ion-buttons - source code does not have slots)
- comments added for manual post processing
- removed warning in IonMenu.svelte
- added typing in IonTabs
- fixed issue icon in IonItem
- ion-menu warning added
- slot support introduced! (experimental still) - solution found in one of the references in sveltejs/svelte#1689 (ui5 example), but had to tweak it a bit (using $$props, not $$restprops)
- fixed issue with not globally replacing tags
- added warning that type conversion is not done (like, translucent="true" will not be converted into translucent={true})
- Regenerated all experimental components as they had on:click twice - leading to triggering the event twice
- Support for bind:value bindings by redispatching and using ionChange events, making property binding finally possible
- minor updates to experimental components
- added migration script to migrate from kebab-case components to pascal-case -
migrateToImport.js
which you can run usingnode migrateToImport <directoryname>
- starting with changelog
- added generator scripts to generate svelte wrappers from Core Stencil code on github
- added "experimental" components - in order to move from kebab-case/webcomponent usage to tree-shakeable and type-safe Pascalcase. So moving from
<ion-button>A great button</ion-button>
to
import { IonButton } from 'ionic-svelte/experimental/components/IonButton.svelte';
<IonButton>A great button</IonButton>
Experimental also has version of setupIonicSvelte
.
So if you want to use this, change imports from ... from 'ionic-svelte
to ... from 'ionic-svelte/experimental