em-kit 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +66 -2
- package/dist/ai.d.ts +1896 -0
- package/dist/ai.js +2699 -0
- package/dist/ai.js.map +1 -0
- package/dist/build.d.ts +120 -0
- package/dist/build.js +56 -0
- package/dist/build.js.map +1 -0
- package/dist/chunks/EditorCard.d-CcLiXQ7c.d.ts +469 -0
- package/dist/chunks/pies.utils-CMMo-SlI.js +7899 -0
- package/dist/chunks/pies.utils-CMMo-SlI.js.map +1 -0
- package/dist/index.d.ts +1376 -0
- package/dist/index.js +8370 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.js +6 -0
- package/package.json +104 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Embeddable.com
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,67 @@
|
|
|
1
|
-
#
|
|
1
|
+
# EmKit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Finished React chart, KPI and table components by [Embeddable](https://embeddable.com), for teams that already have a data layer. MIT licensed. Docs: [emkit.embeddable.com](https://emkit.embeddable.com).
|
|
4
|
+
|
|
5
|
+
EmKit is Embeddable’s chart components as a standalone React library: you bring the data. Inside Embeddable the same components are called Remarkable Pro. [Embeddable](https://embeddable.com) adds the data layer, multi-tenant security and self-serve dashboards for your customers.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install em-kit
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
React 19.1.1 or later is the only peer dependency. There is no stylesheet to import. The package is ESM only.
|
|
14
|
+
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
Wrap your app in `ChartsProvider` once, then describe your data and render a chart.
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import { BarChart, ChartsProvider, dimension, measure, results } from 'em-kit';
|
|
21
|
+
|
|
22
|
+
const region = dimension({ name: 'region', title: 'Region' });
|
|
23
|
+
const revenue = measure({ name: 'revenue', title: 'Revenue' });
|
|
24
|
+
|
|
25
|
+
// One row per bar. Each key is the `name` of a field above.
|
|
26
|
+
const rows = [
|
|
27
|
+
{ region: 'North America', revenue: 48200 },
|
|
28
|
+
{ region: 'Europe', revenue: 39500 },
|
|
29
|
+
{ region: 'Asia Pacific', revenue: 27800 },
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
export default function App() {
|
|
33
|
+
return (
|
|
34
|
+
<ChartsProvider>
|
|
35
|
+
<div style={{ height: 360 }}>
|
|
36
|
+
<BarChart title="Revenue by region" dimension={region} measures={[revenue]} results={results(rows)} />
|
|
37
|
+
</div>
|
|
38
|
+
</ChartsProvider>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
A chart fills its container, so give the container a height. In Next.js, put the provider and each chart in a file that starts with `'use client'`.
|
|
44
|
+
|
|
45
|
+
## What you get
|
|
46
|
+
|
|
47
|
+
- Bar, line, pie, funnel, scatter and heat-map charts, KPIs and tables, each in a card with loading, empty and error states.
|
|
48
|
+
- Controls: date range pickers, selects and filter builders.
|
|
49
|
+
- Theming with CSS variables, translations, number and date formatting, and CSV, XLSX and PNG export.
|
|
50
|
+
- `em-kit/ai`: a tool definition and JSON schema so a model can return a chart for `<ChartFromSpec>` to render.
|
|
51
|
+
- `em-kit/build`: the pieces the built-in charts are made from, for building your own.
|
|
52
|
+
|
|
53
|
+
## Docs
|
|
54
|
+
|
|
55
|
+
- [Quick start](https://emkit.embeddable.com/docs/quick-start)
|
|
56
|
+
- [Components](https://emkit.embeddable.com/docs/components), each with a live example and its props
|
|
57
|
+
- [Theming](https://emkit.embeddable.com/docs/theming)
|
|
58
|
+
- [Troubleshooting](https://emkit.embeddable.com/docs/troubleshooting)
|
|
59
|
+
- For coding agents: [llms.txt](https://emkit.embeddable.com/llms.txt)
|
|
60
|
+
|
|
61
|
+
## Contributing
|
|
62
|
+
|
|
63
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Report problems at [github.com/embeddable-hq/em-kit/issues](https://github.com/embeddable-hq/em-kit/issues).
|
|
64
|
+
|
|
65
|
+
## Licence
|
|
66
|
+
|
|
67
|
+
MIT, copyright Embeddable.com.
|