@widgetic/creator 0.4.36 → 0.4.37
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/dist/CreatorApp.svelte +205 -27
- package/dist/components/BrandKitPanel.svelte +585 -0
- package/dist/components/BrandKitPanel.svelte.d.ts +34 -0
- package/dist/components/FileUrlSourceControl.svelte.d.ts +1 -1
- package/dist/components/VersionDropdownRow.svelte +1 -19
- package/dist/components/WidgetDetails.svelte.d.ts +1 -1
- package/dist/components/WidgetElementSelector.svelte +149 -33
- package/dist/components/WidgetElementSelector.svelte.d.ts +1 -0
- package/dist/components/WidgetShapeLivePreviews.svelte +9 -2
- package/dist/components/WidgetShapeLivePreviews.svelte.d.ts +4 -0
- package/dist/generation/brandKitForRequest.d.ts +17 -0
- package/dist/generation/brandKitForRequest.js +18 -1
- package/dist/i18n/language.d.ts +171 -5
- package/dist/i18n/messages.d.ts +27 -1
- package/dist/i18n/messages.js +27 -1
- package/dist/i18n/statusText.js +4 -0
- package/dist/pageHelpers.d.ts +2 -0
- package/dist/pageHelpers.js +10 -0
- package/dist/stores/websocketStore.d.ts +9 -0
- package/dist/stores/websocketStore.js +20 -0
- package/dist/utils/widgetElementSelector.d.ts +6 -0
- package/dist/utils/widgetElementSelector.js +23 -0
- package/package.json +1 -1
- package/dist/components/GenerationOptionsPanel.svelte +0 -216
- package/dist/components/GenerationOptionsPanel.svelte.d.ts +0 -21
|
@@ -43,6 +43,8 @@ export interface SelectedWidgetElementReference {
|
|
|
43
43
|
};
|
|
44
44
|
/** Compact human-readable label (`<em> · to shared company work.`) */
|
|
45
45
|
label: string;
|
|
46
|
+
/** A note typed on the preview, sent with this part. */
|
|
47
|
+
note?: string;
|
|
46
48
|
}
|
|
47
49
|
/**
|
|
48
50
|
* Whether the element may be picked. A plain boolean on purpose: a type guard (`element is Element`) would make the
|
|
@@ -79,4 +81,8 @@ export declare function computeChipPlacement(rect: SelectedElementRect, viewport
|
|
|
79
81
|
* Inline script injected into fallback `srcdoc` mirror iframes when a widget preview
|
|
80
82
|
* was cached before `PICKER_BRIDGE_SCRIPT` was added to the Cloudflare builder worker.
|
|
81
83
|
*/
|
|
84
|
+
/** The page CSP nonce, so a srcdoc mirror can run under the same policy as the creator. */
|
|
85
|
+
export declare function pageScriptNonce(): string;
|
|
86
|
+
/** Puts the page nonce on every script so the strict policy does not block the mirror. */
|
|
87
|
+
export declare function stampScriptsWithNonce(html: string, nonce: string): string;
|
|
82
88
|
export declare const FALLBACK_PICKER_BRIDGE_SCRIPT = "<script>(function(){\n if(window.__widgeticPickerBridge)return;\n window.__widgeticPickerBridge=true;\n var NEVER_PICKED={html:1,body:1,head:1,script:1,style:1,link:1,meta:1};\n var SVG_NS='http://www.w3.org/2000/svg';\n var hovered=null,current=null,descendants=[];\n function isPickable(el){\n if(!el||!el.tagName)return false;\n return !NEVER_PICKED[el.tagName.toLowerCase()];\n }\n function pickTarget(el){\n var node=el;\n while(node&&node.namespaceURI===SVG_NS&&node.tagName.toLowerCase()!=='svg'){\n if(!node.parentElement)break;\n node=node.parentElement;\n }\n return isPickable(node)?node:null;\n }\n function parentToPick(el){\n var next=el.parentElement||(el.getRootNode&&el.getRootNode()instanceof ShadowRoot?el.getRootNode().host:null);\n while(next&&!isPickable(next)){\n next=next.parentElement||(next.getRootNode&&next.getRootNode()instanceof ShadowRoot?next.getRootNode().host:null);\n }\n if(next&&next.id==='app'&&next.parentElement===document.body)return null;\n return next;\n }\n function deepElementAt(root,x,y){\n var cur=root,hit=null;\n for(var d=0;d<24;d++){\n var list=cur.elementsFromPoint?cur.elementsFromPoint(x,y):[];\n var found=null;\n for(var i=0;i<list.length;i++){\n var c=list[i];\n if(c.id==='app'&&list.length>i+1&&!NEVER_PICKED[list[i+1].tagName.toLowerCase()])continue;\n found=c;break;\n }\n if(!found)break;\n hit=found;\n if(!found.shadowRoot||found.shadowRoot===cur)break;\n cur=found.shadowRoot;\n }\n return hit;\n }\n function buildSelector(el){\n var parts=[],node=el;\n while(node&&node.nodeType===1&&node!==document.body&&node.id!=='app'&&parts.length<6){\n var tag=node.tagName.toLowerCase();\n if(node.id){parts.unshift(tag+'#'+node.id);break;}\n var cls=Array.from(node.classList||[]).filter(function(c){return /^[A-Za-z_][\\w-]{0,31}$/.test(c)}).slice(0,2);\n var seg=tag+(cls.length?'.'+cls.join('.'):'');\n parts.unshift(seg);\n node=node.parentElement;\n }\n return parts.join(' > ')||el.tagName.toLowerCase();\n }\n function serialize(el){\n if(!el)return null;\n var r=el.getBoundingClientRect();\n var tag=el.tagName.toLowerCase();\n var classes=Array.from(el.classList||[]);\n var rawText=(el.innerText||el.textContent||el.getAttribute('aria-label')||el.getAttribute('placeholder')||el.getAttribute('alt')||'').replace(/\\s+/g,' ').trim().slice(0,120);\n var dc=el.getAttribute('data-content')||el.getAttribute('data-content-item')||null;\n var p=el.parentElement;\n var parentTag=p&&p!==document.body&&p.id!=='app'?(p.tagName.toLowerCase()+(p.classList&&p.classList[0]?'.'+p.classList[0]:'')):null;\n var attrs={};\n ['role','type','href','src','aria-label','placeholder','name'].forEach(function(k){\n var v=el.getAttribute(k);if(v)attrs[k]=v.slice(0,160);\n });\n var labelClass=classes.find(function(c){return /^[A-Za-z_][\\w-]{0,31}$/.test(c)&&!/^(flex|grid|block|inline|relative|absolute|w-|h-|p-|m-|text-|bg-|border|rounded)/.test(c)})||classes[0]||'';\n var tagBadge='<'+tag+(el.id?'#'+el.id:labelClass?'.'+labelClass:'')+'>';\n var label=rawText?(tagBadge+' \\u00b7 '+rawText.slice(0,48)):(tagBadge+' \\u00b7 '+Math.round(r.width)+' \\u00d7 '+Math.round(r.height));\n return {\n tagName:tag,\n selector:buildSelector(el),\n idAttr:el.id||undefined,\n classList:classes.slice(0,16),\n textSnippet:rawText||undefined,\n dataContent:dc||undefined,\n parentTag:parentTag||undefined,\n outerHtmlSnippet:(el.outerHTML||'').slice(0,800),\n attributes:attrs,\n rect:{x:r.left,y:r.top,width:r.width,height:r.height},\n label:label\n };\n }\n window.addEventListener('message',function(e){\n var d=e.data;if(!d||typeof d.type!=='string'||!d.type.startsWith('widgetic:picker-'))return;\n var wid=d.widgetId||null;\n if(d.type==='widgetic:picker-ping'){\n try{window.parent.postMessage({type:'widgetic:picker-pong',widgetId:wid},'*')}catch(err){}\n return;\n }\n if(d.type==='widgetic:picker-hit-test'){\n var raw=deepElementAt(document,Number(d.x)||0,Number(d.y)||0);\n var picked=raw?pickTarget(raw):null;\n if(picked!==hovered){hovered=picked;current=picked;descendants=[];}\n try{window.parent.postMessage({type:'widgetic:picker-hover-result',widgetId:wid,element:serialize(current)},'*')}catch(err){}\n return;\n }\n if(d.type==='widgetic:picker-walk'){\n if(!current)return;\n if(d.direction==='up'){\n var prev=current,cand=parentToPick(current);\n while(cand){\n var cr=cand.getBoundingClientRect();\n if(cr.width>0&&cr.height>0)break;\n cand=parentToPick(cand);\n }\n if(cand){descendants.push(prev);current=cand;}\n }else if(d.direction==='down'){\n var child=descendants.pop();\n if(child)current=child;\n }\n try{window.parent.postMessage({type:'widgetic:picker-hover-result',widgetId:wid,element:serialize(current)},'*')}catch(err){}\n return;\n }\n if(d.type==='widgetic:picker-select'){\n var target=current;\n if(!target&&typeof d.x==='number'&&typeof d.y==='number'){\n var hit=deepElementAt(document,d.x,d.y);\n target=hit?pickTarget(hit):null;\n }\n try{window.parent.postMessage({type:'widgetic:picker-select-result',widgetId:wid,element:serialize(target)},'*')}catch(err){}\n }\n });\n})();</script>";
|
|
@@ -192,6 +192,29 @@ export function computeChipPlacement(rect, viewportWidth, viewportHeight, chipHe
|
|
|
192
192
|
* Inline script injected into fallback `srcdoc` mirror iframes when a widget preview
|
|
193
193
|
* was cached before `PICKER_BRIDGE_SCRIPT` was added to the Cloudflare builder worker.
|
|
194
194
|
*/
|
|
195
|
+
/** The page CSP nonce, so a srcdoc mirror can run under the same policy as the creator. */
|
|
196
|
+
export function pageScriptNonce() {
|
|
197
|
+
if (typeof document === 'undefined')
|
|
198
|
+
return '';
|
|
199
|
+
const scripts = document.querySelectorAll('script');
|
|
200
|
+
for (const script of scripts) {
|
|
201
|
+
const value = script.nonce || script.getAttribute('nonce') || '';
|
|
202
|
+
if (value)
|
|
203
|
+
return value;
|
|
204
|
+
}
|
|
205
|
+
return '';
|
|
206
|
+
}
|
|
207
|
+
/** Puts the page nonce on every script so the strict policy does not block the mirror. */
|
|
208
|
+
export function stampScriptsWithNonce(html, nonce) {
|
|
209
|
+
if (!nonce)
|
|
210
|
+
return html;
|
|
211
|
+
const safe = nonce.replace(/"/g, '');
|
|
212
|
+
return html.replace(/<script\b([^>]*)>/gi, (match, attrs) => {
|
|
213
|
+
if (/\bnonce\s*=/i.test(attrs))
|
|
214
|
+
return match;
|
|
215
|
+
return `<script nonce="${safe}"${attrs}>`;
|
|
216
|
+
});
|
|
217
|
+
}
|
|
195
218
|
export const FALLBACK_PICKER_BRIDGE_SCRIPT = `<script>(function(){
|
|
196
219
|
if(window.__widgeticPickerBridge)return;
|
|
197
220
|
window.__widgeticPickerBridge=true;
|
package/package.json
CHANGED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Generation options of the chat: the language of a new widget and, in debug mode, the preset and uploaded libraries.
|
|
3
|
-
The brand kit (colors, fonts, icons, spacing, corner radius and style notes) is not here: it belongs to the account
|
|
4
|
-
and is edited in the account settings, so every widget of that account uses it. (The `creator.brandKit.*` message
|
|
5
|
-
keys keep the name they had when this panel held the brand kit; they hold the texts of these options.)
|
|
6
|
-
-->
|
|
7
|
-
|
|
8
|
-
<script lang="ts">
|
|
9
|
-
import { DropdownMenu } from '@widgetic/design-system';
|
|
10
|
-
import FileUrlSourceControl from './FileUrlSourceControl.svelte';
|
|
11
|
-
import HoverTooltip from './HoverTooltip.svelte';
|
|
12
|
-
import { useCreatorLanguage } from '../i18n/index.js';
|
|
13
|
-
|
|
14
|
-
const { t } = useCreatorLanguage();
|
|
15
|
-
|
|
16
|
-
interface Props {
|
|
17
|
-
class?: string;
|
|
18
|
-
style?: string;
|
|
19
|
-
part?: 'checks' | 'panel';
|
|
20
|
-
librariesEnabled?: boolean;
|
|
21
|
-
showPresetLibraries?: boolean;
|
|
22
|
-
libraries?: string[];
|
|
23
|
-
libraryGitUrl?: string;
|
|
24
|
-
libraryFileName?: string;
|
|
25
|
-
libraryUploads?: { name: string; content: string; encoding: string }[];
|
|
26
|
-
showLanguage?: boolean;
|
|
27
|
-
language?: string;
|
|
28
|
-
languageLocked?: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
let {
|
|
32
|
-
class: className = '',
|
|
33
|
-
style = '',
|
|
34
|
-
part = 'checks',
|
|
35
|
-
librariesEnabled = $bindable(false),
|
|
36
|
-
showPresetLibraries = false,
|
|
37
|
-
libraries = $bindable([] as string[]),
|
|
38
|
-
libraryGitUrl = $bindable(''),
|
|
39
|
-
libraryFileName = $bindable(''),
|
|
40
|
-
libraryUploads = $bindable([] as { name: string; content: string; encoding: string }[]),
|
|
41
|
-
showLanguage = false,
|
|
42
|
-
language = $bindable('react'),
|
|
43
|
-
languageLocked = false,
|
|
44
|
-
}: Props = $props();
|
|
45
|
-
|
|
46
|
-
const libraryChoices = [
|
|
47
|
-
{ id: 'chart.js/auto', label: 'Chart.js' },
|
|
48
|
-
{ id: 'd3', label: 'D3' },
|
|
49
|
-
{ id: 'gsap', label: 'GSAP' },
|
|
50
|
-
{ id: 'three', label: 'Three.js' },
|
|
51
|
-
];
|
|
52
|
-
|
|
53
|
-
function toggleLibrary(id: string) {
|
|
54
|
-
const next = libraries.includes(id)
|
|
55
|
-
? libraries.filter((entry) => entry !== id)
|
|
56
|
-
: [...libraries, id];
|
|
57
|
-
libraries = next;
|
|
58
|
-
if (next.length > 0) librariesEnabled = true;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
type SourceRow = { id: string; fileName: string; url: string; content: string; encoding: string };
|
|
62
|
-
const emptySource = (): SourceRow => ({
|
|
63
|
-
id: crypto.randomUUID(),
|
|
64
|
-
fileName: '',
|
|
65
|
-
url: '',
|
|
66
|
-
content: '',
|
|
67
|
-
encoding: 'utf8',
|
|
68
|
-
});
|
|
69
|
-
let libraryRows = $state<SourceRow[]>([emptySource()]);
|
|
70
|
-
|
|
71
|
-
function addSourceRow() {
|
|
72
|
-
if (libraryRows.length >= 4) return;
|
|
73
|
-
libraryRows = [emptySource(), ...libraryRows];
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function removeSourceRow(id: string) {
|
|
77
|
-
const next = libraryRows.filter((row) => row.id !== id);
|
|
78
|
-
libraryRows = next.length > 0 ? next : [emptySource()];
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function onLibrariesChange(event: Event) {
|
|
82
|
-
librariesEnabled = (event.currentTarget as HTMLInputElement).checked;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function componentExtension() {
|
|
86
|
-
return language === 'react' ? '.jsx' : '.svelte';
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function sourceAccept() {
|
|
90
|
-
return ['.js', '.ts', componentExtension(), '.zip', '.tar', '.tgz', '.gz'].join(',');
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
$effect(() => {
|
|
94
|
-
libraryFileName = libraryRows[0]?.fileName || '';
|
|
95
|
-
libraryGitUrl = libraryRows[0]?.url || '';
|
|
96
|
-
libraryUploads = libraryRows
|
|
97
|
-
.filter((row) => row.fileName && row.content)
|
|
98
|
-
.map((row) => ({ name: row.fileName, content: row.content, encoding: row.encoding }));
|
|
99
|
-
});
|
|
100
|
-
</script>
|
|
101
|
-
|
|
102
|
-
{#if part === 'checks'}
|
|
103
|
-
<div class="generation-options-checks contents {className}" {style}>
|
|
104
|
-
{#if showLanguage || showPresetLibraries}
|
|
105
|
-
<div class="generation-libraries-row ms-auto flex w-full flex-col gap-2">
|
|
106
|
-
<div class="generation-libraries-checks flex flex-nowrap items-center gap-1">
|
|
107
|
-
{#if showLanguage}
|
|
108
|
-
{#if languageLocked}
|
|
109
|
-
<HoverTooltip class="inline-flex shrink-0" text={$t('creator.brandKit.languageIsFixedAfterThe')}>
|
|
110
|
-
<span
|
|
111
|
-
class="generation-language-select flex h-10 w-[4.75rem] shrink-0 cursor-default items-center justify-between gap-0.5 rounded-lg border border-gray-300 bg-white px-1.5 text-sm text-gray-900 opacity-60"
|
|
112
|
-
aria-disabled="true"
|
|
113
|
-
>
|
|
114
|
-
<span class="truncate">{language === 'react' ? 'React' : 'Svelte'}</span>
|
|
115
|
-
</span>
|
|
116
|
-
</HoverTooltip>
|
|
117
|
-
{:else}
|
|
118
|
-
<HoverTooltip class="inline-flex shrink-0" text={$t('creator.brandKit.selectLanguage')}>
|
|
119
|
-
<DropdownMenu.Root>
|
|
120
|
-
<DropdownMenu.Trigger
|
|
121
|
-
class="generation-language-select flex h-10 w-[4.75rem] shrink-0 cursor-pointer items-center justify-between gap-0.5 rounded-lg border border-gray-300 bg-white px-1.5 text-sm text-gray-900"
|
|
122
|
-
>
|
|
123
|
-
<span class="truncate">{language === 'react' ? 'React' : 'Svelte'}</span>
|
|
124
|
-
<svg class="h-3 w-3 shrink-0 text-gray-500" viewBox="0 0 12 12" fill="none" aria-hidden="true">
|
|
125
|
-
<path d="M3 4.5 6 7.5 9 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
|
126
|
-
</svg>
|
|
127
|
-
</DropdownMenu.Trigger>
|
|
128
|
-
<DropdownMenu.Content class="w-[4.75rem] min-w-0">
|
|
129
|
-
<DropdownMenu.Item
|
|
130
|
-
class="cursor-pointer {language === 'svelte' ? 'bg-[#314F2F]/15 text-[#314F2F]' : ''}"
|
|
131
|
-
onSelect={() => (language = 'svelte')}
|
|
132
|
-
>Svelte</DropdownMenu.Item>
|
|
133
|
-
<DropdownMenu.Item
|
|
134
|
-
class="cursor-pointer {language === 'react' ? 'bg-[#314F2F]/15 text-[#314F2F]' : ''}"
|
|
135
|
-
onSelect={() => (language = 'react')}
|
|
136
|
-
>React</DropdownMenu.Item>
|
|
137
|
-
</DropdownMenu.Content>
|
|
138
|
-
</DropdownMenu.Root>
|
|
139
|
-
</HoverTooltip>
|
|
140
|
-
{/if}
|
|
141
|
-
{/if}
|
|
142
|
-
{#if showPresetLibraries}
|
|
143
|
-
<label class="generation-option-toggle flex h-10 shrink-0 cursor-pointer items-center gap-1.5 rounded-lg border px-2 text-sm {librariesEnabled ? 'border-[#314F2F] bg-[#314F2F] text-white' : 'border-gray-300 bg-white text-gray-800'}">
|
|
144
|
-
<input class="generation-option-check cursor-pointer" type="checkbox" checked={librariesEnabled} onchange={onLibrariesChange} />
|
|
145
|
-
{$t('creator.brandKit.libraries')}
|
|
146
|
-
</label>
|
|
147
|
-
{/if}
|
|
148
|
-
{#if librariesEnabled && showPresetLibraries}
|
|
149
|
-
{#each libraryChoices as choice (choice.id)}
|
|
150
|
-
<label class="generation-library flex items-center gap-1 text-xs text-gray-700">
|
|
151
|
-
<input
|
|
152
|
-
class="generation-library-check cursor-pointer"
|
|
153
|
-
type="checkbox"
|
|
154
|
-
checked={libraries.includes(choice.id)}
|
|
155
|
-
onchange={() => toggleLibrary(choice.id)}
|
|
156
|
-
/>
|
|
157
|
-
{choice.label}
|
|
158
|
-
</label>
|
|
159
|
-
{/each}
|
|
160
|
-
{/if}
|
|
161
|
-
{#if librariesEnabled && showPresetLibraries}
|
|
162
|
-
<HoverTooltip class="inline-flex shrink-0" text={$t('creator.brandKit.addLibrary')}>
|
|
163
|
-
<button
|
|
164
|
-
type="button"
|
|
165
|
-
class="generation-library-add flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md border border-gray-300 bg-white text-sm text-gray-800"
|
|
166
|
-
aria-label={$t('creator.brandKit.addLibrary')}
|
|
167
|
-
onclick={addSourceRow}
|
|
168
|
-
>+</button>
|
|
169
|
-
</HoverTooltip>
|
|
170
|
-
{/if}
|
|
171
|
-
</div>
|
|
172
|
-
{#if librariesEnabled && showPresetLibraries}
|
|
173
|
-
{#each libraryRows as row (row.id)}
|
|
174
|
-
<div class="generation-source-row flex items-center gap-1">
|
|
175
|
-
<FileUrlSourceControl
|
|
176
|
-
class="min-w-0 flex-1"
|
|
177
|
-
bind:fileName={row.fileName}
|
|
178
|
-
bind:fileContent={row.content}
|
|
179
|
-
bind:fileEncoding={row.encoding}
|
|
180
|
-
bind:url={row.url}
|
|
181
|
-
fileLabel={$t('creator.brandKit.uploadLibrary')}
|
|
182
|
-
fileTitle={$t('creator.brandKit.uploadCustomLibraryTooltip')}
|
|
183
|
-
urlPlaceholder={$t('creator.brandKit.urlLibraries', { extension: componentExtension() })}
|
|
184
|
-
accept={sourceAccept()}
|
|
185
|
-
/>
|
|
186
|
-
{#if libraryRows.length > 1}
|
|
187
|
-
<button
|
|
188
|
-
type="button"
|
|
189
|
-
class="generation-source-remove flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md border border-gray-300 text-gray-500"
|
|
190
|
-
aria-label={$t('creator.brandKit.removeLibrary')}
|
|
191
|
-
onclick={() => removeSourceRow(row.id)}
|
|
192
|
-
>
|
|
193
|
-
<svg class="h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
194
|
-
<path d="M4 7h16" />
|
|
195
|
-
<path d="M9 7V5h6v2" />
|
|
196
|
-
<path d="M8 7l1 13h6l1-13" />
|
|
197
|
-
</svg>
|
|
198
|
-
</button>
|
|
199
|
-
{/if}
|
|
200
|
-
</div>
|
|
201
|
-
{/each}
|
|
202
|
-
{/if}
|
|
203
|
-
</div>
|
|
204
|
-
{/if}
|
|
205
|
-
</div>
|
|
206
|
-
{/if}
|
|
207
|
-
|
|
208
|
-
<style>
|
|
209
|
-
.generation-options-checks input:focus,
|
|
210
|
-
.generation-options-checks input:focus-visible,
|
|
211
|
-
.generation-language-select:focus,
|
|
212
|
-
.generation-language-select:focus-visible {
|
|
213
|
-
outline: none;
|
|
214
|
-
box-shadow: none;
|
|
215
|
-
}
|
|
216
|
-
</style>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
class?: string;
|
|
3
|
-
style?: string;
|
|
4
|
-
part?: 'checks' | 'panel';
|
|
5
|
-
librariesEnabled?: boolean;
|
|
6
|
-
showPresetLibraries?: boolean;
|
|
7
|
-
libraries?: string[];
|
|
8
|
-
libraryGitUrl?: string;
|
|
9
|
-
libraryFileName?: string;
|
|
10
|
-
libraryUploads?: {
|
|
11
|
-
name: string;
|
|
12
|
-
content: string;
|
|
13
|
-
encoding: string;
|
|
14
|
-
}[];
|
|
15
|
-
showLanguage?: boolean;
|
|
16
|
-
language?: string;
|
|
17
|
-
languageLocked?: boolean;
|
|
18
|
-
}
|
|
19
|
-
declare const GenerationOptionsPanel: import("svelte").Component<Props, {}, "librariesEnabled" | "libraries" | "libraryGitUrl" | "libraryFileName" | "libraryUploads" | "language">;
|
|
20
|
-
type GenerationOptionsPanel = ReturnType<typeof GenerationOptionsPanel>;
|
|
21
|
-
export default GenerationOptionsPanel;
|