@pugpigbolt/bridge 0.1.1 → 0.1.2

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
@@ -1,9 +1,9 @@
1
1
  # @pugpigbolt/bridge
2
2
 
3
- [![npm](https://img.shields.io/npm/v/@pugpigbolt/bridge)](https://www.npmjs.com/package/@pugpigbolt/bridge)
4
-
5
3
  Communication layer between Bolt web apps and the native Pugpig shell. Provides a reactive bridge object that syncs native state (stories, auth, timelines, locale) into the web layer and exposes action methods for triggering native behaviour.
6
4
 
5
+ [![npm](https://img.shields.io/npm/v/@pugpigbolt/bridge)](https://www.npmjs.com/package/@pugpigbolt/bridge)
6
+
7
7
  ## Installation
8
8
 
9
9
  ```bash
@@ -486,8 +486,8 @@ const BOOTSTRAP_METHODS = [
486
486
  "actionProviderNames",
487
487
  "stories"
488
488
  ];
489
- function triggerPugpigUpdateSequence() {
490
- for (const method of BOOTSTRAP_METHODS) window.pugpigUpdate(method);
489
+ function triggerPugpigUpdateSequence(methods = BOOTSTRAP_METHODS) {
490
+ for (const method of methods) window.pugpigUpdate(method);
491
491
  }
492
492
  function bootstrap(bridge, options = {}) {
493
493
  const { rootSelector = "#app", readyTimeout = 4e3 } = options;
@@ -582,6 +582,10 @@ declare function createPugpigBridgeService(config: BridgeServiceConfig): {
582
582
  setRead(payload?: string): any;
583
583
  };
584
584
  //#endregion
585
+ //#region src/core/bootstrap.d.ts
586
+ declare const BOOTSTRAP_METHODS: readonly ["localeInfo", "timelineInfo", "authorisationStatus", "savedStories", "readStories", "updateTime", "actionProviderNames", "stories"];
587
+ declare function triggerPugpigUpdateSequence(methods?: readonly string[]): void;
588
+ //#endregion
585
589
  //#region src/index.d.ts
586
590
  /**
587
591
  * @signature globalBridge: GlobalBridge
@@ -594,4 +598,4 @@ declare const globalBridge: GlobalBridge;
594
598
  */
595
599
  declare function bootstrap(options?: BootstrapOptions): () => void;
596
600
  //#endregion
597
- export { UpdateTimePayload as A, Theme as C, TimelineMetadata as D, TimelineInfoPayload as E, TimelineState as O, StoryImage as S, TimelineArgs as T, RemoteConfig as _, AdSize as a, Story as b, AuthorisationStatus as c, BridgeService as d, Feed as f, ReadStoriesPayload as g, PugpigBridgeService as h, GlobalBridge as i, WebviewInfoPayload as j, TimelinesInfoPayload as k, BoltBridgePlugin as l, LocaleInfoPayload as m, globalBridge as n, AnalyticsContext as o, IssueAuthorisationStatus as p, createPugpigBridgeService as r, AnalyticsDimensions as s, bootstrap as t, BootstrapOptions as u, SavedStoriesPayload as v, Timeline as w, StoryEntry as x, StoriesPayload as y };
601
+ export { TimelineState as A, StoryEntry as C, TimelineArgs as D, Timeline as E, UpdateTimePayload as M, WebviewInfoPayload as N, TimelineInfoPayload as O, Story as S, Theme as T, PugpigBridgeService as _, createPugpigBridgeService as a, SavedStoriesPayload as b, AnalyticsContext as c, BoltBridgePlugin as d, BootstrapOptions as f, LocaleInfoPayload as g, IssueAuthorisationStatus as h, triggerPugpigUpdateSequence as i, TimelinesInfoPayload as j, TimelineMetadata as k, AnalyticsDimensions as l, Feed as m, globalBridge as n, GlobalBridge as o, BridgeService as p, BOOTSTRAP_METHODS as r, AdSize as s, bootstrap as t, AuthorisationStatus as u, ReadStoriesPayload as v, StoryImage as w, StoriesPayload as x, RemoteConfig as y };
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as UpdateTimePayload, C as Theme, D as TimelineMetadata, E as TimelineInfoPayload, O as TimelineState, S as StoryImage, T as TimelineArgs, _ as RemoteConfig, a as AdSize, b as Story, c as AuthorisationStatus, d as BridgeService, f as Feed, g as ReadStoriesPayload, h as PugpigBridgeService, i as GlobalBridge, j as WebviewInfoPayload, k as TimelinesInfoPayload, l as BoltBridgePlugin, m as LocaleInfoPayload, n as globalBridge, o as AnalyticsContext, p as IssueAuthorisationStatus, r as createPugpigBridgeService, s as AnalyticsDimensions, t as bootstrap, u as BootstrapOptions, v as SavedStoriesPayload, w as Timeline, x as StoryEntry, y as StoriesPayload } from "./index-BAapL0vP.mjs";
2
- export { AdSize, AnalyticsContext, AnalyticsDimensions, AuthorisationStatus, BoltBridgePlugin, BootstrapOptions, BridgeService, Feed, GlobalBridge, IssueAuthorisationStatus, LocaleInfoPayload, PugpigBridgeService, ReadStoriesPayload, RemoteConfig, SavedStoriesPayload, StoriesPayload, Story, StoryEntry, StoryImage, Theme, Timeline, TimelineArgs, TimelineInfoPayload, TimelineMetadata, TimelineState, TimelinesInfoPayload, UpdateTimePayload, WebviewInfoPayload, bootstrap, createPugpigBridgeService, globalBridge };
1
+ import { A as TimelineState, C as StoryEntry, D as TimelineArgs, E as Timeline, M as UpdateTimePayload, N as WebviewInfoPayload, O as TimelineInfoPayload, S as Story, T as Theme, _ as PugpigBridgeService, a as createPugpigBridgeService, b as SavedStoriesPayload, c as AnalyticsContext, d as BoltBridgePlugin, f as BootstrapOptions, g as LocaleInfoPayload, h as IssueAuthorisationStatus, i as triggerPugpigUpdateSequence, j as TimelinesInfoPayload, k as TimelineMetadata, l as AnalyticsDimensions, m as Feed, n as globalBridge, o as GlobalBridge, p as BridgeService, r as BOOTSTRAP_METHODS, s as AdSize, t as bootstrap, u as AuthorisationStatus, v as ReadStoriesPayload, w as StoryImage, x as StoriesPayload, y as RemoteConfig } from "./index-BjDhZ_q5.mjs";
2
+ export { AdSize, AnalyticsContext, AnalyticsDimensions, AuthorisationStatus, BOOTSTRAP_METHODS, BoltBridgePlugin, BootstrapOptions, BridgeService, Feed, GlobalBridge, IssueAuthorisationStatus, LocaleInfoPayload, PugpigBridgeService, ReadStoriesPayload, RemoteConfig, SavedStoriesPayload, StoriesPayload, Story, StoryEntry, StoryImage, Theme, Timeline, TimelineArgs, TimelineInfoPayload, TimelineMetadata, TimelineState, TimelinesInfoPayload, UpdateTimePayload, WebviewInfoPayload, bootstrap, createPugpigBridgeService, globalBridge, triggerPugpigUpdateSequence };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as makeProxyBridge, i as setupPugpigUpdate, n as bootstrap$1, o as rawBridge } from "./bootstrap-BzOJNz7-.mjs";
1
+ import { a as makeProxyBridge, i as setupPugpigUpdate, n as bootstrap$1, o as rawBridge, r as triggerPugpigUpdateSequence, t as BOOTSTRAP_METHODS } from "./bootstrap-DQyoNFue.mjs";
2
2
  import { t as createPugpigBridgeService } from "./mockBridgeService-vnaAIjCu.mjs";
3
3
  //#region src/index.ts
4
4
  /**
@@ -16,4 +16,4 @@ function bootstrap(options) {
16
16
  return bootstrap$1(globalBridge, options);
17
17
  }
18
18
  //#endregion
19
- export { bootstrap, createPugpigBridgeService, globalBridge };
19
+ export { BOOTSTRAP_METHODS, bootstrap, createPugpigBridgeService, globalBridge, triggerPugpigUpdateSequence };
package/dist/vue.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as UpdateTimePayload, C as Theme, D as TimelineMetadata, E as TimelineInfoPayload, O as TimelineState, S as StoryImage, T as TimelineArgs, _ as RemoteConfig, a as AdSize, b as Story, c as AuthorisationStatus, d as BridgeService, f as Feed, g as ReadStoriesPayload, h as PugpigBridgeService, i as GlobalBridge, j as WebviewInfoPayload, k as TimelinesInfoPayload, l as BoltBridgePlugin, m as LocaleInfoPayload, o as AnalyticsContext, p as IssueAuthorisationStatus, s as AnalyticsDimensions, u as BootstrapOptions, v as SavedStoriesPayload, w as Timeline, x as StoryEntry, y as StoriesPayload } from "./index-BAapL0vP.mjs";
1
+ import { A as TimelineState, C as StoryEntry, D as TimelineArgs, E as Timeline, M as UpdateTimePayload, N as WebviewInfoPayload, O as TimelineInfoPayload, S as Story, T as Theme, _ as PugpigBridgeService, b as SavedStoriesPayload, c as AnalyticsContext, d as BoltBridgePlugin, f as BootstrapOptions, g as LocaleInfoPayload, h as IssueAuthorisationStatus, i as triggerPugpigUpdateSequence, j as TimelinesInfoPayload, k as TimelineMetadata, l as AnalyticsDimensions, m as Feed, o as GlobalBridge, p as BridgeService, r as BOOTSTRAP_METHODS, s as AdSize, u as AuthorisationStatus, v as ReadStoriesPayload, w as StoryImage, x as StoriesPayload, y as RemoteConfig } from "./index-BjDhZ_q5.mjs";
2
2
  import * as _$vue from "vue";
3
3
  import { App } from "vue";
4
4
 
@@ -77,6 +77,7 @@ declare function useBridge(): {
77
77
  setRead(story: Story, index: number): Promise<unknown>;
78
78
  shareStory(story: Story, index: number): Promise<unknown>;
79
79
  addToCalendar(story: Story, index: number): Promise<unknown>;
80
+ filter: _$vue.Ref<Record<string, unknown>, Record<string, unknown>>;
80
81
  feed: _$vue.Ref<Feed, Feed>;
81
82
  rawStories: _$vue.Ref<Story[], Story[]>;
82
83
  timelines: _$vue.Ref<Timeline[], Timeline[]>;
@@ -90,7 +91,6 @@ declare function useBridge(): {
90
91
  baseUrl: _$vue.Ref<string, string>;
91
92
  metadataLoaded: _$vue.Ref<boolean, boolean>;
92
93
  initialBatchSize: _$vue.Ref<number, number>;
93
- filter: _$vue.Ref<Record<string, unknown>, Record<string, unknown>>;
94
94
  positionOverrides: _$vue.Ref<unknown[], unknown[]>;
95
95
  debugLogs: _$vue.Ref<boolean, boolean>;
96
96
  actionProviderNames: _$vue.Ref<string[], string[]>;
@@ -106,10 +106,6 @@ declare function useBridge(): {
106
106
  };
107
107
  type UseBridgeReturn = ReturnType<typeof useBridge>;
108
108
  //#endregion
109
- //#region src/core/bootstrap.d.ts
110
- declare const BOOTSTRAP_METHODS: readonly ["localeInfo", "timelineInfo", "authorisationStatus", "savedStories", "readStories", "updateTime", "actionProviderNames", "stories"];
111
- declare function triggerPugpigUpdateSequence(): void;
112
- //#endregion
113
109
  //#region src/vue/bootstrap.d.ts
114
110
  declare function useBootstrap(options?: BootstrapOptions): void;
115
111
  declare function injectThemeAndWait(readyTimeout?: number): void;
package/dist/vue.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as setupPugpigUpdate, o as rawBridge, r as triggerPugpigUpdateSequence, s as outgoingActions, t as BOOTSTRAP_METHODS } from "./bootstrap-BzOJNz7-.mjs";
1
+ import { i as setupPugpigUpdate, o as rawBridge, r as triggerPugpigUpdateSequence, s as outgoingActions, t as BOOTSTRAP_METHODS } from "./bootstrap-DQyoNFue.mjs";
2
2
  import { onUnmounted, reactive, ref, toRefs, watchEffect } from "vue";
3
3
  //#region src/vue/tooltip.ts
4
4
  const tooltipsQueue = ref([]);
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@pugpigbolt/bridge",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
+ "license": "MIT",
4
5
  "files": [
5
6
  "dist"
6
7
  ],