camox 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/camox.mjs +9 -1
- package/dist/core/components/lexical/InlineStylesPlugin.js +22 -6
- package/dist/core/components/lexical/SelectionBroadcaster.js +4 -4
- package/dist/core/components/lexical/SidebarLexicalEditor.js +15 -15
- package/dist/core/createApp.d.ts +28 -2
- package/dist/core/createBlock.js +24 -10
- package/dist/core/editing/createEditableBlock.d.ts +135 -1
- package/dist/core/editing/createEditableBlock.js +209 -74
- package/dist/core/lib/contentType.d.ts +5 -0
- package/dist/core/lib/contentType.js +11 -0
- package/dist/core/lib/fieldTypes.js +1 -0
- package/dist/core/lib/iconTypes.d.ts +13 -0
- package/dist/core/lib/icons.d.ts +6 -0
- package/dist/core/lib/icons.js +130 -0
- package/dist/core/lib/lexicalState.js +6 -6
- package/dist/core/lib/modifierFormats.js +1 -1
- package/dist/core/lib/textStyles.d.ts +1 -1
- package/dist/core/lib/textStyles.js +3 -3
- package/dist/features/content/components/AssetCard.js +104 -68
- package/dist/features/preview/CamoxPreview.js +120 -95
- package/dist/features/preview/commentsEnabled.js +2 -2
- package/dist/features/preview/components/AssetLightbox.js +17 -6
- package/dist/features/preview/components/AttachedComments.js +224 -87
- package/dist/features/preview/components/CommentTargetQuote.js +22 -21
- package/dist/features/preview/components/DerivedLayoutDialog.js +36 -21
- package/dist/features/preview/components/FieldOverlayStyles.js +29 -9
- package/dist/features/preview/components/FieldToolbar.js +8 -8
- package/dist/features/preview/components/IconFieldEditor.js +231 -0
- package/dist/features/preview/components/ItemFieldsEditor.js +21 -14
- package/dist/features/preview/components/OverlayTracker.js +1 -1
- package/dist/features/preview/components/PagePicker.js +44 -44
- package/dist/features/preview/components/PreviewPanel.js +1 -1
- package/dist/features/preview/components/PreviewToolbar.js +224 -225
- package/dist/features/preview/components/SendFeedbackDialog.js +83 -0
- package/dist/features/preview/overlayHighlights.js +54 -0
- package/dist/features/preview/previewCommentsStore.js +54 -34
- package/dist/features/preview/previewSelection.js +28 -23
- package/dist/features/preview/usePageComments.js +39 -0
- package/dist/features/provider/CoreCamoxProvider.js +37 -5
- package/dist/features/provider/LocalhostPreviewProvider.js +81 -45
- package/dist/features/provider/components/CommandPalette.js +35 -84
- package/dist/features/runtime/pageApp.js +32 -28
- package/dist/features/runtime/pageServer.js +4 -1
- package/dist/features/runtime/runtime.d.ts +2 -0
- package/dist/features/runtime/runtime.js +25 -0
- package/dist/features/studio/components/EnvironmentMenu.js +75 -63
- package/dist/features/vite/auth.js +1 -50
- package/dist/features/vite/iconGeneration.js +16 -0
- package/dist/features/vite/vite.d.ts +4 -2
- package/dist/features/vite/vite.js +19 -2
- package/dist/lib/auth.js +39 -16
- package/dist/lib/preview-handoff.js +13 -0
- package/dist/lib/queries.js +12 -1
- package/dist/lib/use-project-room.js +5 -2
- package/dist/studio-overlays.css +19 -15
- package/dist/studio.css +1 -1
- package/package.json +5 -4
- package/skills/camox/SKILL.md +6 -0
- package/skills/camox/references/block-definitions.md +27 -0
- package/skills/camox/references/cli-common.md +14 -0
- package/skills/camox/references/cli-content.md +11 -0
- package/skills/camox/references/field-styling.md +4 -4
- package/skills/camoxify/SKILL.md +14 -0
package/skills/camoxify/SKILL.md
CHANGED
|
@@ -21,6 +21,14 @@ Before coding, map the reference to:
|
|
|
21
21
|
|
|
22
22
|
Read [Block Definitions](../camox/references/block-definitions.md) and, when creating or changing a shell, [Layout Definitions](../camox/references/layout-definitions.md).
|
|
23
23
|
|
|
24
|
+
## Use the existing styling stack
|
|
25
|
+
|
|
26
|
+
Strongly prefer the project's existing shadcn components and Tailwind utilities for all styling. Inspect and reuse existing components, theme tokens, and styling conventions before building new ones. Compose or extend them to match the reference.
|
|
27
|
+
|
|
28
|
+
If the reference uses another styling system, recreate its appearance and behavior with the project's existing shadcn components and Tailwind utilities; do not copy or introduce the reference's styling dependencies.
|
|
29
|
+
|
|
30
|
+
Do not install other styling libraries or rely on raw CSS, custom stylesheets, or inline styles. Express layout, spacing, typography, colors, responsive behavior, and interactive states through Tailwind and the existing shadcn components.
|
|
31
|
+
|
|
24
32
|
## Keep definitions generic
|
|
25
33
|
|
|
26
34
|
Block names, schemas, rendering, and **default content** must work on other pages. Use `feature-grid`, not `acme-homepage-features`. Defaults are neutral examples, not the reference's copy, links, assets, or item data.
|
|
@@ -33,6 +41,12 @@ Use `Type.Repeater` for every repeated content structure: lists, rows, columns,
|
|
|
33
41
|
|
|
34
42
|
Choose bounds from real constraints, not the number of items visible in the reference. Many sibling fields are a code smell: look for repeated groups or separate sections. Model enough flexibility to add, remove, reorder, and rewrite content without code changes; don't expose every CSS value as a field.
|
|
35
43
|
|
|
44
|
+
## Use settings for constrained choices
|
|
45
|
+
|
|
46
|
+
Before adding a `content` field, ask whether the editor is writing free-form content or choosing from known options. For configuration choices such as alignment, theme, size, or variant, use `settings` with `Type.Enum`. For on/off choices such as showing a background or enabling autoplay, use `settings` with `Type.Boolean`.
|
|
47
|
+
|
|
48
|
+
Do not model these choices as `content` fields using `Type.String`, even if rendering code could interpret strings such as `"left"`, `"dark"`, or `"true"`. Editors should choose a valid option or toggle a setting, not type a magic string. Reserve `content`'s `Type.String` for genuinely free-form text, such as headings and descriptions. Enum defaults must match an option key.
|
|
49
|
+
|
|
36
50
|
## Keep formatted text in one field
|
|
37
51
|
|
|
38
52
|
Use inline formatting and `textStyle`, including highlights, instead of fields such as `headingStart`, `coloredWord`, and `headingEnd`. Editors should be able to move the emphasis by editing content alone. Read [Field styling](../camox/references/field-styling.md).
|