@nebulr-group/bridge-svelte 0.9.0-beta.2 → 0.9.0-beta.3

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/README.md CHANGED
@@ -14,7 +14,43 @@ npm i @nebulr-group/bridge-svelte
14
14
 
15
15
  ### Usage
16
16
 
17
- See the `demo/` app in the monorepo for end-to-end wiring.
17
+ The whole integration is one `.env` line and three files:
18
+
19
+ ```env
20
+ # .env
21
+ VITE_BRIDGE_APP_ID=your-app-id
22
+ ```
23
+
24
+ ```ts
25
+ // src/routes/+layout.ts
26
+ import { bridgeBootstrap } from '@nebulr-group/bridge-svelte';
27
+ export const ssr = false;
28
+ export const load = bridgeBootstrap({ rules: [{ match: new RegExp('^/auth($|/)'), public: true }] });
29
+ ```
30
+
31
+ ```svelte
32
+ <!-- src/routes/+layout.svelte -->
33
+ <script lang="ts">
34
+ import { BridgeBootstrap } from '@nebulr-group/bridge-svelte';
35
+ import '@nebulr-group/bridge-svelte/styles';
36
+ let { children } = $props();
37
+ </script>
38
+ <BridgeBootstrap>
39
+ {@render children()}
40
+ </BridgeBootstrap>
41
+ ```
42
+
43
+ ```svelte
44
+ <!-- src/routes/auth/[...bridge]/+page.svelte — every sign-in page -->
45
+ <script lang="ts">
46
+ import { BridgeAuthRoutes } from '@nebulr-group/bridge-svelte';
47
+ </script>
48
+ <BridgeAuthRoutes />
49
+ ```
50
+
51
+ A stage or local app also sets `VITE_BRIDGE_API_BASE_URL`. Add `loginRoute: '/auth/login'` for sign-in inside the app, and `src/routes/subscription/[...bridge]/+page.svelte` rendering `<BridgeBillingRoutes />` for subscriptions.
52
+
53
+ [How Bridge works](https://github.com/thebridgedev/bridge-svelte/blob/main/learning/mechanisms.md) explains plan limits, the three UI levels and the four customisation levels; the [learning docs](https://github.com/thebridgedev/bridge-svelte/tree/main/learning) cover everything else. Coding agents: `npx @nebulr-group/bridge-cli guide svelte`.
18
54
 
19
55
  ### Build
20
56
 
@@ -26,11 +26,7 @@
26
26
  useBridge,
27
27
  type QuotaSnapshot,
28
28
  } from '@nebulr-group/bridge-auth-core';
29
- <<<<<<< HEAD
30
- import { getBridgeAuth } from '../../../core/bridge-instance.js';
31
- =======
32
29
  import { isBillingAdmin as canManageBilling, quotaMemberBody } from '../../billing-role.js';
33
- >>>>>>> origin/feature/mcp-journey
34
30
  import { billingRoutes } from '../../billing-routes.js';
35
31
 
36
32
  type Chassis = 'rail';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebulr-group/bridge-svelte",
3
- "version": "0.9.0-beta.2",
3
+ "version": "0.9.0-beta.3",
4
4
  "description": "Bridge Svelte library, This library helps you to add bridge authentication and feature flags, and payments to your svelte application.",
5
5
  "author": "Iman Pouya",
6
6
  "license": "MIT",