@nebula.js/sn-text 1.0.0-alpha.1
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 +43 -0
- package/dist/sn-text.esm.js +117 -0
- package/dist/sn-text.js +117 -0
- package/package.json +124 -0
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# sn-text
|
|
2
|
+
|
|
3
|
+
A text chart supernova aimed to be used in [nebula.js](https://github.com/qlik-oss/nebula.js).
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
|
|
7
|
+
import { embed } from '@nebula.js/stardust';
|
|
8
|
+
import text from '@nebula.js/sn-text';
|
|
9
|
+
|
|
10
|
+
// 'app' is an enigma app model
|
|
11
|
+
const embeddable = embed(app, {
|
|
12
|
+
types: [{ // register the text chart
|
|
13
|
+
name: 'text',
|
|
14
|
+
load: () => Promise.resolve(text);
|
|
15
|
+
}]
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
embeddable.render({
|
|
19
|
+
element,
|
|
20
|
+
type: 'text',
|
|
21
|
+
properties: {
|
|
22
|
+
text: "{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":0,\"mode\":\"normal\",\"style\":\"\",\"text\":\"This is some text\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
Requires `@nebula.js/stardust` version `>=3.0.0`.
|
|
30
|
+
|
|
31
|
+
## Installing
|
|
32
|
+
|
|
33
|
+
If you use npm: `npm install @nebula.js/sn-text`. You can also load through the script tag directly from any of the CDNs that supports NPM packages, for example: [unpkg](https://unpkg.com/@nebula.js/sn-text).
|
|
34
|
+
|
|
35
|
+
<!--
|
|
36
|
+
## API
|
|
37
|
+
The API specifiction is available at [Qlik Developer Portal](https://qlik.dev/apis/javascript/nebula-shape-chart)
|
|
38
|
+
-->
|
|
39
|
+
|
|
40
|
+
## Release
|
|
41
|
+
|
|
42
|
+
To trigger a release, manually run the workflow on a release branch and set release to true.
|
|
43
|
+
For more info on actions / github workflows see: https://github.com/qlik-oss/sn-gh-workflows/
|