Skip to content

Releases: gronxb/webview-bridge

v1.7.5

11 Dec 12:33
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.7.4...v1.7.5

v1.7.4

08 Dec 08:36
Compare
Choose a tag to compare

What's Changed

  • feat: version compat layer 1.7.2 by @gronxb in #88

Full Changelog: v1.7.3...v1.7.4

v1.7.3

07 Dec 07:29
Compare
Choose a tag to compare

Caution

This patch contains a breaking change due to the modification of the @webview-bridge/web communication method. Ensure @webview-bridge/react-nativeexplicitly uses version 1.7.3 to avoid potential issues.

The compatibility layer has been added in version 1.7.4, resolving the issue.
Please use version 1.7.4.

What's Changed

Full Changelog: v1.7.2...v1.7.3

v1.7.2

04 Nov 12:21
Compare
Choose a tag to compare

What's Changed

  • fix: correct module and main entry points in package.json @gronxb 79510ad

Full Changelog: v1.7.1...v1.7.2

v1.7.1

28 Oct 02:47
Compare
Choose a tag to compare

Guide

https://gronxb.github.io/webview-bridge/using-a-post-message.html#broadcast

What's Changed

  • feat(react-native): postMessage broadcast options by @gronxb in #75

Full Changelog: v1.7.0...v1.7.1

v1.7.0

26 Oct 09:37
Compare
Choose a tag to compare

Migration Guide

The postMessage structure was limited to only zod, yup, and superstruct, making it incompatible with various schema libraries.

Therefore, I separated this layer as validate, allowing integration with any schema library.

https://gronxb.github.io/webview-bridge/using-a-post-message.html

  • as-is
const appPostMessageSchema = postMessageSchema({
  eventName1: z.object({
    message: z.string(),
  }),
  eventName2: z.string(),
});
  • to-be
const appPostMessageSchema = postMessageSchema({
  eventName1: {
    validate: (data) => z.object({
      message: z.string(),
    }).parse(data)
  },
  eventName2: {
    validate: (data) => z.string().parse(data);
  },
});

What's Changed

  • chore(example): bump react native 0.76.0 by @gronxb in #68
  • chore: deprecated @webview-bridge/vue by @gronxb in #69
  • feat(react-native): post message dynamic validate by @gronxb in #70
  • chore: migrate tspc, esbuild to tsup, nx by @gronxb in #71
  • chore: build:dev command by @gronxb in #72
  • chore: bump react 18.3.1 by @gronxb in #73
  • fix: resolution @webview-bridge/utils by @gronxb in #74

Full Changelog: v1.6.2...v1.7.0

v1.6.2

11 Jul 15:38
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.6.1...v1.6.2

v1.6.1

11 Jul 11:33
Compare
Choose a tag to compare

What's Changed

  • fix: ensure hydration in SSR environment by @gronxb in #59

Full Changelog: v1.6.0...v1.6.1

v1.6.0

10 Jul 17:18
Compare
Choose a tag to compare

What's Changed

  • feat: initialBridge mock by @gronxb in #56
  • chore: remove deprecated linkNativeMethod by @gronxb in #57
  • fix: resolve this binding issue in bridge instance by @gronxb in #58

initialBridge field

https://gronxb.github.io/webview-bridge/non-react-native-environment.html

It is possible to configure initialBridge to operate in a non-React Native environment.
Prioritize applying the bridge of the React Native WebView, and if it is unavailable, apply the initialBridge.
Therefore, if initialBridge is configured, bridge.isWebViewBridgeAvailable should be true even in environments that are not React Native.

const bridge = linkBridge<AppBridge>({
  // this field
  initialBridge: {
    count: 0,
    data: {
      text: "123454",
    },
    openInAppBrowser: async () => {
      alert("openInAppBrowser not supported");
    },
    increase: async () => {
      alert("increase not supported");
    },
    setDataText: async (text) => {
      alert("setDataText not supported");
    },
  },
  onReady: () => {
    console.log("nativeMethod is ready");
  },
  throwOnError: true,
}

Full Changelog: v1.5.3...v1.6.0

v1.5.3

09 Jul 15:29
Compare
Choose a tag to compare

What's Changed

  • fix: mock store for non-native environment (SSR) by @gronxb in #55

Full Changelog: v1.5.2...v1.5.3