@rien7/seji 0.0.0 → 0.6.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/bin/design-surface.mjs +6 -0
- package/bin/postinstall.mjs +19 -0
- package/bin/seji.mjs +585 -0
- package/dist/agent/host.d.mts +34 -0
- package/dist/agent/host.mjs +387 -0
- package/dist/agent/messages.d.mts +9 -0
- package/dist/agent/messages.mjs +70 -0
- package/dist/agent/runtimes.mjs +157 -0
- package/dist/cli/app.mjs +321 -0
- package/dist/cli/appScan.mjs +284 -0
- package/dist/cli/catalog.mjs +78 -0
- package/dist/cli/component.mjs +165 -0
- package/dist/cli/consolidate.mjs +159 -0
- package/dist/cli/cssImport.mjs +68 -0
- package/dist/cli/dev.mjs +339 -0
- package/dist/cli/doctor.mjs +311 -0
- package/dist/cli/init.mjs +338 -0
- package/dist/cli/legacyNames.mjs +266 -0
- package/dist/cli/migrate.mjs +163 -0
- package/dist/cli/prompt.mjs +34 -0
- package/dist/cli/propose.mjs +208 -0
- package/dist/cli/providers.mjs +344 -0
- package/dist/cli/reviewOps.mjs +110 -0
- package/dist/cli/semver.mjs +45 -0
- package/dist/cli/setup.mjs +360 -0
- package/dist/cli/sketches.mjs +47 -0
- package/dist/cli/skills.mjs +150 -0
- package/dist/cli/snapshot.mjs +107 -0
- package/dist/cli/tokenOps.mjs +120 -0
- package/dist/cli/types.mjs +191 -0
- package/dist/cli/updater.mjs +274 -0
- package/dist/components/astIndex.mjs +992 -0
- package/dist/components/ops.mjs +1069 -0
- package/dist/editor/AgentProposalCard.d.ts +10 -0
- package/dist/editor/AgentProposalCard.d.ts.map +1 -0
- package/dist/editor/AgentProposalCard.js +31 -0
- package/dist/editor/AgentProposalCard.js.map +1 -0
- package/dist/editor/App.d.ts +2 -0
- package/dist/editor/App.d.ts.map +1 -0
- package/dist/editor/App.js +2834 -0
- package/dist/editor/App.js.map +1 -0
- package/dist/editor/CanvasHud.d.ts +12 -0
- package/dist/editor/CanvasHud.d.ts.map +1 -0
- package/dist/editor/CanvasHud.js +13 -0
- package/dist/editor/CanvasHud.js.map +1 -0
- package/dist/editor/CanvasSurface.d.ts +31 -0
- package/dist/editor/CanvasSurface.d.ts.map +1 -0
- package/dist/editor/CanvasSurface.js +270 -0
- package/dist/editor/CanvasSurface.js.map +1 -0
- package/dist/editor/CommentPopover.d.ts +17 -0
- package/dist/editor/CommentPopover.d.ts.map +1 -0
- package/dist/editor/CommentPopover.js +62 -0
- package/dist/editor/CommentPopover.js.map +1 -0
- package/dist/editor/Comments.d.ts +13 -0
- package/dist/editor/Comments.d.ts.map +1 -0
- package/dist/editor/Comments.js +41 -0
- package/dist/editor/Comments.js.map +1 -0
- package/dist/editor/ComponentPage.d.ts +28 -0
- package/dist/editor/ComponentPage.d.ts.map +1 -0
- package/dist/editor/ComponentPage.js +55 -0
- package/dist/editor/ComponentPage.js.map +1 -0
- package/dist/editor/ComponentPanel.d.ts +38 -0
- package/dist/editor/ComponentPanel.d.ts.map +1 -0
- package/dist/editor/ComponentPanel.js +275 -0
- package/dist/editor/ComponentPanel.js.map +1 -0
- package/dist/editor/Glyph.d.ts +51 -0
- package/dist/editor/Glyph.d.ts.map +1 -0
- package/dist/editor/Glyph.js +50 -0
- package/dist/editor/Glyph.js.map +1 -0
- package/dist/editor/History.d.ts +7 -0
- package/dist/editor/History.d.ts.map +1 -0
- package/dist/editor/History.js +51 -0
- package/dist/editor/History.js.map +1 -0
- package/dist/editor/Inspector.d.ts +56 -0
- package/dist/editor/Inspector.d.ts.map +1 -0
- package/dist/editor/Inspector.js +510 -0
- package/dist/editor/Inspector.js.map +1 -0
- package/dist/editor/LazyMount.d.ts +10 -0
- package/dist/editor/LazyMount.d.ts.map +1 -0
- package/dist/editor/LazyMount.js +29 -0
- package/dist/editor/LazyMount.js.map +1 -0
- package/dist/editor/LocaleSwitch.d.ts +3 -0
- package/dist/editor/LocaleSwitch.d.ts.map +1 -0
- package/dist/editor/LocaleSwitch.js +9 -0
- package/dist/editor/LocaleSwitch.js.map +1 -0
- package/dist/editor/PreviewFrame.d.ts +10 -0
- package/dist/editor/PreviewFrame.d.ts.map +1 -0
- package/dist/editor/PreviewFrame.js +22 -0
- package/dist/editor/PreviewFrame.js.map +1 -0
- package/dist/editor/ProjectIndex.d.ts +12 -0
- package/dist/editor/ProjectIndex.d.ts.map +1 -0
- package/dist/editor/ProjectIndex.js +43 -0
- package/dist/editor/ProjectIndex.js.map +1 -0
- package/dist/editor/PromoteComponent.d.ts +28 -0
- package/dist/editor/PromoteComponent.d.ts.map +1 -0
- package/dist/editor/PromoteComponent.js +33 -0
- package/dist/editor/PromoteComponent.js.map +1 -0
- package/dist/editor/PromoteForm.d.ts +18 -0
- package/dist/editor/PromoteForm.d.ts.map +1 -0
- package/dist/editor/PromoteForm.js +35 -0
- package/dist/editor/PromoteForm.js.map +1 -0
- package/dist/editor/PromoteToken.d.ts +31 -0
- package/dist/editor/PromoteToken.d.ts.map +1 -0
- package/dist/editor/PromoteToken.js +94 -0
- package/dist/editor/PromoteToken.js.map +1 -0
- package/dist/editor/StatePreviews.d.ts +28 -0
- package/dist/editor/StatePreviews.d.ts.map +1 -0
- package/dist/editor/StatePreviews.js +113 -0
- package/dist/editor/StatePreviews.js.map +1 -0
- package/dist/editor/ValueCombo.d.ts +51 -0
- package/dist/editor/ValueCombo.d.ts.map +1 -0
- package/dist/editor/ValueCombo.js +260 -0
- package/dist/editor/ValueCombo.js.map +1 -0
- package/dist/editor/agent/AgentPanel.d.ts +19 -0
- package/dist/editor/agent/AgentPanel.d.ts.map +1 -0
- package/dist/editor/agent/AgentPanel.js +271 -0
- package/dist/editor/agent/AgentPanel.js.map +1 -0
- package/dist/editor/agent/Markdown.d.ts +5 -0
- package/dist/editor/agent/Markdown.d.ts.map +1 -0
- package/dist/editor/agent/Markdown.js +28 -0
- package/dist/editor/agent/Markdown.js.map +1 -0
- package/dist/editor/agent/agentApi.d.ts +106 -0
- package/dist/editor/agent/agentApi.d.ts.map +1 -0
- package/dist/editor/agent/agentApi.js +66 -0
- package/dist/editor/agent/agentApi.js.map +1 -0
- package/dist/editor/agent/toolLines.d.ts +38 -0
- package/dist/editor/agent/toolLines.d.ts.map +1 -0
- package/dist/editor/agent/toolLines.js +159 -0
- package/dist/editor/agent/toolLines.js.map +1 -0
- package/dist/editor/agent/useAgent.d.ts +15 -0
- package/dist/editor/agent/useAgent.d.ts.map +1 -0
- package/dist/editor/agent/useAgent.js +65 -0
- package/dist/editor/agent/useAgent.js.map +1 -0
- package/dist/editor/api.d.ts +378 -0
- package/dist/editor/api.d.ts.map +1 -0
- package/dist/editor/api.js +247 -0
- package/dist/editor/api.js.map +1 -0
- package/dist/editor/camera.d.ts +18 -0
- package/dist/editor/camera.d.ts.map +1 -0
- package/dist/editor/camera.js +40 -0
- package/dist/editor/camera.js.map +1 -0
- package/dist/editor/canvas.d.ts +25 -0
- package/dist/editor/canvas.d.ts.map +1 -0
- package/dist/editor/canvas.js +35 -0
- package/dist/editor/canvas.js.map +1 -0
- package/dist/editor/changes/ChangesPage.d.ts +25 -0
- package/dist/editor/changes/ChangesPage.d.ts.map +1 -0
- package/dist/editor/changes/ChangesPage.js +132 -0
- package/dist/editor/changes/ChangesPage.js.map +1 -0
- package/dist/editor/changes/changeModel.d.ts +25 -0
- package/dist/editor/changes/changeModel.d.ts.map +1 -0
- package/dist/editor/changes/changeModel.js +81 -0
- package/dist/editor/changes/changeModel.js.map +1 -0
- package/dist/editor/changes/changeState.d.mts +29 -0
- package/dist/editor/changes/changeState.mjs +187 -0
- package/dist/editor/chrome/EditorChrome.d.ts +49 -0
- package/dist/editor/chrome/EditorChrome.d.ts.map +1 -0
- package/dist/editor/chrome/EditorChrome.js +21 -0
- package/dist/editor/chrome/EditorChrome.js.map +1 -0
- package/dist/editor/drafts.d.ts +46 -0
- package/dist/editor/drafts.d.ts.map +1 -0
- package/dist/editor/drafts.js +38 -0
- package/dist/editor/drafts.js.map +1 -0
- package/dist/editor/i18n.d.ts +29 -0
- package/dist/editor/i18n.d.ts.map +1 -0
- package/dist/editor/i18n.js +2320 -0
- package/dist/editor/i18n.js.map +1 -0
- package/dist/editor/iconStroke.d.ts +6 -0
- package/dist/editor/iconStroke.d.ts.map +1 -0
- package/dist/editor/iconStroke.js +6 -0
- package/dist/editor/iconStroke.js.map +1 -0
- package/dist/editor/main.d.ts +2 -0
- package/dist/editor/main.d.ts.map +1 -0
- package/dist/editor/main.js +14 -0
- package/dist/editor/main.js.map +1 -0
- package/dist/editor/model.d.ts +16 -0
- package/dist/editor/model.d.ts.map +1 -0
- package/dist/editor/model.js +11 -0
- package/dist/editor/model.js.map +1 -0
- package/dist/editor/reasons.d.ts +44 -0
- package/dist/editor/reasons.d.ts.map +1 -0
- package/dist/editor/reasons.js +131 -0
- package/dist/editor/reasons.js.map +1 -0
- package/dist/editor/reviewLifecycle.d.ts +8 -0
- package/dist/editor/reviewLifecycle.d.ts.map +1 -0
- package/dist/editor/reviewLifecycle.js +21 -0
- package/dist/editor/reviewLifecycle.js.map +1 -0
- package/dist/editor/styles.css +8737 -0
- package/dist/editor/tokenMatch.d.ts +59 -0
- package/dist/editor/tokenMatch.d.ts.map +1 -0
- package/dist/editor/tokenMatch.js +198 -0
- package/dist/editor/tokenMatch.js.map +1 -0
- package/dist/editor/tokens/ConsolidatePage.d.ts +16 -0
- package/dist/editor/tokens/ConsolidatePage.d.ts.map +1 -0
- package/dist/editor/tokens/ConsolidatePage.js +244 -0
- package/dist/editor/tokens/ConsolidatePage.js.map +1 -0
- package/dist/editor/tokens/TokenActivity.d.ts +18 -0
- package/dist/editor/tokens/TokenActivity.d.ts.map +1 -0
- package/dist/editor/tokens/TokenActivity.js +18 -0
- package/dist/editor/tokens/TokenActivity.js.map +1 -0
- package/dist/editor/tokens/TokenDialogs.d.ts +26 -0
- package/dist/editor/tokens/TokenDialogs.d.ts.map +1 -0
- package/dist/editor/tokens/TokenDialogs.js +119 -0
- package/dist/editor/tokens/TokenDialogs.js.map +1 -0
- package/dist/editor/tokens/TokenList.d.ts +21 -0
- package/dist/editor/tokens/TokenList.d.ts.map +1 -0
- package/dist/editor/tokens/TokenList.js +98 -0
- package/dist/editor/tokens/TokenList.js.map +1 -0
- package/dist/editor/tokens/TokenPage.d.ts +25 -0
- package/dist/editor/tokens/TokenPage.d.ts.map +1 -0
- package/dist/editor/tokens/TokenPage.js +108 -0
- package/dist/editor/tokens/TokenPage.js.map +1 -0
- package/dist/editor/tokens/tokenModel.d.ts +35 -0
- package/dist/editor/tokens/tokenModel.d.ts.map +1 -0
- package/dist/editor/tokens/tokenModel.js +72 -0
- package/dist/editor/tokens/tokenModel.js.map +1 -0
- package/dist/editor/ui/Button.d.ts +3 -0
- package/dist/editor/ui/Button.d.ts.map +1 -0
- package/dist/editor/ui/Button.js +6 -0
- package/dist/editor/ui/Button.js.map +1 -0
- package/dist/editor/ui/CommentBox.d.ts +23 -0
- package/dist/editor/ui/CommentBox.d.ts.map +1 -0
- package/dist/editor/ui/CommentBox.js +41 -0
- package/dist/editor/ui/CommentBox.js.map +1 -0
- package/dist/editor/ui/Icon.d.ts +8 -0
- package/dist/editor/ui/Icon.d.ts.map +1 -0
- package/dist/editor/ui/Icon.js +6 -0
- package/dist/editor/ui/Icon.js.map +1 -0
- package/dist/editor/ui/IconButton.d.ts +11 -0
- package/dist/editor/ui/IconButton.d.ts.map +1 -0
- package/dist/editor/ui/IconButton.js +6 -0
- package/dist/editor/ui/IconButton.js.map +1 -0
- package/dist/editor/ui/NumberInput.d.ts +14 -0
- package/dist/editor/ui/NumberInput.d.ts.map +1 -0
- package/dist/editor/ui/NumberInput.js +6 -0
- package/dist/editor/ui/NumberInput.js.map +1 -0
- package/dist/editor/ui/PageLine.d.ts +14 -0
- package/dist/editor/ui/PageLine.d.ts.map +1 -0
- package/dist/editor/ui/PageLine.js +7 -0
- package/dist/editor/ui/PageLine.js.map +1 -0
- package/dist/editor/ui/SearchPicker.d.ts +41 -0
- package/dist/editor/ui/SearchPicker.d.ts.map +1 -0
- package/dist/editor/ui/SearchPicker.js +82 -0
- package/dist/editor/ui/SearchPicker.js.map +1 -0
- package/dist/editor/ui/Select.d.ts +19 -0
- package/dist/editor/ui/Select.d.ts.map +1 -0
- package/dist/editor/ui/Select.js +12 -0
- package/dist/editor/ui/Select.js.map +1 -0
- package/dist/editor/ui/TokenField.d.ts +14 -0
- package/dist/editor/ui/TokenField.d.ts.map +1 -0
- package/dist/editor/ui/TokenField.js +41 -0
- package/dist/editor/ui/TokenField.js.map +1 -0
- package/dist/editor/ui/TokenPicker.d.ts +31 -0
- package/dist/editor/ui/TokenPicker.d.ts.map +1 -0
- package/dist/editor/ui/TokenPicker.js +26 -0
- package/dist/editor/ui/TokenPicker.js.map +1 -0
- package/dist/editor/useBuildError.d.ts +7 -0
- package/dist/editor/useBuildError.d.ts.map +1 -0
- package/dist/editor/useBuildError.js +30 -0
- package/dist/editor/useBuildError.js.map +1 -0
- package/dist/editor/useLatestRequest.d.ts +22 -0
- package/dist/editor/useLatestRequest.d.ts.map +1 -0
- package/dist/editor/useLatestRequest.js +49 -0
- package/dist/editor/useLatestRequest.js.map +1 -0
- package/dist/editor-bundle/editor.css +2 -0
- package/dist/editor-bundle/editor.js +83 -0
- package/dist/editor-ui.d.ts +15 -0
- package/dist/editor-ui.d.ts.map +1 -0
- package/dist/editor-ui.js +14 -0
- package/dist/editor-ui.js.map +1 -0
- package/dist/inspector/runtime.d.ts +18 -0
- package/dist/inspector/runtime.d.ts.map +1 -0
- package/dist/inspector/runtime.js +1280 -0
- package/dist/inspector/runtime.js.map +1 -0
- package/dist/preview/main.d.ts +3 -0
- package/dist/preview/main.d.ts.map +1 -0
- package/dist/preview/main.js +320 -0
- package/dist/preview/main.js.map +1 -0
- package/dist/preview/preview.css +40 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/shared/buildError.d.mts +27 -0
- package/dist/shared/buildError.mjs +141 -0
- package/dist/shared/cameraFit.d.mts +16 -0
- package/dist/shared/cameraFit.mjs +47 -0
- package/dist/shared/canvasLayout.d.mts +13 -0
- package/dist/shared/canvasLayout.mjs +171 -0
- package/dist/shared/commentShots.d.mts +12 -0
- package/dist/shared/commentShots.mjs +53 -0
- package/dist/shared/componentExtract.d.mts +43 -0
- package/dist/shared/componentExtract.mjs +136 -0
- package/dist/shared/componentMeta.d.mts +26 -0
- package/dist/shared/componentMeta.mjs +87 -0
- package/dist/shared/componentOps.d.mts +70 -0
- package/dist/shared/componentOps.mjs +407 -0
- package/dist/shared/componentTarget.d.mts +15 -0
- package/dist/shared/componentTarget.mjs +58 -0
- package/dist/shared/components.d.mts +30 -0
- package/dist/shared/components.mjs +106 -0
- package/dist/shared/consolidateCategories.d.mts +2 -0
- package/dist/shared/consolidateCategories.mjs +6 -0
- package/dist/shared/env.d.mts +4 -0
- package/dist/shared/env.mjs +18 -0
- package/dist/shared/gitChanges.d.mts +2 -0
- package/dist/shared/gitChanges.mjs +30 -0
- package/dist/shared/legacyPaths.d.mts +1 -0
- package/dist/shared/legacyPaths.mjs +9 -0
- package/dist/shared/oklab.d.mts +6 -0
- package/dist/shared/oklab.mjs +56 -0
- package/dist/shared/optimizeEntries.d.mts +5 -0
- package/dist/shared/optimizeEntries.mjs +24 -0
- package/dist/shared/packages.d.mts +11 -0
- package/dist/shared/packages.mjs +96 -0
- package/dist/shared/projectFiles.d.mts +23 -0
- package/dist/shared/projectFiles.mjs +72 -0
- package/dist/shared/prompt.d.mts +25 -0
- package/dist/shared/prompt.mjs +217 -0
- package/dist/shared/proposals.d.mts +11 -0
- package/dist/shared/proposals.mjs +42 -0
- package/dist/shared/protocol.d.ts +122 -0
- package/dist/shared/protocol.d.ts.map +1 -0
- package/dist/shared/protocol.js +7 -0
- package/dist/shared/protocol.js.map +1 -0
- package/dist/shared/reviewArchive.d.mts +4 -0
- package/dist/shared/reviewArchive.mjs +19 -0
- package/dist/shared/reviewStore.d.mts +30 -0
- package/dist/shared/reviewStore.mjs +218 -0
- package/dist/shared/reviewVerify.d.mts +21 -0
- package/dist/shared/reviewVerify.mjs +158 -0
- package/dist/shared/sizeModes.d.mts +15 -0
- package/dist/shared/sizeModes.mjs +53 -0
- package/dist/shared/sketches.d.mts +10 -0
- package/dist/shared/sketches.mjs +64 -0
- package/dist/shared/snapshotCheck.d.mts +13 -0
- package/dist/shared/snapshotCheck.mjs +81 -0
- package/dist/shared/timeout.d.mts +1 -0
- package/dist/shared/timeout.mjs +15 -0
- package/dist/shared/tokens.d.ts +2 -0
- package/dist/shared/tokens.d.ts.map +1 -0
- package/dist/shared/tokens.js +2 -0
- package/dist/shared/tokens.js.map +1 -0
- package/dist/shared/types.d.ts +689 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +13 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/shared/wheelRouting.d.mts +9 -0
- package/dist/shared/wheelRouting.mjs +31 -0
- package/dist/shared/writeScope.mjs +96 -0
- package/dist/snapshots/diff.d.mts +28 -0
- package/dist/snapshots/diff.mjs +263 -0
- package/dist/snapshots/index.d.mts +110 -0
- package/dist/snapshots/index.mjs +638 -0
- package/dist/snapshots/render.d.mts +24 -0
- package/dist/snapshots/render.mjs +250 -0
- package/dist/snapshots/toolOps.d.mts +25 -0
- package/dist/snapshots/toolOps.mjs +69 -0
- package/dist/tokens/adapters/css.mjs +51 -0
- package/dist/tokens/adapters/cssInCode.mjs +314 -0
- package/dist/tokens/adapters/oxcShared.mjs +80 -0
- package/dist/tokens/adapters/preprocessor.mjs +63 -0
- package/dist/tokens/adapters/registry.mjs +53 -0
- package/dist/tokens/adapters/tailwindcss.mjs +424 -0
- package/dist/tokens/adapters/types.mjs +117 -0
- package/dist/tokens/consolidate/index.d.mts +42 -0
- package/dist/tokens/consolidate/index.mjs +111 -0
- package/dist/tokens/consolidate/normalize.mjs +479 -0
- package/dist/tokens/consolidate/plan.mjs +726 -0
- package/dist/tokens/consolidate/scan.mjs +928 -0
- package/dist/tokens/extract.mjs +441 -0
- package/dist/tokens/moduleData.d.mts +14 -0
- package/dist/tokens/moduleData.mjs +32 -0
- package/dist/tokens/opLock.d.mts +4 -0
- package/dist/tokens/opLock.mjs +108 -0
- package/dist/tokens/ops.d.mts +71 -0
- package/dist/tokens/ops.mjs +1511 -0
- package/dist/tokens/pipeline.mjs +813 -0
- package/dist/tokens/report.d.mts +47 -0
- package/dist/tokens/report.mjs +257 -0
- package/dist/tokens/rewrite/code.mjs +172 -0
- package/dist/tokens/rewrite/css.mjs +154 -0
- package/dist/tokens/rewrite/index.mjs +244 -0
- package/dist/tokens/rewrite/tailwind.mjs +288 -0
- package/dist/tokens/rewrite/text.mjs +116 -0
- package/dist/tokens/rewrite/value.mjs +115 -0
- package/dist/tokens/usage.d.mts +97 -0
- package/dist/tokens/usage.mjs +680 -0
- package/dist/vite/agent.d.ts +21 -0
- package/dist/vite/agent.d.ts.map +1 -0
- package/dist/vite/agent.js +165 -0
- package/dist/vite/agent.js.map +1 -0
- package/dist/vite/events.d.ts +27 -0
- package/dist/vite/events.d.ts.map +1 -0
- package/dist/vite/events.js +156 -0
- package/dist/vite/events.js.map +1 -0
- package/dist/vite/layout.d.ts +2 -0
- package/dist/vite/layout.d.ts.map +1 -0
- package/dist/vite/layout.js +4 -0
- package/dist/vite/layout.js.map +1 -0
- package/dist/vite/plugin.d.ts +40 -0
- package/dist/vite/plugin.d.ts.map +1 -0
- package/dist/vite/plugin.js +1264 -0
- package/dist/vite/plugin.js.map +1 -0
- package/dist/vite/requestGuard.d.mts +3 -0
- package/dist/vite/requestGuard.mjs +43 -0
- package/dist/vite/review.d.ts +11 -0
- package/dist/vite/review.d.ts.map +1 -0
- package/dist/vite/review.js +283 -0
- package/dist/vite/review.js.map +1 -0
- package/package.json +106 -1
- package/skills/seji/SKILL.md +400 -0
- package/skills/seji-authoring/SKILL.md +397 -0
- package/skills/seji-tokens/SKILL.md +432 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Height as a designer reads it (the Inspector's height row, mirroring the width row): a
|
|
2
|
+
// fixed length, filling the parent, or hugging the content. Pure: the inspector runtime
|
|
3
|
+
// reads the element's authored CSS and passes it in; the editor turns a mode into edits.
|
|
4
|
+
|
|
5
|
+
/** The parent's layout: `row` / `column` flex, or `block` (anything else). */
|
|
6
|
+
export function parentKindOf(display, flexDirection) {
|
|
7
|
+
if (!/flex/.test(String(display ?? ''))) return 'block'
|
|
8
|
+
return String(flexDirection ?? '').startsWith('column') ? 'column' : 'row'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const clean = (value) => String(value ?? '').trim().toLowerCase()
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The height mode from the authored (declared, not computed) values: `height`, `alignSelf`,
|
|
15
|
+
* `flexGrow`. No explicit height reads as hug.
|
|
16
|
+
*/
|
|
17
|
+
export function heightModeOf({ height, alignSelf, flexGrow, parentKind = 'block' } = {}) {
|
|
18
|
+
const authored = clean(height)
|
|
19
|
+
if (parentKind === 'column' && Number.parseFloat(clean(flexGrow)) > 0) return 'fill'
|
|
20
|
+
if (parentKind === 'row' && clean(alignSelf) === 'stretch' && (!authored || authored === 'auto')) return 'fill'
|
|
21
|
+
if (authored === '100%') return 'fill'
|
|
22
|
+
if (/^-?[\d.]+(px|rem|em)$/.test(authored)) return 'fixed'
|
|
23
|
+
return 'hug'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** The style edits that put an element in a height mode (`height` is the current px height). */
|
|
27
|
+
export function heightEdits(mode, parentKind = 'block', height = 0) {
|
|
28
|
+
if (mode === 'fill') {
|
|
29
|
+
if (parentKind === 'column') {
|
|
30
|
+
return [
|
|
31
|
+
{ property: 'flex-grow', value: '1' },
|
|
32
|
+
{ property: 'flex-basis', value: '0%' },
|
|
33
|
+
{ property: 'height', value: 'auto' },
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
if (parentKind === 'row') {
|
|
37
|
+
return [
|
|
38
|
+
{ property: 'align-self', value: 'stretch' },
|
|
39
|
+
{ property: 'height', value: 'auto' },
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
return [{ property: 'height', value: '100%' }]
|
|
43
|
+
}
|
|
44
|
+
// fixed / hug undo what fill set in this parent.
|
|
45
|
+
const undo =
|
|
46
|
+
parentKind === 'column'
|
|
47
|
+
? [{ property: 'flex-grow', value: '0' }]
|
|
48
|
+
: parentKind === 'row'
|
|
49
|
+
? [{ property: 'align-self', value: 'auto' }]
|
|
50
|
+
: []
|
|
51
|
+
if (mode === 'fixed') return [{ property: 'height', value: `${Math.round(Number(height) || 0)}px` }, ...undo]
|
|
52
|
+
return [{ property: 'height', value: 'auto' }, ...undo]
|
|
53
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReviewItem } from './types'
|
|
2
|
+
|
|
3
|
+
export type TargetKind = 'sketch' | 'product'
|
|
4
|
+
export declare function isDesignPath(file: string | null | undefined): boolean
|
|
5
|
+
export declare function sourceKind(source: string | null | undefined): TargetKind | null
|
|
6
|
+
export declare function itemTargetKind(item: ReviewItem | null | undefined): TargetKind | null
|
|
7
|
+
export declare const SKETCH_RESOLVE_REMINDER: string
|
|
8
|
+
export declare function resolveReminder(item: ReviewItem | null | undefined, changedFiles: string[] | null | undefined): string | null
|
|
9
|
+
export declare function exportsReactComponent(code: string): boolean
|
|
10
|
+
export declare const MISPLACED_SKETCH_HINT: string
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Product components vs sketch components (skills: "Product components vs sketch components").
|
|
2
|
+
//
|
|
3
|
+
// product source in src/ (or a shared UI package): what the product renders
|
|
4
|
+
// sketch source under design/: canvas-only; sketch components belong in design/<design>/sketches/
|
|
5
|
+
//
|
|
6
|
+
// The editor labels the selected element and new comments with this; `seji status|reply
|
|
7
|
+
// --resolve` and `seji check` only print reminders, nothing is blocked.
|
|
8
|
+
const toPosix = (file) => String(file ?? '').trim().replaceAll('\\', '/')
|
|
9
|
+
|
|
10
|
+
/** Root-relative path (or `file:line`) without leading `./` / `../` and line suffix. */
|
|
11
|
+
function cleanPath(file) {
|
|
12
|
+
return toPosix(file)
|
|
13
|
+
.replace(/:\d+(?::\d+)?$/, '')
|
|
14
|
+
.replace(/^(?:\.{1,2}\/)+/, '')
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** True when a root-relative source path is inside the design/ folder. */
|
|
18
|
+
export function isDesignPath(file) {
|
|
19
|
+
return cleanPath(file).startsWith('design/')
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** `sketch` when the source is under design/, `product` otherwise, null without a source. */
|
|
23
|
+
export function sourceKind(source) {
|
|
24
|
+
if (!source || !cleanPath(source)) return null
|
|
25
|
+
return isDesignPath(source) ? 'sketch' : 'product'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** What a review item pointed at when it was created; falls back to its node source. */
|
|
29
|
+
export function itemTargetKind(item) {
|
|
30
|
+
if (item?.targetKind === 'sketch' || item?.targetKind === 'product') return item.targetKind
|
|
31
|
+
return item?.target?.type === 'node' ? sourceKind(item.target.node?.source) : null
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const SKETCH_RESOLVE_REMINDER =
|
|
35
|
+
"Reminder: this comment targets a product component, but the change is only in the design canvas (design/); the product won't change."
|
|
36
|
+
|
|
37
|
+
// Ledger / canvas / cache files the editor and CLI write themselves are not "the change".
|
|
38
|
+
const LEDGER_RE = /^design\/(?:\.seji\/|(?:[^/]+\/)?(?:review|canvas)\.json$)/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The reminder line for resolving `item`, or null. `changedFiles` are root-relative paths of this
|
|
42
|
+
* change (see `workingTreeChanges`). Only product-targeted comments with every change under design/.
|
|
43
|
+
*/
|
|
44
|
+
export function resolveReminder(item, changedFiles) {
|
|
45
|
+
if (item?.kind !== 'comment' || itemTargetKind(item) !== 'product') return null
|
|
46
|
+
const files = (changedFiles ?? []).map(cleanPath).filter((file) => file && !LEDGER_RE.test(file))
|
|
47
|
+
if (!files.length) return null
|
|
48
|
+
return files.every((file) => file.startsWith('design/')) ? SKETCH_RESOLVE_REMINDER : null
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Exports something that looks like a React component (capitalized function / const / class). */
|
|
52
|
+
export function exportsReactComponent(code) {
|
|
53
|
+
const text = String(code ?? '')
|
|
54
|
+
if (/export\s+default\s+(?:async\s+)?function\b/.test(text)) return /<[A-Za-z>]/.test(text)
|
|
55
|
+
if (/export\s+(?:async\s+)?function\s+[A-Z]\w*/.test(text)) return true
|
|
56
|
+
if (/export\s+(?:const|let|var)\s+[A-Z]\w*\s*(?::[^=\n]+)?=\s*(?:\(|async\b|function\b|React\.|memo\(|forwardRef\()/.test(text)) return true
|
|
57
|
+
if (/export\s+class\s+[A-Z]\w*\s+extends\s+(?:React\.)?(?:Pure)?Component\b/.test(text)) return true
|
|
58
|
+
const named = [...text.matchAll(/export\s*\{([^}]*)\}/g)].flatMap((match) =>
|
|
59
|
+
match[1].split(',').map((part) => part.trim().split(/\s+as\s+/).pop()?.trim() ?? ''),
|
|
60
|
+
)
|
|
61
|
+
return named.some((name) => /^[A-Z]/.test(name)) && /<[A-Za-z>]/.test(text)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const MISPLACED_SKETCH_HINT = 'Sketch components belong in sketches/, or move them into src'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReviewCheck, ReviewItem, SnapshotFrame } from './types'
|
|
2
|
+
|
|
3
|
+
export declare const CAPTURE_STALE_MS: number
|
|
4
|
+
export declare function isCapturingBaseline(item: ReviewItem, now?: number): boolean
|
|
5
|
+
export declare function summarizeFrames(frames: SnapshotFrame[]): {
|
|
6
|
+
frames: number
|
|
7
|
+
changed: number
|
|
8
|
+
accepted: number
|
|
9
|
+
rejected: number
|
|
10
|
+
errors: number
|
|
11
|
+
}
|
|
12
|
+
export declare function snapshotCheck(item: ReviewItem, now?: number): ReviewCheck
|
|
13
|
+
export declare function snapshotArchiveHold(item: ReviewItem, now?: number): string | null
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Snapshot check and archive gate. Shared by the headless tools (verify / snapshot) and the
|
|
2
|
+
// editor (archiving), so both agree on when an item's screens have been looked at.
|
|
3
|
+
|
|
4
|
+
/** A baseline capture marker older than this is treated as interrupted. */
|
|
5
|
+
export const CAPTURE_STALE_MS = 10 * 60 * 1000
|
|
6
|
+
|
|
7
|
+
/** True while a baseline capture for the item is running (fresh `capturingSince`, no baseline yet). */
|
|
8
|
+
export function isCapturingBaseline(item, now = Date.now()) {
|
|
9
|
+
const since = Date.parse(item?.snapshots?.capturingSince ?? '')
|
|
10
|
+
return Boolean(!item?.snapshots?.baselineAt && Number.isFinite(since) && now - since < CAPTURE_STALE_MS)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function summarizeFrames(frames) {
|
|
14
|
+
const changed = frames.filter((frame) => frame.status === 'changed')
|
|
15
|
+
return {
|
|
16
|
+
frames: frames.length,
|
|
17
|
+
changed: changed.length,
|
|
18
|
+
accepted: changed.filter((frame) => frame.decision === 'accepted').length,
|
|
19
|
+
rejected: changed.filter((frame) => frame.decision === 'rejected').length,
|
|
20
|
+
errors: frames.filter((frame) => frame.status === 'error' || frame.status === 'missing').length,
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The snapshot check of one item:
|
|
26
|
+
* - `skip` no baseline was requested (nothing to compare);
|
|
27
|
+
* - `pending` a baseline capture is running or was interrupted, or "after" has not been
|
|
28
|
+
* compared since the item was last resolved;
|
|
29
|
+
* - `fail` nothing could be rendered, a target screen is missing, a frame failed to render
|
|
30
|
+
* or a changed screen was rejected;
|
|
31
|
+
* - `review` changed screens wait for an accept / reject decision;
|
|
32
|
+
* - `pass` every rendered screen is unchanged or accepted.
|
|
33
|
+
*/
|
|
34
|
+
export function snapshotCheck(item, now = Date.now()) {
|
|
35
|
+
const snapshots = item?.snapshots
|
|
36
|
+
if (!snapshots || (!snapshots.baselineAt && !snapshots.capturingSince)) {
|
|
37
|
+
return { status: 'skip', code: 'no-baseline', detail: 'no baseline; run `seji snapshot capture` before the change' }
|
|
38
|
+
}
|
|
39
|
+
if (!snapshots.baselineAt) {
|
|
40
|
+
return isCapturingBaseline(item, now)
|
|
41
|
+
? { status: 'pending', code: 'capturing', detail: 'baseline capture in progress; run `seji snapshot wait` before editing source' }
|
|
42
|
+
: { status: 'pending', code: 'interrupted', detail: 'baseline capture was interrupted; run `seji snapshot capture` again' }
|
|
43
|
+
}
|
|
44
|
+
const frames = snapshots.frames ?? []
|
|
45
|
+
const missing = snapshots.missing ?? []
|
|
46
|
+
if (!frames.length) {
|
|
47
|
+
const why = missing.map((entry) => entry.error).filter(Boolean).join('; ')
|
|
48
|
+
return { status: 'fail', code: 'no-screens', detail: `no screens rendered${why ? `: ${why}` : ''}`, ...summarizeFrames(frames) }
|
|
49
|
+
}
|
|
50
|
+
const stale = !snapshots.comparedAt || (item.resolvedAt && snapshots.comparedAt < item.resolvedAt)
|
|
51
|
+
if (stale) {
|
|
52
|
+
return { status: 'pending', code: 'not-compared', detail: 'baseline captured; run `seji verify --snapshots` to compare' }
|
|
53
|
+
}
|
|
54
|
+
const counts = summarizeFrames(frames)
|
|
55
|
+
const pendingReview = counts.changed - counts.accepted - counts.rejected
|
|
56
|
+
const parts = [`${counts.frames} frame(s), ${counts.changed} changed`]
|
|
57
|
+
if (counts.accepted) parts.push(`${counts.accepted} accepted`)
|
|
58
|
+
if (counts.rejected) parts.push(`${counts.rejected} rejected`)
|
|
59
|
+
if (counts.errors) parts.push(`${counts.errors} failed to render or missing`)
|
|
60
|
+
if (missing.length) parts.push(`${missing.length} target(s) not found`)
|
|
61
|
+
if (snapshots.truncated) parts.push(`${snapshots.truncated} more screen(s) not captured (limit)`)
|
|
62
|
+
const status = counts.rejected || counts.errors || missing.length ? 'fail' : pendingReview ? 'review' : 'pass'
|
|
63
|
+
// `code: 'counts'`: the detail is the counts below (plus `missing` targets and `truncated` screens).
|
|
64
|
+
return {
|
|
65
|
+
status,
|
|
66
|
+
code: 'counts',
|
|
67
|
+
detail: parts.join(', '),
|
|
68
|
+
...counts,
|
|
69
|
+
missing: missing.length,
|
|
70
|
+
truncated: Number(snapshots.truncated ?? 0),
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Why an item must not be archived yet because of its snapshots, or null. Items without a
|
|
76
|
+
* baseline are not held; items with one archive only once the snapshot check passes.
|
|
77
|
+
*/
|
|
78
|
+
export function snapshotArchiveHold(item, now = Date.now()) {
|
|
79
|
+
const check = snapshotCheck(item, now)
|
|
80
|
+
return check.status === 'pass' || check.status === 'skip' ? null : `snapshots ${check.status}: ${check.detail}`
|
|
81
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function withTimeout<T>(promise: Promise<T>, ms: number, options?: { unref?: boolean }): Promise<T | undefined>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settle with `promise`, or with undefined after `ms`, whichever comes first. The timer is
|
|
3
|
+
* cleared as soon as the promise settles, so it never outlives the work it bounds.
|
|
4
|
+
* `unref: true` lets the process exit while the timer is pending (background cleanup);
|
|
5
|
+
* `unref: false` keeps the event loop alive until the bound, e.g. when the bounded promise
|
|
6
|
+
* holds no handle of its own and an emptied loop would end the process mid-await.
|
|
7
|
+
*/
|
|
8
|
+
export function withTimeout(promise, ms, { unref = true } = {}) {
|
|
9
|
+
let timer
|
|
10
|
+
const bound = new Promise((resolve) => {
|
|
11
|
+
timer = setTimeout(resolve, ms)
|
|
12
|
+
if (unref) timer.unref?.()
|
|
13
|
+
})
|
|
14
|
+
return Promise.race([promise, bound]).finally(() => clearTimeout(timer))
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/shared/tokens.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,0BAA0B,GAC3B,MAAM,+BAA+B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/shared/tokens.ts"],"names":[],"mappings":"","sourcesContent":["export type {\n TokenCluster,\n TokenDef,\n TokenGroup,\n TokenHealth,\n TokenHealthAction,\n TokenTier,\n TokenType,\n UnsupportedStyleDiagnostic,\n} from '@rien7/design-surface-runtime'\n"]}
|