tw-framework 0.2.5__tar.gz → 0.2.7__tar.gz
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.
- {tw_framework-0.2.5 → tw_framework-0.2.7}/PKG-INFO +1 -1
- {tw_framework-0.2.5 → tw_framework-0.2.7}/pyproject.toml +1 -1
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/cli.py +1 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/compiler.py +34 -1
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework.egg-info/PKG-INFO +1 -1
- {tw_framework-0.2.5 → tw_framework-0.2.7}/README.md +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/setup.cfg +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tests/test_deployment.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/__init__.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/adapters/__init__.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/adapters/cloudflare.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/adapters/netlify.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/adapters/vercel.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/adapters/vercel_functions.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/advanced_diagnostics.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/asset_optimizer.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/ast_nodes.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/build.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/build_performance.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/build_report.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/code_splitting.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/common.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/compiler_stats.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/dead_code.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/dependency_graph.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/deploy.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/dev.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/diagnostics.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/dynamic_imports.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/error_formatter.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/framework.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/hydration.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/incremental_cache.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/interpreter.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/ir.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/lexer.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/lowering.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/parser.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/partial_rebuild.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/performance_analyzer.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/plugin_runtime.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/production_optimizer.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/reactivity.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/render_css.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/render_html.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/route_optimizer.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/router.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/runtime_model.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/runtime_values.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/semantic.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/server.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/signature.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/static_dynamic_auto.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/streaming.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/test_build_cli_pytest.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/tree_shaking.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework/twm_parser.py +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework.egg-info/SOURCES.txt +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework.egg-info/dependency_links.txt +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework.egg-info/entry_points.txt +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework.egg-info/requires.txt +0 -0
- {tw_framework-0.2.5 → tw_framework-0.2.7}/tw_framework.egg-info/top_level.txt +0 -0
|
@@ -1136,7 +1136,32 @@ def tokenize(code, allow_inline_scripts=False):
|
|
|
1136
1136
|
start_line, start_col = line, col
|
|
1137
1137
|
word = []
|
|
1138
1138
|
# Read until whitespace, braces, quotes, or common operators.
|
|
1139
|
-
|
|
1139
|
+
# Exceptions kept as part of the word:
|
|
1140
|
+
# - `-` between two alnum chars: kebab-case identifiers like
|
|
1141
|
+
# `aria-label`, `data-foo`.
|
|
1142
|
+
# - `:` right after `on` or `bind`: reactive directives like
|
|
1143
|
+
# `on:click`, `bind:value` (see reactivity.py).
|
|
1144
|
+
while i < n:
|
|
1145
|
+
ch = code[i]
|
|
1146
|
+
if ch in ' \t\r\n{}"\'' or ch in ONE_CHAR_OPS:
|
|
1147
|
+
if (
|
|
1148
|
+
ch == "-"
|
|
1149
|
+
and word
|
|
1150
|
+
and word[-1].isalnum()
|
|
1151
|
+
and i + 1 < n
|
|
1152
|
+
and code[i + 1].isalnum()
|
|
1153
|
+
):
|
|
1154
|
+
word.append(advance_one())
|
|
1155
|
+
continue
|
|
1156
|
+
if (
|
|
1157
|
+
ch == ":"
|
|
1158
|
+
and "".join(word) in ("on", "bind")
|
|
1159
|
+
and i + 1 < n
|
|
1160
|
+
and (code[i + 1].isalnum() or code[i + 1] == "_")
|
|
1161
|
+
):
|
|
1162
|
+
word.append(advance_one())
|
|
1163
|
+
continue
|
|
1164
|
+
break
|
|
1140
1165
|
word.append(advance_one())
|
|
1141
1166
|
word = "".join(word)
|
|
1142
1167
|
if not word:
|
|
@@ -1167,6 +1192,14 @@ def classify_known_prop(name):
|
|
|
1167
1192
|
nl = name.lower()
|
|
1168
1193
|
if nl in ROUTER_KEYS:
|
|
1169
1194
|
return "router"
|
|
1195
|
+
if (
|
|
1196
|
+
nl.startswith("bind:")
|
|
1197
|
+
or nl.startswith("on:")
|
|
1198
|
+
or nl.startswith("show:")
|
|
1199
|
+
or nl.startswith("tw-")
|
|
1200
|
+
or nl.startswith("tw:")
|
|
1201
|
+
):
|
|
1202
|
+
return "attr"
|
|
1170
1203
|
if nl in EVENTS or (nl.startswith("on") and nl[2:] in EVENTS):
|
|
1171
1204
|
return "event"
|
|
1172
1205
|
if nl in HTML_ATTRIBUTES or nl.startswith("data-") or nl.startswith("aria-"):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|