Add `Look ma’` to readme

This commit is contained in:
Ben Croker 2025-01-08 12:22:00 -06:00
parent e1d30aebdb
commit 0ed8abf34d
No known key found for this signature in database
GPG Key ID: 09D799816F1CF332
4 changed files with 104 additions and 3 deletions

View File

@ -52,7 +52,7 @@ You can manually add your own plugins to the core:
import { Datastar } from 'datastar'
Datastar.load(
// I can make my own plugins!
// Look ma, I made a plugin!
)
</script>
```

View File

@ -56,7 +56,7 @@ You can manually add your own plugins to the core:
import { Datastar } from 'datastar'
Datastar.load(
// I can make my own plugins!
// Look ma, I made a plugin!
)
</script>
```

View File

@ -52,7 +52,7 @@ You can manually add your own plugins to the core:
import { Datastar } from 'datastar'
Datastar.load(
// I can make my own plugins!
// Look ma, I made a plugin!
)
</script>
```

View File

@ -0,0 +1,101 @@
# This is auto-generated by Datastar. DO NOT EDIT.
from enum import StrEnum
#region The mode in which a fragment is merged into the DOM.
class FragmentMergeMode(StrEnum):
# Morphs the fragment into the existing element using idiomorph.
FragmentMergeModeMorph = "morph"
# Replaces the inner HTML of the existing element.
FragmentMergeModeInner = "inner"
# Replaces the outer HTML of the existing element.
FragmentMergeModeOuter = "outer"
# Prepends the fragment to the existing element.
FragmentMergeModePrepend = "prepend"
# Appends the fragment to the existing element.
FragmentMergeModeAppend = "append"
# Inserts the fragment before the existing element.
FragmentMergeModeBefore = "before"
# Inserts the fragment after the existing element.
FragmentMergeModeAfter = "after"
# Upserts the attributes of the existing element.
FragmentMergeModeUpsertAttributes = "upsertAttributes"
#endregion FragmentMergeMode
#region The type protocol on top of SSE which allows for core pushed based communication between the server and the client.
class EventType(StrEnum):
# An event for merging HTML fragments into the DOM.
EventTypeMergeFragments = "datastar-merge-fragments"
# An event for merging signals.
EventTypeMergeSignals = "datastar-merge-signals"
# An event for removing HTML fragments from the DOM.
EventTypeRemoveFragments = "datastar-remove-fragments"
# An event for removing signals.
EventTypeRemoveSignals = "datastar-remove-signals"
# An event for executing <script/> elements in the browser.
EventTypeExecuteScript = "datastar-execute-script"
#endregion EventType
#endregion Enums
DATASTAR_KEY = "datastar"
VERSION = "1.0.0-beta.1"
VERSION_CLIENT_BYTE_SIZE = 35295
VERSION_CLIENT_BYTE_SIZE_GZIP = 12940
#region Default durations
# The default duration for settling during fragment merges. Allows for CSS transitions to complete.
DefaultFragmentsSettleDuration = 300
# The default duration for retrying SSE on connection reset. This is part of the underlying retry mechanism of SSE.
DefaultSseRetryDuration = 1000
#endregion Default durations
#region Default strings
# The default attributes for <script/> element use when executing scripts. It is a set of of key-value pairs delimited by a newline \\n character.
DefaultExecuteScriptAttributes = "type module"
#endregion Default strings
#region Dataline literals
SelectorDatalineLiteral = "selector"
MergeModeDatalineLiteral = "mergeMode"
SettleDurationDatalineLiteral = "settleDuration"
FragmentsDatalineLiteral = "fragments"
UseViewTransitionDatalineLiteral = "useViewTransition"
SignalsDatalineLiteral = "signals"
OnlyIfMissingDatalineLiteral = "onlyIfMissing"
PathsDatalineLiteral = "paths"
ScriptDatalineLiteral = "script"
AttributesDatalineLiteral = "attributes"
AutoRemoveDatalineLiteral = "autoRemove"
#endregion Dataline literals
#region Default booleans
# Should fragments be merged using the ViewTransition API?
DefaultFragmentsUseViewTransitions = False
# Should a given set of signals merge if they are missing?
DefaultMergeSignalsOnlyIfMissing = False
# Should script element remove itself after execution?
DefaultExecuteScriptAutoRemove = True
#endregion Default booleans
#region Enums