* Pass the `mode` through to snowpack
This allows the production packages to be prepared.
* Use snowpack 3.3.1
* Update path to prism loadComponents external ref
* Upgrade to snowpack 3.3.2
* chore(examples): add kitchen-sink
* feat: support children in rendered components
* feat: add support for rendering children in Svelte
* fix: cleanup p/react fragment children
* chore: add @ts-nocheck to svelte files
* chore: update lockfiles
* fix: types
* feat: memoize frontend/renderer/utils
* fix: disable eslint for compiled SvelteWrapper
* fix: add missing dep
Co-authored-by: Nate Moore <nate@skypack.dev>
* add dep domhandler imported in in src/build/static
* lint and jsDoc error
* move domhandler to devDep
* chore: add package lock
* escape string jsDoc
* chore: add astro dep in until prism import is refactored
* chore: add snowpack example package lock
Removing the dependency breaks the site as using Markdown creates an import to a builtin Astro component. So we need astro as a dep. Not sure why it was changed anyways.
* Add support for syntax highlighting of code blocks
* Escape usage of backtick strings
* Add workspace root for snowpack
* Use prismjs/components as an external module
* Fix complex MDX parsing
This allows fully MDX support using the micromark MDX extension. One caveat is that if you do something like use the less than sign, you need to escape it because the parser expects these to be tags otherwise.
* Move micromark definition
* Support for custom elements
Now you can use custom elements like so in Astro components:
```html
<script type="module" src="./datepicker.js">
<date-picker></date-picker>
```
These will be resolve relative to the current astro component. In the build these modules are run through the same bundle/minify process as components.
* Remove component from public
* Formatting
* Disable empty fn rule
* Implement fallback capability
This makes it possible for a dynamic component to render fallback content on the server.
The mechanism is a special `static` prop passed to the component. If `static` is true then the component knows it can render static content.
Putting aside the word `static`, is this the right approach? I think giving components the flexibility to make the decision themselves *is* the right approach.
However in this case we have a special property that is passed in non-explicitly. I think we have to do it this way because if the caller passes in a prop it will get serialized and appear on the client. By making this something we *add* during rendering, it only happens on the server (and only when using `:load`).
Assuming this is the right approach, is `static` the right name for this prop? Other candidates:
* `server`
That's all I have!
* Use `import.meta.env.astro` to tell if running in SSR mode.
* Run formatter
* Convert CSS Modules to scoped styles
* Update README
* Move class scoping into HTML walker
* Fix SSR styles test
* Fix mustache tags
* Update PostCSS plugin name
* Add JSDoc comment
* Update test