Add layered preset library and starter kits

This commit is contained in:
2026-11-05 23:19:08 +00:00
parent f7a06f487c
commit c6c38101a4
5 changed files with 108 additions and 5 deletions
+15 -1
View File
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
import { LGraph, LGraphCanvas, LiteGraph } from 'litegraph.js'
import { cloneCapabilities, demoLandscape, executePipeline, SYSTEM_PRESETS, systemFromPreset, type CapabilityModel, type ComponentRole, type ConnectionModel, type DefinitionActionModel, type EndpointModel, type EndpointResponseModel, type EnvironmentContainerModel, type EnvironmentModel, type InfrastructureComponent, type LandscapeModel, type PipelineTrace, type ScenarioModel, type ScenarioStep, type SystemDefinition, type SystemModel, type SystemPreset, uid, validateLandscape } from './model'
import { CAPABILITY_PRESETS, CATALOG_SYSTEM_PRESETS, DEPLOYMENT_TEMPLATES, STARTER_KITS, cloneCapabilities, demoLandscape, executePipeline, SYSTEM_PRESETS, systemFromPreset, type CapabilityModel, type ComponentRole, type ConnectionModel, type DefinitionActionModel, type DeploymentTemplate, type EndpointModel, type EndpointResponseModel, type EnvironmentContainerModel, type EnvironmentModel, type InfrastructureComponent, type LandscapeModel, type PipelineTrace, type ScenarioModel, type ScenarioStep, type SystemDefinition, type SystemModel, type SystemPreset, uid, validateLandscape } from './model'
const STORAGE_KEY = 'dumas-system-landscape-v1'
const PRESET_STORAGE_KEY = 'dumas-system-presets-v1'
@@ -38,6 +38,9 @@ const runtimeConnectionIds = ref<string[]>([])
const runtimePayload = ref('')
const customBuilderOpen = ref(false)
const customDraft = ref<{ name: string; description: string; category: SystemModel['category']; color: string; definition: SystemDefinition }>({ name: 'Custom system', description: 'Describe this reusable system.', category: 'service', color: '#6d7cff', definition: { actions: [], endpoints: [] } })
const presetQuery = ref('')
const presetLayer = ref<'all' | 'system' | 'capability' | 'template' | 'kit'>('all')
const favouritePresetIds = ref<string[]>(loadFavouritePresets())
type TransferKind = 'received' | 'sent' | 'stored'
interface TransferChange { key: string; status: 'added' | 'removed' | 'changed' | 'same'; incoming?: unknown; outgoing?: unknown }
interface TransferRecord { id: string; kind: TransferKind; scenarioName: string; stepNumber: number; stepExplanation: string; senderId: string; destinationId: string; payload: string; incoming: string; outgoing: string; changes: TransferChange[]; timestamp: string }
@@ -54,15 +57,22 @@ function loadLandscape(): LandscapeModel {
try { return validateLandscape(JSON.parse(localStorage.getItem(STORAGE_KEY) || 'null')) } catch { return demoLandscape() }
}
function loadCustomPresets(): SystemPreset[] { try { const value = JSON.parse(localStorage.getItem(PRESET_STORAGE_KEY) || '[]'); return Array.isArray(value) ? value : [] } catch { return [] } }
function loadFavouritePresets(): string[] { try { const value = JSON.parse(localStorage.getItem('dumas-system-favourites-v1') || '[]'); return Array.isArray(value) ? value : [] } catch { return [] } }
const selectedSystem = computed(() => landscape.value.systems.find((item) => item.id === selectedSystemId.value))
const selectedConnection = computed(() => landscape.value.connections.find((item) => item.id === selectedConnectionId.value))
const selectedScenario = computed(() => landscape.value.scenarios.find((item) => item.id === selectedScenarioId.value))
const currentStep = computed(() => selectedScenario.value?.steps[stepIndex.value])
const currentConnections = computed(() => { const ids = runtimeConnectionIds.value.length ? runtimeConnectionIds.value : currentStep.value?.connectionIds || []; return ids.map((id) => landscape.value.connections.find((item) => item.id === id)).filter(Boolean) as ConnectionModel[] })
const isRunning = computed(() => playing.value || stepIndex.value >= 0)
const libraryPresets = computed(() => [...SYSTEM_PRESETS, ...customPresets.value.filter((preset) => !SYSTEM_PRESETS.some((item) => item.id === preset.id))])
const filteredLibraryPresets = computed(() => { const query = presetQuery.value.trim().toLowerCase(); return libraryPresets.value.filter((preset) => { const haystack = `${preset.name} ${preset.description} ${(preset.tags || []).join(' ')}`.toLowerCase(); return !query || haystack.includes(query) }) })
const filteredCapabilityPresets = computed(() => { const query = presetQuery.value.trim().toLowerCase(); return CAPABILITY_PRESETS.filter((preset) => !query || `${preset.name} ${preset.description} ${preset.tags.join(' ')}`.toLowerCase().includes(query)) })
const filteredTemplates = computed(() => { const query = presetQuery.value.trim().toLowerCase(); return DEPLOYMENT_TEMPLATES.filter((template) => !query || `${template.name} ${template.description} ${template.tags.join(' ')}`.toLowerCase().includes(query)) })
const filteredKits = computed(() => { const query = presetQuery.value.trim().toLowerCase(); return STARTER_KITS.filter((kit) => !query || `${kit.name} ${kit.description} ${kit.tags.join(' ')}`.toLowerCase().includes(query)) })
function persist() { localStorage.setItem(STORAGE_KEY, JSON.stringify(landscape.value)) }
function persistPresets() { localStorage.setItem(PRESET_STORAGE_KEY, JSON.stringify(customPresets.value)) }
function togglePresetFavourite(id: string) { favouritePresetIds.value = favouritePresetIds.value.includes(id) ? favouritePresetIds.value.filter((item) => item !== id) : [...favouritePresetIds.value, id]; localStorage.setItem('dumas-system-favourites-v1', JSON.stringify(favouritePresetIds.value)) }
function selectSystem(id: string) { selectedSystemId.value = id; selectedConnectionId.value = ''; selectedEnvironmentId.value = landscape.value.systems.find((item) => item.id === id)?.environments?.[0]?.id || '' }
function selectContainer(id: string) { selectedContainerId.value = id; selectedSystemId.value = ''; selectedConnectionId.value = '' }
function selectConnection(id: string) { selectedConnectionId.value = id; selectedSystemId.value = ''; const connection = landscape.value.connections.find((item) => item.id === id); if (connection) { connection.transformation ||= { incoming: connection.payload, outgoing: connection.payload, note: '' }; connection.protocol ||= 'HTTPS'; connection.dataType ||= 'JSON'; connection.deliveryMethod ||= 'immediate'; connection.exchangeType ||= 'event-transfer'; connection.responsePayload ||= '{}'; connection.responseStatus ||= 200; connection.showCableLabel ??= true } }
@@ -79,6 +89,9 @@ function moveContainer(container: EnvironmentContainerModel, dx: number, dy: num
function deleteContainer(id: string) { landscape.value.systems.forEach((system) => { if (system.containerId === id) delete system.containerId }); landscape.value.containers = landscape.value.containers.filter((item) => item.id !== id && item.parentId !== id); selectedContainerId.value = ''; persist(); rebuildGraph() }
function openPreset(preset: SystemPreset) { placingPreset.value = preset; selectedCapabilityIds.value = preset.capabilities.map((capability) => capability.id) }
function placePreset() { if (!placingPreset.value) return; const position: [number, number] = [120 + (landscape.value.systems.length % 3) * 280, 120 + (landscape.value.systems.length % 3) * 150]; const system = systemFromPreset(placingPreset.value, selectedCapabilityIds.value, position); landscape.value.systems.push(system); selectSystem(system.id); placingPreset.value = null; persist(); rebuildGraph() }
function placeDeploymentTemplate(template: DeploymentTemplate) { const placed = template.systems.map((item, index) => { const preset = getPresetForLibrary(item.presetId); if (!preset) return null; const system = systemFromPreset(preset, preset.capabilities.map((capability) => capability.id), item.position); system.name = item.name || system.name; landscape.value.systems.push(system); return system }).filter(Boolean) as SystemModel[]; template.connections.forEach((connection) => { const source = placed[connection.sourceIndex]; const target = placed[connection.targetIndex]; if (source && target) landscape.value.connections.push({ id: uid('connection'), sourceId: source.id, targetId: target.id, label: connection.label, description: `${connection.label} in ${template.name}.`, payload: '{}', connectionType: connection.connectionType || 'dependency', exchangeType: 'event-transfer', showCableLabel: true }) }); persist(); rebuildGraph() }
function getPresetForLibrary(id: string) { return libraryPresets.value.find((preset) => preset.id === id) }
function placeStarterKit(kit: typeof STARTER_KITS[number]) { kit.systemPresetIds.forEach((id, index) => { const preset = getPresetForLibrary(id); if (preset) { const system = systemFromPreset(preset, preset.capabilities.map((capability) => capability.id), [120 + (index % 4) * 260, 140 + Math.floor(index / 4) * 180]); landscape.value.systems.push(system) } }); persist(); rebuildGraph() }
function definitionCapabilities(definition: SystemDefinition): CapabilityModel[] { return definition.actions.map((item) => ({ id: `action-${item.id}`, name: item.name, description: item.description, inputs: item.trigger === 'incoming' ? [{ id: `${item.id}-input`, name: 'Incoming request', description: 'Request handled by this action.' }] : [], outputs: item.outputs.map((output) => ({ id: output.id, name: output.name, description: output.condition || 'Action output.' })), actions: [{ id: item.id, name: item.name, description: item.description, payload: item.outputs[0]?.payload || item.input || '{}' }], payload: item.input || item.outputs[0]?.payload || '{}' })) }
function saveCustomPreset(preset: SystemPreset) { customPresets.value.push(preset); persistPresets(); activeTab.value = 'presets' }
function saveSelectedAsPreset() { if (!selectedSystem.value) return; saveCustomPreset({ id: `custom-${uid('preset')}`, name: `${selectedSystem.value.name} custom`, description: selectedSystem.value.description, category: selectedSystem.value.category, color: selectedSystem.value.color, capabilities: cloneCapabilities(selectedSystem.value.capabilities), definition: structuredClone(selectedSystem.value.definition || { actions: [], endpoints: [] }) }) }
@@ -293,5 +306,6 @@ onUnmounted(stopAnimation)
<section v-if="selectedScenario" class="scenario-environment panel"><span class="eyebrow">SCENARIO ENVIRONMENT</span><label>Environment<select v-model="selectedScenario.environmentId"><option value="">Logical system view</option><option v-for="system in landscape.systems" :key="system.id" :value="system.environments?.[0]?.id" :disabled="!system.environments?.length">{{ system.name }} · {{ system.environments?.[0]?.name || 'No environment' }}</option></select></label><label class="checkbox-label"><input v-model="selectedScenario.traceInternal" type="checkbox" /> Trace internal component connections when available</label></section>
<section v-if="pipelineTrace.length" class="pipeline-inspector panel"><div class="steps-head"><span>Middleware pipeline trace</span><small>Simulated restricted mappings</small></div><article v-for="trace in pipelineTrace" :key="trace.stepId" class="pipeline-trace-row"><div><b>{{ trace.name }}</b><small>{{ trace.type.toUpperCase() }} · {{ trace.explanation }}</small></div><div class="json-columns"><pre>{{ trace.input }}</pre><span>→</span><pre>{{ trace.output }}</pre></div><p v-if="trace.changedFields.length" class="changed-fields">Changed: {{ trace.changedFields.join(', ') }}</p></article></section>
<section v-if="customBuilderOpen" class="pipeline-builder-overlay"><div class="pipeline-builder panel"><div class="inspector-header"><div><span class="eyebrow">ACTION PIPELINES</span><h2>Middleware mapping editor</h2><p class="muted">Optional restricted pipelines are saved inside each action definition. No arbitrary JavaScript is executed.</p></div><button class="danger-icon" @click="customBuilderOpen = false">×</button></div><article v-for="action in customDraft.definition.actions" :key="action.id" class="definition-card"><div class="steps-head"><span>{{ action.name }}</span><button v-if="!action.pipeline" class="ghost" @click="attachPipeline(action)">Add pipeline</button></div><p v-if="!action.pipeline" class="muted">Add Receive, Validate, Transform, Route and Send stages to this action.</p><div v-else><label>Pipeline name<input v-model="action.pipeline.name" /></label><label>Pipeline JSON<textarea :value="JSON.stringify(action.pipeline, null, 2)" @change="updatePipeline(action, $event)" rows="14" class="code"></textarea></label><small class="muted">Mapping ops: copy, rename, fixed, default, type-conversion, object-construction and array-item-mapping. Use <code>$ref:key</code> in a fixed value for a reference lookup.</small></div></article><div class="modal-actions"><button class="ghost" @click="customBuilderOpen = false">Continue editing</button><button class="primary" @click="saveCustomBuilder">Save reusable preset</button></div></div></section>
<section v-if="activeTab === 'presets'" class="catalog-panel panel"><div class="section-heading"><div><span class="eyebrow">LAYERED PRESET LIBRARY</span><strong>Search → choose → review → insert</strong><small>Versioned fictional definitions with official documentation sources.</small></div><button class="ghost" @click="openCustomBuilder">Custom preset</button></div><div class="catalog-controls"><input v-model="presetQuery" placeholder="Search products, capabilities or tags" /><select v-model="presetLayer"><option value="all">All layers</option><option value="system">Systems</option><option value="capability">Capabilities</option><option value="template">Deployments</option><option value="kit">Starter kits</option></select></div><div v-if="presetLayer === 'all' || presetLayer === 'system'" class="catalog-section"><div class="steps-head"><span>Systems</span><small>{{ filteredLibraryPresets.length }} results · favourites are local</small></div><div class="catalog-grid"><article v-for="preset in filteredLibraryPresets" :key="preset.id" class="catalog-card"><div class="catalog-title"><span class="system-dot" :style="{background: preset.color}"></span><strong>{{ preset.name }}</strong><button class="favourite" @click="togglePresetFavourite(preset.id)">{{ favouritePresetIds.includes(preset.id) ? '★' : '☆' }}</button></div><p>{{ preset.description }}</p><div class="catalog-tags"><span v-for="tag in (preset.tags || []).slice(0, 4)" :key="tag">{{ tag }}</span></div><small>{{ preset.capabilities.length }} shared capabilities · v{{ preset.version || 1 }}</small><div class="catalog-actions"><button class="run-mini" @click="openPreset(preset)">Review & place</button><a v-if="preset.sources?.[0]" :href="preset.sources[0].url" target="_blank" rel="noreferrer">Official docs ↗</a></div></article></div></div><div v-if="presetLayer === 'all' || presetLayer === 'capability'" class="catalog-section"><div class="steps-head"><span>Shared capabilities</span><small>{{ filteredCapabilityPresets.length }} reusable definitions</small></div><div class="catalog-grid compact"><article v-for="preset in filteredCapabilityPresets" :key="preset.id" class="catalog-card"><strong>{{ preset.name }}</strong><p>{{ preset.description }}</p><div class="catalog-tags"><span v-for="tag in preset.tags" :key="tag">{{ tag }}</span></div><small>{{ preset.capability.inputs.length }} inputs · {{ preset.capability.outputs.length }} outputs · editable after placement</small></article></div></div><div v-if="presetLayer === 'all' || presetLayer === 'template'" class="catalog-section"><div class="steps-head"><span>Deployment templates</span><small>{{ filteredTemplates.length }} editable layouts</small></div><div class="catalog-grid compact"><article v-for="template in filteredTemplates" :key="template.id" class="catalog-card"><strong>{{ template.name }}</strong><p>{{ template.description }}</p><div class="catalog-tags"><span v-for="tag in template.tags" :key="tag">{{ tag }}</span></div><button class="run-mini" @click="placeDeploymentTemplate(template)">Insert layout</button></article></div></div><div v-if="presetLayer === 'all' || presetLayer === 'kit'" class="catalog-section"><div class="steps-head"><span>Starter kits</span><small>{{ filteredKits.length }} connected journeys</small></div><div class="catalog-grid compact"><article v-for="kit in filteredKits" :key="kit.id" class="catalog-card"><strong>{{ kit.name }}</strong><p>{{ kit.description }}</p><div class="catalog-tags"><span v-for="tag in kit.tags" :key="tag">{{ tag }}</span></div><button class="run-mini" @click="placeStarterKit(kit)">Insert kit systems</button></article></div></div></section>
</main>
</template>
+12 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest'
import { definitionFromCapabilities, demoLandscape, executePipeline, getPreset, systemFromPreset, validateLandscape } from './model'
import { CAPABILITY_PRESETS, CATALOG_SYSTEM_PRESETS, DEPLOYMENT_TEMPLATES, STARTER_KITS, definitionFromCapabilities, demoLandscape, executePipeline, getPreset, systemFromPreset, validateLandscape } from './model'
describe('landscape model', () => {
it('provides the editable demo landscape', () => {
@@ -61,4 +61,15 @@ describe('landscape model', () => {
expect(failed.ok).toBe(false)
expect(failed.failureStepId).toBe('validation-failure')
})
it('provides a versioned layered catalogue with official sources and reusable capabilities', () => {
expect(CATALOG_SYSTEM_PRESETS.length).toBeGreaterThan(20)
expect(CAPABILITY_PRESETS.length).toBeGreaterThan(10)
expect(DEPLOYMENT_TEMPLATES.map((template) => template.id)).toContain('sitecore-cm-cd')
expect(STARTER_KITS.map((kit) => kit.id)).toContain('publishing-cicd')
expect(CATALOG_SYSTEM_PRESETS.every((preset) => preset.version === 1 && preset.sources?.[0].url.startsWith('http'))).toBe(true)
const website = CATALOG_SYSTEM_PRESETS.find((preset) => preset.id === 'generic-website')!
const placed = systemFromPreset(website, website.capabilities.map((capability) => capability.id), [10, 20])
placed.capabilities[0].payload = '{"edited":true}'
expect(website.capabilities[0].payload).not.toBe('{"edited":true}')
})
})
+78 -2
View File
@@ -18,7 +18,11 @@ export interface EndpointResponseModel { id: string; status: number; body: strin
export interface EndpointModel { id: string; name: string; protocol: string; method: string; path: string; request: string; responses: EndpointResponseModel[]; triggersActionId?: string }
export interface SystemDefinition { actions: DefinitionActionModel[]; endpoints: EndpointModel[] }
export interface CapabilityModel { id: string; name: string; description: string; inputs: PortModel[]; outputs: PortModel[]; actions: ActionModel[]; payload: string }
export interface SystemPreset { id: string; name: string; description: string; category: SystemCategory; color: string; capabilities: CapabilityModel[]; definition?: SystemDefinition }
export interface PresetSource { url: string; verifiedOn: string; note?: string }
export interface SystemPreset { id: string; name: string; description: string; category: SystemCategory; color: string; capabilities: CapabilityModel[]; definition?: SystemDefinition; layer?: 'system' | 'capability'; tags?: string[]; sources?: PresetSource[]; version?: number }
export interface CapabilityPreset { id: string; name: string; description: string; tags: string[]; capability: CapabilityModel; sources: PresetSource[]; version: number }
export interface DeploymentTemplate { id: string; name: string; description: string; tags: string[]; systems: { presetId: string; name?: string; position: [number, number] }[]; connections: { sourceIndex: number; targetIndex: number; label: string; connectionType?: ConnectionType }[]; sources: PresetSource[]; version: number }
export interface StarterKit { id: string; name: string; description: string; tags: string[]; systemPresetIds: string[]; scenarioIds: string[]; sources: PresetSource[]; version: number }
export interface SystemModel {
id: string
@@ -145,7 +149,7 @@ export function executePipeline(inputJson: string, pipeline: TransformationPipel
return { ok: true, payload: JSON.stringify(current), trace }
}
export const SYSTEM_PRESETS: SystemPreset[] = [
const CORE_SYSTEM_PRESETS: SystemPreset[] = [
{ id: 'website', name: 'Website', description: 'Customer-facing storefront and account experience.', category: 'application', color: '#6d7cff', capabilities: [
capability('contact-forms', 'Contact forms', 'Collect a visitor message and route it to a service team.', [port('form-submit', 'Form submit', 'A visitor-submitted contact form.')], [port('contact-request', 'Contact request', 'Validated contact details and message.')], [action('submit-contact', 'Submit contact form', 'Create a fictional support request.', '{"requestId":"req_1001","email":"sam@example.test","message":"Please call me"}')], '{"requestId":"req_1001","email":"sam@example.test"}'),
capability('sample-ordering', 'Sample ordering', 'Allow visitors to request a product sample.', [port('sample-request', 'Sample request', 'A request for a product sample.')], [port('sample-order', 'Sample order', 'A created sample order.')], [action('place-sample', 'Place sample order', 'Create a fictional sample order.', '{"orderId":"smp_1042","sku":"sample-blue","quantity":1}')], '{"orderId":"smp_1042","sku":"sample-blue"}'),
@@ -169,6 +173,78 @@ export const SYSTEM_PRESETS: SystemPreset[] = [
{ id: 'middleware', name: 'Order Middleware', description: 'Simulated receive/validate/transform/route/send middleware.', category: 'service', color: '#b48cff', capabilities: [capability('pipeline', 'Order pipeline', 'Transform website orders into ERP account orders.', [port('order-input', 'Order input', 'A website order.')], [port('erp-order', 'ERP order', 'An ERP-ready order.')], [action('process-order', 'Process order', 'Run the order transformation pipeline.', '{"customerId":"cus_89","sku":"sample-blue","quantity":1}')], '{"customerId":"cus_89","sku":"sample-blue","quantity":1}')], definition: { actions: [{ id: 'process-order', name: 'Process order', description: 'Receive, validate, transform, route and send an order.', trigger: 'incoming', input: '{"customerId":"cus_89","sku":"sample-blue","quantity":1}', outputs: [{ id: 'erp-output', name: 'ERP order', payload: '{"accountCode":"ERP-0042","sku":"sample-blue","quantity":1}', condition: 'customerId', parallel: false }], pipeline: { id: 'order-pipeline', name: 'Website → ERP order pipeline', references: { 'customerId:cus_89': 'ERP-0042' }, steps: [{ id: 'receive', type: 'receive', name: 'Receive', description: 'Receive the website order.', mappings: [] }, { id: 'validate', type: 'validate', name: 'Validate', description: 'Reject orders without a customer ID.', mappings: [], condition: 'customerId', failureStepId: 'validation-failure' }, { id: 'transform', type: 'transform', name: 'Transform', description: 'Map the website customer ID through the ERP account lookup.', mappings: [{ op: 'fixed', target: 'accountCode', value: '$ref:customerId:cus_89' }, { op: 'fixed', target: 'channel', value: 'website' }, { op: 'default', source: 'quantity', target: 'quantity', value: 1 }] }, { id: 'route', type: 'route', name: 'Route', description: 'Route valid orders to ERP.', mappings: [], condition: 'accountCode', failureStepId: 'validation-failure' }, { id: 'send', type: 'send', name: 'Send', description: 'Send the resulting payload to ERP.', mappings: [] }, { id: 'validation-failure', type: 'send', name: 'Validation failure', description: 'Send a validation failure notification.', mappings: [{ op: 'fixed', target: 'status', value: 'rejected' }] }] } }], endpoints: [{ id: 'order-webhook', name: 'Order webhook', protocol: 'HTTPS', method: 'POST', path: '/orders', request: '{"customerId":"cus_89"}', responses: [{ id: 'accepted', status: 202, body: '{"accepted":true}', delayMs: 150 }] }] } }
]
const source = (url: string, note?: string): PresetSource => ({ url, verifiedOn: '2026-11-05', ...(note ? { note } : {}) })
const capabilityPreset = (id: string, name: string, description: string, tags: string[], value: CapabilityModel, url: string): CapabilityPreset => ({ id, name, description, tags, capability: value, sources: [source(url)], version: 1 })
const catalogCapability = (id: string, name: string, description: string, input: string, output: string, payload: string, url: string) => capabilityPreset(id, name, description, ['shared capability'], capability(id, name, description, [port(`${id}-input`, input, description)], [port(`${id}-output`, output, description)], [action(`${id}-action`, name, description, payload)], payload), url)
export const CAPABILITY_PRESETS: CapabilityPreset[] = [
capabilityPreset('login', 'Login', 'Authenticate a fictional user session.', ['identity', 'application'], capability('login', 'Login', 'Authenticate a fictional user session.', [port('credentials', 'Credentials', 'Fictional credentials.')], [port('session', 'Session', 'A fictional session.')], [action('login-action', 'Sign in', 'Simulate sign-in.', '{"userId":"usr_204","status":"authenticated"}')], '{"email":"sam@example.test"}'), 'https://learn.microsoft.com/en-us/aspnet/core/security/authentication/'),
capabilityPreset('publishing', 'Publishing', 'Publish fictional content between authoring and delivery systems.', ['cms', 'content'], capability('publishing', 'Publishing', 'Publish fictional content.', [port('publish-request', 'Publish request', 'Content to publish.')], [port('publish-event', 'Publish event', 'A publish event.')], [action('publish-action', 'Publish content', 'Simulate publication.', '{"itemId":"item_42","status":"published"}')], '{"itemId":"item_42"}'), 'https://doc.sitecore.com/'),
capabilityPreset('validation', 'Validation', 'Validate a fictional request before forwarding it.', ['middleware', 'quality'], capability('validation', 'Validation', 'Validate a fictional request.', [port('validation-input', 'Validation input', 'Payload to validate.')], [port('validation-result', 'Validation result', 'Validation outcome.')], [action('validation-action', 'Validate request', 'Simulate validation.', '{"valid":true,"errors":[]}')], '{}'), 'https://learn.microsoft.com/en-us/azure/architecture/patterns/'),
capabilityPreset('transformation', 'Transformation', 'Map an example payload between system contracts.', ['middleware', 'integration'], capability('transformation', 'Transformation', 'Map an example payload.', [port('transform-input', 'Input payload', 'Incoming payload.')], [port('transform-output', 'Output payload', 'Mapped payload.')], [action('transformation-action', 'Transform payload', 'Simulate transformation.', '{"mapped":true}')], '{}'), 'https://learn.microsoft.com/en-us/azure/architecture/patterns/'),
capabilityPreset('routing', 'Routing', 'Select a fictional destination based on a condition.', ['middleware', 'integration'], capability('routing', 'Routing', 'Select a fictional destination.', [port('route-input', 'Route input', 'Payload to route.')], [port('route-output', 'Route output', 'Selected destination payload.')], [action('routing-action', 'Route message', 'Simulate routing.', '{"destination":"primary"}')], '{}'), 'https://learn.microsoft.com/en-us/azure/service-bus-messaging/'),
capabilityPreset('messaging', 'Messaging', 'Publish a fictional message or event.', ['integration', 'messaging'], capability('messaging-shared', 'Messaging', 'Publish a fictional message.', [port('message-input', 'Message input', 'Message to publish.')], [port('message-output', 'Message output', 'Published message event.')], [action('messaging-shared-action', 'Publish message', 'Simulate message delivery.', '{"messageId":"msg_42","status":"accepted"}')], '{"message":"example"}'), 'https://learn.microsoft.com/en-us/azure/service-bus-messaging/'),
capabilityPreset('build', 'Build', 'Run a fictional software build.', ['development', 'ci-cd'], capability('build-shared', 'Build', 'Run a fictional build.', [port('build-input', 'Build trigger', 'Source change to build.')], [port('build-output', 'Build result', 'Build result.')], [action('build-shared-action', 'Run build', 'Simulate a build.', '{"buildId":"build_42","status":"succeeded"}')], '{"branch":"main"}'), 'https://learn.microsoft.com/en-us/azure/devops/pipelines/'),
capabilityPreset('tests', 'Tests', 'Run a fictional test suite.', ['development', 'ci-cd'], capability('tests-shared', 'Tests', 'Run fictional tests.', [port('test-input', 'Test trigger', 'Build artifact to test.')], [port('test-output', 'Test result', 'Test result.')], [action('tests-shared-action', 'Run tests', 'Simulate tests.', '{"suite":"smoke","status":"passed"}')], '{"artifact":"build_42"}'), 'https://www.jenkins.io/doc/book/pipeline/'),
capabilityPreset('packaging', 'Packaging', 'Create a fictional deployable package.', ['development', 'ci-cd'], capability('packaging-shared', 'Packaging', 'Create a fictional package.', [port('package-input', 'Package input', 'Build output to package.')], [port('package-output', 'Package output', 'Package artifact.')], [action('packaging-shared-action', 'Package artifact', 'Simulate packaging.', '{"artifact":"site_42.zip","status":"ready"}')], '{"buildId":"build_42"}'), 'https://octopus.com/docs/deployments/packages'),
capabilityPreset('deployment', 'Deployment', 'Deploy a fictional artifact to an environment.', ['development', 'ci-cd'], capability('deployment-shared', 'Deployment', 'Deploy a fictional artifact.', [port('deploy-input', 'Deployment input', 'Artifact to deploy.')], [port('deploy-output', 'Deployment result', 'Deployment result.')], [action('deployment-shared-action', 'Deploy artifact', 'Simulate deployment.', '{"deploymentId":"dep_42","status":"complete"}')], '{"artifact":"site_42.zip","environment":"QA"}'), 'https://learn.microsoft.com/en-us/azure/devops/pipelines/release/'),
capabilityPreset('approvals', 'Approvals', 'Pause for a fictional approval decision.', ['governance', 'ci-cd'], capability('approvals-shared', 'Approvals', 'Pause for approval.', [port('approval-input', 'Approval request', 'Request awaiting approval.')], [port('approval-output', 'Approval decision', 'Approval decision.')], [action('approvals-shared-action', 'Approve deployment', 'Simulate approval.', '{"decision":"approved","role":"release-manager"}')], '{"environment":"Production"}'), 'https://docs.octopus.com/docs/deployments/releases/lifecycles'),
capabilityPreset('rollback', 'Rollback', 'Restore a fictional previous release.', ['operations', 'ci-cd'], capability('rollback-shared', 'Rollback', 'Restore a fictional release.', [port('rollback-input', 'Rollback input', 'Failed release.')], [port('rollback-output', 'Rollback result', 'Rollback result.')], [action('rollback-shared-action', 'Rollback release', 'Simulate rollback.', '{"release":"2026.11.1","status":"restored"}')], '{"release":"2026.11.2"}'), 'https://octopus.com/docs/deployments/releases/rollback'),
catalogCapability('search', 'Search', 'Index and query fictional documents.', 'Search request', 'Search result', '{"query":"blue jacket","hits":3}', 'https://solr.apache.org/guide/solr/latest/'),
catalogCapability('relational-data', 'Relational data', 'Store fictional relational records.', 'SQL request', 'SQL result', '{"table":"orders","rows":1}', 'https://learn.microsoft.com/en-us/sql/'),
catalogCapability('cache', 'Cache', 'Read and write fictional cached values.', 'Cache request', 'Cache result', '{"key":"customer:cus_89","hit":true}', 'https://redis.io/docs/latest/'),
catalogCapability('object-storage', 'Object storage', 'Store fictional objects and blobs.', 'Object request', 'Object result', '{"key":"orders/ord_42.json","status":"stored"}', 'https://learn.microsoft.com/en-us/azure/storage/blobs/'),
catalogCapability('monitoring', 'Monitoring', 'Emit fictional health and telemetry events.', 'Telemetry event', 'Alert event', '{"service":"website","health":"green"}', 'https://learn.microsoft.com/en-us/azure/azure-monitor/'),
catalogCapability('networking', 'Networking', 'Represent fictional routes, gateways and network boundaries.', 'Route request', 'Route result', '{"route":"api.example.test","status":"available"}', 'https://learn.microsoft.com/en-us/azure/networking/'),
catalogCapability('identity', 'Identity', 'Represent fictional identities and access decisions.', 'Identity request', 'Access decision', '{"subject":"usr_204","allowed":true}', 'https://learn.microsoft.com/en-us/entra/identity/'),
]
const sharedCapability = (id: string) => CAPABILITY_PRESETS.find((item) => item.id === id)?.capability
const catalogSystem = (id: string, name: string, description: string, category: SystemCategory, color: string, capabilityIds: string[], tags: string[], url: string): SystemPreset => ({ id, name, description, category, color, tags, layer: 'system', version: 1, sources: [source(url)], capabilities: capabilityIds.map((capabilityId) => sharedCapability(capabilityId)).filter(Boolean).map((item) => structuredClone(item!)) })
export const CATALOG_SYSTEM_PRESETS: SystemPreset[] = [
catalogSystem('sitecore', 'Sitecore', 'Enterprise CMS and digital experience platform.', 'application', '#f06ca9', ['publishing', 'analytics', 'login'], ['CMS', 'web', 'Microsoft'], 'https://doc.sitecore.com/'),
catalogSystem('umbraco', 'Umbraco', 'Open-source .NET CMS simulation template.', 'application', '#16a085', ['publishing', 'login', 'analytics'], ['CMS', '.NET', 'web'], 'https://docs.umbraco.com/'),
catalogSystem('generic-website', 'Generic Website', 'A neutral website application template.', 'application', '#6d7cff', ['login', 'validation', 'analytics'], ['web', 'application'], 'https://developer.mozilla.org/en-US/docs/Web'),
catalogSystem('ordercloud-catalog', 'Sitecore OrderCloud', 'Headless commerce API simulation template.', 'saas-service', '#f06ca9', ['validation', 'routing', 'messaging'], ['commerce', 'API', 'Sitecore'], 'https://ordercloud.io/'),
catalogSystem('mailchimp-catalog', 'Mailchimp', 'Marketing automation and email platform template.', 'saas-service', '#f5b335', ['messaging', 'analytics'], ['marketing', 'email', 'SaaS'], 'https://mailchimp.com/developer/'),
catalogSystem('postgresql', 'PostgreSQL', 'Relational database template.', 'data-store', '#336791', ['relational-data', 'monitoring'], ['database', 'open source'], 'https://www.postgresql.org/docs/'),
catalogSystem('sql-server', 'SQL Server', 'Relational database server template.', 'data-store', '#a91d22', ['relational-data', 'monitoring'], ['database', 'Microsoft'], 'https://learn.microsoft.com/en-us/sql/'),
catalogSystem('mysql', 'MySQL', 'Relational database template.', 'data-store', '#4479a1', ['relational-data', 'monitoring'], ['database', 'open source'], 'https://dev.mysql.com/doc/'),
catalogSystem('redis', 'Redis', 'In-memory cache and data store template.', 'data-store', '#d82c20', ['cache', 'monitoring'], ['cache', 'data store'], 'https://redis.io/docs/latest/'),
catalogSystem('solr', 'Solr', 'Search and indexing service template.', 'data-store', '#d9411e', ['search', 'monitoring'], ['search', 'Apache'], 'https://solr.apache.org/guide/solr/latest/'),
catalogSystem('elasticsearch', 'Elasticsearch', 'Search and observability data service template.', 'data-store', '#fed10a', ['search', 'monitoring'], ['search', 'Elastic'], 'https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html'),
catalogSystem('azure-functions-catalog', 'Azure Functions', 'Serverless compute template.', 'cloud-service', '#00a4ef', ['validation', 'monitoring', 'messaging'], ['Azure', 'compute', 'serverless'], 'https://learn.microsoft.com/en-us/azure/azure-functions/'),
catalogSystem('azure-app-service', 'Azure App Service', 'Managed web hosting template.', 'cloud-service', '#0078d4', ['monitoring', 'deployment', 'identity'], ['Azure', 'hosting'], 'https://learn.microsoft.com/en-us/azure/app-service/'),
catalogSystem('azure-vm', 'Azure Virtual Machines', 'Virtual server hosting template.', 'cloud-service', '#0078d4', ['monitoring', 'deployment', 'networking'], ['Azure', 'compute', 'infrastructure'], 'https://learn.microsoft.com/en-us/azure/virtual-machines/'),
catalogSystem('azure-storage-catalog', 'Azure Storage', 'Blob, file and queue storage template.', 'cloud-service', '#86bc25', ['object-storage', 'monitoring'], ['Azure', 'storage'], 'https://learn.microsoft.com/en-us/azure/storage/'),
catalogSystem('azure-sql', 'Azure SQL Database', 'Managed relational database template.', 'cloud-service', '#0078d4', ['relational-data', 'monitoring', 'identity'], ['Azure', 'database'], 'https://learn.microsoft.com/en-us/azure/azure-sql/'),
catalogSystem('azure-service-bus-catalog', 'Azure Service Bus', 'Managed messaging template.', 'cloud-service', '#5d8ee8', ['messaging', 'routing', 'monitoring'], ['Azure', 'messaging'], 'https://learn.microsoft.com/en-us/azure/service-bus-messaging/'),
catalogSystem('azure-monitor', 'Azure Monitor', 'Metrics, logs and alerting template.', 'cloud-service', '#5c2d91', ['monitoring', 'analytics'], ['Azure', 'operations'], 'https://learn.microsoft.com/en-us/azure/azure-monitor/'),
catalogSystem('bitbucket-catalog', 'Bitbucket', 'Source repository template.', 'development-tool', '#2684ff', ['build', 'tests'], ['development', 'repository', 'Atlassian'], 'https://support.atlassian.com/bitbucket-cloud/docs/'),
catalogSystem('github', 'GitHub', 'Source repository and collaboration template.', 'development-tool', '#f0f0f0', ['build', 'tests'], ['development', 'repository'], 'https://docs.github.com/en/repositories'),
catalogSystem('gitea', 'Gitea', 'Self-hosted source repository template.', 'development-tool', '#609926', ['build', 'tests'], ['development', 'repository', 'self-hosted'], 'https://docs.gitea.com/'),
catalogSystem('teamcity', 'TeamCity', 'Build and CI orchestration template.', 'development-tool', '#21d789', ['build', 'tests', 'packaging'], ['development', 'CI'], 'https://www.jetbrains.com/help/teamcity/'),
catalogSystem('jenkins', 'Jenkins', 'Extensible automation server template.', 'development-tool', '#d24939', ['build', 'tests', 'deployment'], ['development', 'CI'], 'https://www.jenkins.io/doc/'),
catalogSystem('octopus-deploy', 'Octopus Deploy', 'Release and deployment orchestration template.', 'development-tool', '#2f93e0', ['deployment', 'approvals', 'rollback'], ['development', 'release'], 'https://octopus.com/docs/'),
catalogSystem('web-server', 'Web Server', 'Generic infrastructure web server template.', 'service', '#7b879e', ['networking', 'monitoring', 'deployment'], ['infrastructure', 'server'], 'https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_web_server'),
catalogSystem('load-balancer', 'Load Balancer', 'Generic traffic distribution template.', 'service', '#7b879e', ['networking', 'monitoring'], ['infrastructure', 'networking'], 'https://learn.microsoft.com/en-us/azure/load-balancer/'),
catalogSystem('gateway', 'API Gateway', 'Generic gateway and edge routing template.', 'service', '#26c6a6', ['routing', 'identity', 'monitoring'], ['infrastructure', 'gateway'], 'https://learn.microsoft.com/en-us/azure/api-management/'),
catalogSystem('database-cluster', 'Database Cluster', 'Generic clustered database topology template.', 'data-store', '#61728e', ['relational-data', 'monitoring'], ['infrastructure', 'database'], 'https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/data-store-overview'),
catalogSystem('people-team', 'People / Team', 'Role or team responsible for a simulated decision.', 'human', '#f06ca9', ['approvals', 'validation'], ['people', 'governance'], 'https://learn.microsoft.com/en-us/azure/architecture/framework/'),
]
export const SYSTEM_PRESETS: SystemPreset[] = [...CORE_SYSTEM_PRESETS, ...CATALOG_SYSTEM_PRESETS.filter((candidate) => !CORE_SYSTEM_PRESETS.some((existing) => existing.id === candidate.id))]
export const DEPLOYMENT_TEMPLATES: DeploymentTemplate[] = [
{ id: 'single-server-dev', name: 'Single-server development', description: 'One application server for a local development landscape.', tags: ['development', 'infrastructure'], systems: [{ presetId: 'web-server', name: 'Dev server', position: [120, 180] }], connections: [], sources: [source('https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/compute-decision-tree')], version: 1 },
{ id: 'app-database', name: 'Application + database', description: 'A web application connected to a relational data store.', tags: ['development', 'database'], systems: [{ presetId: 'generic-website', position: [120, 180] }, { presetId: 'postgresql', position: [460, 180] }], connections: [{ sourceIndex: 0, targetIndex: 1, label: 'Data access', connectionType: 'dependency' }], sources: [source('https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/data-store-overview')], version: 1 },
{ id: 'sitecore-cm-cd', name: 'Sitecore CM + two CDs + SQL + Solr', description: 'Editable fictional Sitecore production topology.', tags: ['Sitecore', 'CMS', 'production'], systems: [{ presetId: 'sitecore', name: 'Sitecore CM', position: [120, 160] }, { presetId: 'sitecore', name: 'Sitecore CD 1', position: [430, 100] }, { presetId: 'sitecore', name: 'Sitecore CD 2', position: [430, 250] }, { presetId: 'sql-server', position: [760, 140] }, { presetId: 'solr', position: [760, 300] }], connections: [{ sourceIndex: 0, targetIndex: 1, label: 'Publish', connectionType: 'data-flow' }, { sourceIndex: 0, targetIndex: 2, label: 'Publish', connectionType: 'data-flow' }, { sourceIndex: 0, targetIndex: 3, label: 'SQL data', connectionType: 'dependency' }, { sourceIndex: 1, targetIndex: 4, label: 'Search', connectionType: 'dependency' }], sources: [source('https://doc.sitecore.com/'), source('https://learn.microsoft.com/en-us/sql/')], version: 1 },
]
export const STARTER_KITS: StarterKit[] = [
{ id: 'connected-enquiry', name: 'Connected enquiry', description: 'Website contact form through API to CRM and email.', tags: ['business', 'website'], systemPresetIds: ['website', 'api', 'crm', 'email'], scenarioIds: ['contact-enquiry'], sources: [source('https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form')], version: 1 },
{ id: 'registration', name: 'Registration journey', description: 'Website registration through API to CRM and welcome email.', tags: ['business', 'identity'], systemPresetIds: ['website', 'api', 'crm', 'email'], scenarioIds: ['register-customer'], sources: [source('https://learn.microsoft.com/en-us/aspnet/core/security/authentication/')], version: 1 },
{ id: 'sample-order', name: 'Sample / order journey', description: 'Website sample request with review and fulfilment branches.', tags: ['business', 'commerce'], systemPresetIds: ['website', 'sales-review-role', 'erp', 'email'], scenarioIds: ['sample-request'], sources: [source('https://ordercloud.io/')], version: 1 },
{ id: 'publishing-cicd', name: 'Publishing and CI/CD', description: 'Repository commit through build, tests and deployment.', tags: ['development', 'CMS'], systemPresetIds: ['bitbucket', 'azure-devops', 'sitecore'], scenarioIds: ['commit-build-deploy'], sources: [source('https://learn.microsoft.com/en-us/azure/devops/pipelines/')], version: 1 },
]
export function getPreset(id: string) { return SYSTEM_PRESETS.find((preset) => preset.id === id) }
export function cloneCapabilities(capabilities: CapabilityModel[], selectedIds?: string[]) { return structuredClone(capabilities.filter((item) => !selectedIds || selectedIds.includes(item.id))) }
export function definitionFromCapabilities(capabilities: CapabilityModel[]): SystemDefinition { return { actions: capabilities.flatMap((capability) => capability.actions.map((item) => ({ id: item.id, name: item.name, description: item.description, trigger: 'button' as ActionTrigger, input: capability.payload, outputs: [{ id: `${item.id}-output`, name: capability.outputs[0]?.name || 'Output', payload: item.payload }] }))), endpoints: capabilities.flatMap((capability) => capability.inputs.map((input) => ({ id: `${capability.id}-${input.id}`, name: input.name, protocol: 'HTTPS', method: 'POST', path: `/${capability.id}/${input.id}`, request: capability.payload, responses: [{ id: `${capability.id}-${input.id}-response`, status: 200, body: capability.payload, delayMs: 250 }], triggersActionId: capability.actions[0]?.id }))) } }
+1
View File
@@ -3,3 +3,4 @@
.category-panel{display:flex;gap:12px;align-items:end;padding:12px 16px;margin-top:14px}.category-panel label{color:#8996af;font-size:11px;font-weight:700;min-width:190px}.category-panel select{display:block;width:100%;margin-top:5px;background:#0d1320;color:#dce4f4;border:1px solid #303d58;border-radius:4px;padding:8px}@media(max-width:700px){.category-panel{display:block}.category-panel label{display:block;margin-bottom:10px}}
.scenario-environment,.environment-panel{padding:16px;margin-top:14px}.scenario-environment{display:flex;gap:14px;align-items:center}.scenario-environment label{color:#8996af;font-size:11px;font-weight:700}.scenario-environment select{display:block;min-width:240px;margin-top:5px;background:#0d1320;color:#dce4f4;border:1px solid #303d58;border-radius:4px;padding:8px}.environment-header{display:flex;justify-content:space-between;align-items:center;gap:12px}.environment-header strong{display:block;margin-top:4px}.environment-actions{display:flex;gap:7px}.environment-tabs{display:flex;gap:7px;flex-wrap:wrap;border-bottom:1px solid #263149;padding:12px 0}.environment-tabs button{border:1px solid #33405a;background:#151d2d;color:#bdc8dc;border-radius:5px;padding:7px 11px}.environment-tabs button.active{background:#8795ff;color:#08101f}.environment-detail{display:grid;grid-template-columns:260px 1fr;gap:16px;padding-top:14px}.environment-config{display:flex;flex-direction:column;gap:5px}.environment-config label,.component-card label{color:#8996af;font-size:10px;font-weight:700}.environment-config input,.environment-config textarea,.component-card input,.component-card select,.component-card textarea{display:block;width:100%;margin-top:5px;background:#0d1320;color:#dce4f4;border:1px solid #303d58;border-radius:4px;padding:7px}.component-card{border:1px solid #303d58;background:#0d1320;border-radius:6px;padding:10px;margin:8px 0}.component-head{display:flex;gap:10px;align-items:center;margin-bottom:10px}.component-head strong{color:#dce4f4}.component-head small{color:#8996af;flex:1}.environment-topology{grid-column:1/-1;border-top:1px solid #263149;padding-top:12px}.topology-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px;margin:7px 0}.topology-row input,.topology-row select{background:#0d1320;color:#dce4f4;border:1px solid #303d58;border-radius:4px;padding:7px}@media(max-width:800px){.environment-detail{grid-template-columns:1fr}.scenario-environment{display:block}.scenario-environment label{display:block;margin-top:8px}.environment-header{align-items:flex-start;flex-direction:column}}
.pipeline-inspector{padding:16px;margin-top:14px}.pipeline-trace-row{border-top:1px solid #263149;padding:12px 0}.pipeline-trace-row>div:first-child{display:flex;justify-content:space-between;gap:12px}.pipeline-trace-row small{color:#8996af}.pipeline-trace-row pre{max-height:150px;overflow:auto}.changed-fields{color:#f4ca72;font-size:11px}.pipeline-builder-overlay{position:fixed;inset:0;z-index:30;background:rgba(4,8,15,.78);display:grid;place-items:center;padding:24px}.pipeline-builder{width:min(820px,96vw);max-height:90vh;overflow:auto;padding:20px}.pipeline-builder .definition-card{margin:12px 0}.pipeline-builder textarea{width:100%;box-sizing:border-box}.pipeline-builder code{color:#b9c5ff}
.catalog-panel{padding:16px;margin-top:14px}.catalog-panel small{display:block;color:#8996af;margin-top:4px}.catalog-controls{display:grid;grid-template-columns:1fr 180px;gap:8px;margin:14px 0}.catalog-controls input,.catalog-controls select{background:#0d1320;color:#dce4f4;border:1px solid #303d58;border-radius:4px;padding:9px}.catalog-section{border-top:1px solid #263149;padding-top:14px;margin-top:14px}.catalog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}.catalog-grid.compact{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}.catalog-card{border:1px solid #303d58;background:#0d1320;border-radius:5px;padding:12px}.catalog-title{display:flex;align-items:center;gap:8px}.catalog-title strong{flex:1}.catalog-card p{color:#aab5c9;font-size:11px;line-height:1.45;min-height:34px}.catalog-tags{display:flex;gap:4px;flex-wrap:wrap;margin:8px 0}.catalog-tags span{font-size:9px;color:#b9c5ff;border:1px solid #39486a;border-radius:10px;padding:3px 6px}.catalog-actions{display:flex;align-items:center;justify-content:space-between;margin-top:10px}.catalog-actions a{color:#91a4ff;font-size:10px}.favourite{background:transparent;border:0;color:#f4ca72;font-size:18px;cursor:pointer}@media(max-width:700px){.catalog-controls{grid-template-columns:1fr}.catalog-grid{grid-template-columns:1fr}}