@govbr-ds/playground 0.0.0-stage → 5.2.0
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 +30 -2
- package/dist/Playground.d.ts +7 -0
- package/dist/Playground.d.ts.map +1 -0
- package/dist/browser/chunks/babel-TRTEHJWP.js +16 -0
- package/dist/browser/chunks/chunk-3JEV5GFZ.js +1 -0
- package/dist/browser/chunks/chunk-5A3ZKBRD.js +11 -0
- package/dist/browser/chunks/chunk-EP7B2XPY.js +13 -0
- package/dist/browser/chunks/chunk-JM73XHPL.js +25 -0
- package/dist/browser/chunks/chunk-TFWQIFOZ.js +1 -0
- package/dist/browser/chunks/chunk-UVFYWQD2.js +1 -0
- package/dist/browser/chunks/chunk-WUR2JRNJ.js +1 -0
- package/dist/browser/chunks/chunk-Y6SLVHK3.js +1 -0
- package/dist/browser/chunks/chunk-ZIL2IWZ3.js +1 -0
- package/dist/browser/chunks/dist-AKMJXMTZ.js +1 -0
- package/dist/browser/chunks/dist-KS4J6S7U.js +1 -0
- package/dist/browser/chunks/dist-VIVGCYF5.js +1 -0
- package/dist/browser/chunks/esm-BWS4JPZG.js +2 -0
- package/dist/browser/chunks/esm-R75BP3LA.js +1 -0
- package/dist/browser/chunks/estree-UYKKTIFA.js +44 -0
- package/dist/browser/chunks/html-TM3VAO62.js +25 -0
- package/dist/browser/chunks/postcss-JAVHFEUM.js +62 -0
- package/dist/browser/chunks/standalone-IDMVEPER.js +29 -0
- package/dist/browser/index.d.ts +8 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +397 -0
- package/dist/components/CodeMirrorEditor.d.ts +22 -0
- package/dist/components/CodeMirrorEditor.d.ts.map +1 -0
- package/dist/components/ControlsPanel.d.ts +17 -0
- package/dist/components/ControlsPanel.d.ts.map +1 -0
- package/dist/components/Workbench.d.ts +21 -0
- package/dist/components/Workbench.d.ts.map +1 -0
- package/dist/core/index.d.ts +233 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +410 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/library/components.d.ts +36 -0
- package/dist/library/components.d.ts.map +1 -0
- package/dist/library/profile.d.ts +23 -0
- package/dist/library/profile.d.ts.map +1 -0
- package/dist/react/chunks/babel-TRTEHJWP.js +16 -0
- package/dist/react/chunks/chunk-3JEV5GFZ.js +1 -0
- package/dist/react/chunks/chunk-5A3ZKBRD.js +11 -0
- package/dist/react/chunks/chunk-EP7B2XPY.js +13 -0
- package/dist/react/chunks/chunk-TFWQIFOZ.js +1 -0
- package/dist/react/chunks/chunk-UVFYWQD2.js +1 -0
- package/dist/react/chunks/chunk-WUR2JRNJ.js +1 -0
- package/dist/react/chunks/chunk-Y6SLVHK3.js +1 -0
- package/dist/react/chunks/chunk-ZIL2IWZ3.js +1 -0
- package/dist/react/chunks/dist-AKMJXMTZ.js +1 -0
- package/dist/react/chunks/dist-KS4J6S7U.js +1 -0
- package/dist/react/chunks/dist-VIVGCYF5.js +1 -0
- package/dist/react/chunks/esm-R75BP3LA.js +1 -0
- package/dist/react/chunks/esm-WLDNKOOE.js +2 -0
- package/dist/react/chunks/estree-UYKKTIFA.js +44 -0
- package/dist/react/chunks/html-TM3VAO62.js +25 -0
- package/dist/react/chunks/postcss-JAVHFEUM.js +62 -0
- package/dist/react/chunks/standalone-IDMVEPER.js +29 -0
- package/dist/react/index.js +354 -0
- package/dist/sources.d.ts +47 -0
- package/dist/sources.d.ts.map +1 -0
- package/dist/styles.css +2046 -0
- package/dist/utils/drafts.d.ts +9 -0
- package/dist/utils/drafts.d.ts.map +1 -0
- package/dist/utils/editorHistory.d.ts +14 -0
- package/dist/utils/editorHistory.d.ts.map +1 -0
- package/dist/utils/encoders.d.ts +43 -0
- package/dist/utils/encoders.d.ts.map +1 -0
- package/dist/utils/formatters.d.ts +6 -0
- package/dist/utils/formatters.d.ts.map +1 -0
- package/dist/utils/frameworks.d.ts +15 -0
- package/dist/utils/frameworks.d.ts.map +1 -0
- package/dist/utils/previewLocale.d.ts +19 -0
- package/dist/utils/previewLocale.d.ts.map +1 -0
- package/dist/utils/sourceModel.d.ts +52 -0
- package/dist/utils/sourceModel.d.ts.map +1 -0
- package/dist/utils/visibility.d.ts +3 -0
- package/dist/utils/visibility.d.ts.map +1 -0
- package/docs/configuration.md +400 -0
- package/package.json +59 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 SERPRO
|
|
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,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @govbr-ds/playground
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Playground reutilizável com iframe isolado, editor HTML/CSS/JS, propriedades,
|
|
4
|
+
slots, console, eventos e snippets de frameworks. Funciona em React,
|
|
5
|
+
Docusaurus ou por montagem direta no navegador.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Playground } from '@govbr-ds/playground/react'
|
|
9
|
+
import '@govbr-ds/playground/styles.css'
|
|
10
|
+
|
|
11
|
+
;<Playground config={{ runtime: { id: 'button' }, source: { directory: '/examples/button/' } }} />
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Aceita código inline, grupos pré-carregados, pasta HTTP com `examples.json`, URL
|
|
15
|
+
de manifesto ou arquivo específico com manifesto adjacente. Cada exemplo pode
|
|
16
|
+
definir modo desenvolvedor/designer e quais controles/abas aparecem.
|
|
17
|
+
|
|
18
|
+
A [referência completa](docs/configuration.md) documenta todas as entradas, campos,
|
|
19
|
+
recursos injetados, perfis WBC/v4, manifesto, erros de carregamento, modos designer,
|
|
20
|
+
visibilidade, callbacks e integração com Docusaurus.
|
|
21
|
+
|
|
22
|
+
Para desenvolvimento local, vincule o pacote com `pnpm link` no consumidor e
|
|
23
|
+
recompile após alterar as fontes:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
pnpm --filter @govbr-ds/playground build
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
O link utiliza `dist`. Não é necessário publicar para testar. O perfil padrão da
|
|
30
|
+
interface é WBC 2.7.0; configure `library`/`runtime.library` para outras versões.
|
|
31
|
+
A aplicação deve conceder altura ao playground e fornecer recursos de confiança.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PlaygroundInputConfig } from './sources.js';
|
|
2
|
+
export type PlaygroundProps = {
|
|
3
|
+
config: PlaygroundInputConfig;
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function Playground(props: PlaygroundProps): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=Playground.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Playground.d.ts","sourceRoot":"","sources":["../src/Playground.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAA;AA8IlF,MAAM,MAAM,eAAe,GAAG;IAAE,MAAM,EAAE,qBAAqB,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAqkDnF,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BA2BhD"}
|