Releases: microlinkhq/sdk
v3.0.0
Build Process
Migrate to Storybook v4
We updated our storybook to the latest version, adding support for detecting accessibility recommendations and automatic structural components snapshots.
Scoped Packages
In order to follow the same pattern over different SDK connectors, from now they are shipped using a scoped name
microlinkjs
→@microlink/vanilla
.react-microlink
→@microlink/react
.
That's also applied for CDN:
<!-- Microlink SDK Vanilla/UMD bundle -->
<script src="//cdn.jsdelivr.net/npm/@microlink/vanilla@latest/umd/microlink.min.js"></script>
<!-- Microlink SDK AMD bundle -->
<script src="//cdn.jsdelivr.net/npm/@microlink/vanilla@latest/amd/microlink.min.js"></script>
<!-- Microlink SDK CJS bundle -->
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/@microlink/vanilla@latest/cjs/microlink.min.js"></script>
API Parameters
Rename data
→ setData
The API Parameter data has been rename into setData.
In addition, you can use setData passing an object
:
<Microlink setData={{title: 'hello world'}}
In this case, the object will assign after the microlink API response payload, so it will replace values from the payload.
In case you need more granularity control, (for example, assign defaults values but not replacing them if they exist from the API response) you can pass a function
<Microlink setData={(data) => {
// You need to return the final value for the card preview
if (!data.title) data.title = 'hello world'
return data
}}
The function works like a mapper. The returned value will used for the card preview.
v2.2.0
- Add noFetch API Parameter, useful for disable mergin visualization data, avoid fetch content from the API.
- Add loading to make possible change the state of the UI component.
- Expose
createApiUrl
,fetchFromApiUrl
,fetchFromApi
in order to externalize the data fetching step. - The API Parameter video is now
false
by default.
v2.0.0
v1.8.0
v1.8.0
v1.6.3
v1.6.3
v1.2.0
Features
- Add
screenshot
support. - Add
prerender
support. - Add
apiKey
support.
Enhancement
- Add UMD, AMD & CommonJS bundle for microlinkjs.
endpoint
was renamed intoapiEndpoint
rounded
was renamed intorounded
.
and a lot of development and documentation tweaks :D