instaui 0.2.2__py2.py3-none-any.whl → 0.3.0__py2.py3-none-any.whl

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.
Files changed (45) hide show
  1. instaui/arco/components/select.py +2 -1
  2. instaui/components/component.py +3 -1
  3. instaui/components/element.py +1 -4
  4. instaui/components/match.py +20 -84
  5. instaui/components/slot.py +53 -19
  6. instaui/components/vfor.py +39 -44
  7. instaui/components/vif.py +10 -22
  8. instaui/event/js_event.py +10 -8
  9. instaui/event/vue_event.py +14 -16
  10. instaui/event/web_event.py +4 -7
  11. instaui/html_tools.py +8 -2
  12. instaui/js/fn.py +13 -10
  13. instaui/runtime/__init__.py +2 -2
  14. instaui/runtime/_app.py +43 -35
  15. instaui/runtime/scope.py +117 -33
  16. instaui/spa_router/_functions.py +4 -4
  17. instaui/spa_router/_route_model.py +6 -7
  18. instaui/spa_router/_router_output.py +5 -1
  19. instaui/spa_router/_router_param_var.py +4 -9
  20. instaui/static/insta-ui.css +1 -1
  21. instaui/static/insta-ui.esm-browser.prod.js +2245 -2329
  22. instaui/static/insta-ui.js.map +1 -1
  23. instaui/ui/__init__.py +3 -2
  24. instaui/ui/__init__.pyi +3 -2
  25. instaui/ui_functions/input_slient_data.py +4 -0
  26. instaui/vars/_types.py +14 -0
  27. instaui/vars/data.py +7 -4
  28. instaui/vars/element_ref.py +13 -10
  29. instaui/vars/event_context.py +7 -3
  30. instaui/vars/js_computed.py +4 -4
  31. instaui/vars/mixin_types/py_binding.py +33 -0
  32. instaui/vars/path_var.py +7 -0
  33. instaui/vars/ref.py +7 -2
  34. instaui/vars/slot_prop.py +22 -14
  35. instaui/vars/state.py +23 -12
  36. instaui/vars/vfor_item.py +170 -72
  37. instaui/vars/vue_computed.py +4 -4
  38. instaui/vars/web_computed.py +10 -6
  39. instaui/watch/js_watch.py +6 -6
  40. instaui/watch/vue_watch.py +25 -2
  41. instaui/watch/web_watch.py +6 -5
  42. {instaui-0.2.2.dist-info → instaui-0.3.0.dist-info}/METADATA +1 -1
  43. {instaui-0.2.2.dist-info → instaui-0.3.0.dist-info}/RECORD +45 -45
  44. {instaui-0.2.2.dist-info → instaui-0.3.0.dist-info}/WHEEL +0 -0
  45. {instaui-0.2.2.dist-info → instaui-0.3.0.dist-info}/licenses/LICENSE +0 -0
instaui/runtime/_app.py CHANGED
@@ -6,7 +6,6 @@ from instaui.common.jsonable import Jsonable
6
6
  from .resource import HtmlResource
7
7
  from instaui.consts import _T_App_Mode
8
8
  from contextvars import ContextVar, Token
9
- from contextlib import contextmanager
10
9
  from instaui.runtime.scope import Scope, GlobalScope
11
10
  from types import MappingProxyType
12
11
 
@@ -17,7 +16,6 @@ if TYPE_CHECKING:
17
16
  from instaui.dependencies.component_dependency import ComponentDependencyInfo
18
17
  from instaui.dependencies.plugin_dependency import PluginDependencyInfo
19
18
  from instaui.spa_router._route_model import RouteCollector
20
- from instaui.js.fn import JsFn
21
19
 
22
20
 
23
21
  class App(Jsonable):
@@ -27,9 +25,6 @@ class App(Jsonable):
27
25
  def __init__(self, *, mode: _T_App_Mode, meta: Optional[Dict] = None) -> None:
28
26
  super().__init__()
29
27
  self._scope_id_counter = 0
30
- self._vfor_id_counter = 0
31
- self._slot_id_counter = 0
32
- self._js_fn_id_counter = 0
33
28
  self._mode: _T_App_Mode = mode
34
29
  self.items: List[Component] = []
35
30
  self.meta = meta
@@ -38,6 +33,7 @@ class App(Jsonable):
38
33
  defalut_scope = self.create_scope()
39
34
  self._scope_stack: List[Scope] = [defalut_scope]
40
35
  self._scopes: List[Scope] = [defalut_scope]
36
+ self._sid = defalut_scope.id
41
37
  self._html_resource = HtmlResource()
42
38
  self._component_dependencies: Set[ComponentDependencyInfo] = set()
43
39
  self._temp_component_dependencies: Dict[str, ComponentDependencyInfo] = {}
@@ -47,12 +43,15 @@ class App(Jsonable):
47
43
  self._page_params: Dict[str, Any] = {}
48
44
  self._query_params: Dict[str, Any] = {}
49
45
  self._route_collector: Optional[RouteCollector] = None
50
- self._js_fns: List[JsFn] = []
51
46
 
52
47
  @property
53
48
  def mode(self) -> _T_App_Mode:
54
49
  return self._mode
55
50
 
51
+ @property
52
+ def top_scope(self) -> Scope:
53
+ return self._scope_stack[0]
54
+
56
55
  @property
57
56
  def page_path(self) -> str:
58
57
  assert self._page_path is not None, "Page path is not set"
@@ -71,21 +70,6 @@ class App(Jsonable):
71
70
  scope = Scope(str(self._scope_id_counter))
72
71
  return scope
73
72
 
74
- def generate_vfor_id(self) -> str:
75
- self._vfor_id_counter += 1
76
- return str(self._vfor_id_counter)
77
-
78
- def generate_slot_id(self) -> str:
79
- self._slot_id_counter += 1
80
- return str(self._slot_id_counter)
81
-
82
- def generate_js_fn_id(self) -> str:
83
- self._js_fn_id_counter += 1
84
- return str(self._js_fn_id_counter)
85
-
86
- def register_js_fn(self, fn: JsFn) -> None:
87
- self._js_fns.append(fn)
88
-
89
73
  def reset_html_resource(self):
90
74
  self._html_resource = HtmlResource()
91
75
 
@@ -130,8 +114,7 @@ class App(Jsonable):
130
114
 
131
115
  data["url"] = url_info
132
116
 
133
- data["scopeId"] = self._scopes[0].id
134
- data["scopes"] = self._scopes
117
+ # data["scopes"] = self._scopes
135
118
 
136
119
  if self._route_collector is not None:
137
120
  data["router"] = self._route_collector.model_dump(
@@ -141,8 +124,7 @@ class App(Jsonable):
141
124
  if self._web_server_info is not None:
142
125
  data["webInfo"] = self._web_server_info
143
126
 
144
- if self._js_fns:
145
- data["jsFn"] = self._js_fns
127
+ data["sid"] = self._sid
146
128
 
147
129
  return data
148
130
 
@@ -193,19 +175,45 @@ def get_current_scope():
193
175
  return current_scope
194
176
 
195
177
 
196
- @contextmanager
197
- def new_scope(*, append_to_app: bool = True):
198
- app = get_app_slot()
199
- scope = app.create_scope()
178
+ class ready_scope:
179
+ def __init__(self) -> None:
180
+ self._scope = None
181
+
182
+ @property
183
+ def used(self) -> bool:
184
+ return self._scope is not None
185
+
186
+ @property
187
+ def has_vars(self) -> bool:
188
+ return self._scope.has_var # type: ignore
189
+
190
+ @property
191
+ def scope(self) -> Scope:
192
+ return self._scope # type: ignore
193
+
194
+ @property
195
+ def scope_id(self) -> str:
196
+ return self._scope.id # type: ignore
197
+
198
+ def __enter__(self):
199
+ return self.enter()
200
+
201
+ def __exit__(self, *_) -> None:
202
+ self.exit(*_)
203
+
204
+ def enter(self):
205
+ if self._scope is not None:
206
+ raise ValueError("Scope is already used")
200
207
 
201
- if append_to_app:
202
- app._scopes.append(scope)
208
+ app = get_app_slot()
209
+ self._scope = app.create_scope()
210
+ app._scopes.append(self._scope)
211
+ app._scope_stack.append(self._scope)
203
212
 
204
- scope_stack = app._scope_stack
205
- scope_stack.append(scope)
213
+ return self._scope
206
214
 
207
- yield scope
208
- scope_stack.pop()
215
+ def exit(self, *_) -> None:
216
+ get_app_slot()._scope_stack.pop()
209
217
 
210
218
 
211
219
  def get_slot_stacks():
instaui/runtime/scope.py CHANGED
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import TYPE_CHECKING, Callable, List
3
+ from typing import TYPE_CHECKING, Callable, Dict, List, Optional
4
4
  import functools
5
5
  import weakref
6
6
  from instaui.common.jsonable import Jsonable
@@ -17,6 +17,9 @@ if TYPE_CHECKING:
17
17
  from instaui.watch.js_watch import JsWatch
18
18
  from instaui.watch.vue_watch import VueWatch
19
19
  from instaui.vars.element_ref import ElementRef
20
+ from instaui.vars.vfor_item import VForItem, VForIndex, VForItemKey
21
+ from instaui.components.slot import SlotPropInfo
22
+ from instaui.js.fn import JsFn
20
23
 
21
24
 
22
25
  class Scope(Jsonable):
@@ -26,33 +29,38 @@ class Scope(Jsonable):
26
29
  self._vars_id_counter = 0
27
30
  self._element_ref_id_counter = 0
28
31
  self._refs: List[VarMixin] = []
32
+ self._element_refs: List[ElementRef] = []
29
33
  self._const_data: List[ConstData] = []
30
34
  self._js_computeds: List[JsComputed] = []
31
35
  self._vue_computeds: List[VueComputed] = []
32
36
  self._web_computeds: List[WebComputed] = []
33
- self._element_refs: List[ElementRef] = []
34
37
  self._run_method_records: List = []
35
- self._web_watchs: List[WebWatch] = []
36
- self._js_watchs: List[JsWatch] = []
37
- self._vue_watchs: List[VueWatch] = []
38
+ self._web_watch_configs: List[Dict] = []
39
+ self._js_watch_configs: List[Dict] = []
40
+ self._vue_watch_configs: List[Dict] = []
41
+ self._vfor_item: Optional[VForItem] = None
42
+ self._vfor_item_key: Optional[VForItemKey] = None
43
+ self._vfor_index: Optional[VForIndex] = None
44
+ self._slot_prop_info: Optional[SlotPropInfo] = None
45
+ self._js_fns: List[JsFn] = []
38
46
  self._query = {}
47
+ self.__has_registered_task = False
48
+
49
+ def _mark_has_registered_task(self):
50
+ self.__has_registered_task = True
39
51
 
40
- def set_run_method_record(
41
- self, scope_id: str, element_ref_id: str, method_name: str, args
42
- ):
43
- self._run_method_records.append((scope_id, element_ref_id, method_name, args))
52
+ @property
53
+ def has_var(self):
54
+ return self._vars_id_counter > 0
55
+
56
+ @property
57
+ def has_registered_task(self):
58
+ return self.__has_registered_task
44
59
 
45
60
  def generate_vars_id(self) -> str:
46
61
  self._vars_id_counter += 1
47
62
  return str(self._vars_id_counter)
48
63
 
49
- def generate_element_ref_id(self) -> str:
50
- self._element_ref_id_counter += 1
51
- return str(self._element_ref_id_counter)
52
-
53
- def register_element_ref(self, ref: ElementRef):
54
- self._element_refs.append(ref)
55
-
56
64
  def set_query(self, url: str, key: str, on: List[CanInputMixin]) -> None:
57
65
  self._query = {
58
66
  "url": url,
@@ -61,13 +69,16 @@ class Scope(Jsonable):
61
69
  }
62
70
 
63
71
  def register_web_watch(self, watch: WebWatch) -> None:
64
- self._web_watchs.append(watch)
72
+ self._mark_has_registered_task()
73
+ self._web_watch_configs.append(watch._to_json_dict())
65
74
 
66
75
  def register_js_watch(self, watch: JsWatch) -> None:
67
- self._js_watchs.append(watch)
76
+ self._mark_has_registered_task()
77
+ self._js_watch_configs.append(watch._to_json_dict())
68
78
 
69
79
  def register_vue_watch(self, watch: VueWatch) -> None:
70
- self._vue_watchs.append(watch)
80
+ self._mark_has_registered_task()
81
+ self._vue_watch_configs.append(watch._to_json_dict())
71
82
 
72
83
  def register_data_task(self, data: ConstData):
73
84
  weak_obj = weakref.ref(data)
@@ -76,7 +87,7 @@ class Scope(Jsonable):
76
87
  self._const_data.append(weak_obj()) # type: ignore
77
88
  return self.generate_vars_id()
78
89
 
79
- return VarRegisterTask(self.id, register_fn)
90
+ return VarRegisterTaskForScope(self, register_fn)
80
91
 
81
92
  def register_ref_task(self, ref: VarMixin):
82
93
  weak_obj = weakref.ref(ref)
@@ -85,7 +96,52 @@ class Scope(Jsonable):
85
96
  self._refs.append(weak_obj()) # type: ignore
86
97
  return self.generate_vars_id()
87
98
 
88
- return VarRegisterTask(self.id, register_fn)
99
+ return VarRegisterTaskForScope(self, register_fn)
100
+
101
+ def register_element_ref_task(self, target: ElementRef):
102
+ weak_obj = weakref.ref(target)
103
+
104
+ def register_fn():
105
+ self._element_refs.append(weak_obj()) # type: ignore
106
+ return self.generate_vars_id()
107
+
108
+ return VarRegisterTaskForScope(self, register_fn)
109
+
110
+ def register_vfor_item_task(self, vfor_item: VForItem):
111
+ weak_obj = weakref.ref(vfor_item)
112
+
113
+ def register_fn():
114
+ self._vfor_item = weak_obj()
115
+ return self.generate_vars_id()
116
+
117
+ return VarRegisterTaskForScope(self, register_fn)
118
+
119
+ def register_slot_prop_info_task(self, slot_prop_info: SlotPropInfo):
120
+ weak_obj = weakref.ref(slot_prop_info)
121
+
122
+ def register_fn():
123
+ self._slot_prop_info = weak_obj()
124
+ return self.generate_vars_id()
125
+
126
+ return VarRegisterTaskForScope(self, register_fn)
127
+
128
+ def register_vfor_index_task(self, vfor_index: VForIndex):
129
+ weak_obj = weakref.ref(vfor_index)
130
+
131
+ def register_fn():
132
+ self._vfor_index = weak_obj()
133
+ return self.generate_vars_id()
134
+
135
+ return VarRegisterTaskForScope(self, register_fn)
136
+
137
+ def register_vfor_key_task(self, vfor_key: VForItemKey):
138
+ weak_obj = weakref.ref(vfor_key)
139
+
140
+ def register_fn():
141
+ self._vfor_item_key = weak_obj()
142
+ return self.generate_vars_id()
143
+
144
+ return VarRegisterTaskForScope(self, register_fn)
89
145
 
90
146
  def register_js_computed_task(self, computed: JsComputed):
91
147
  weak_obj = weakref.ref(computed)
@@ -94,7 +150,7 @@ class Scope(Jsonable):
94
150
  self._js_computeds.append(weak_obj()) # type: ignore
95
151
  return self.generate_vars_id()
96
152
 
97
- return VarRegisterTask(self.id, register_fn)
153
+ return VarRegisterTaskForScope(self, register_fn)
98
154
 
99
155
  def register_computed_task(self, computed: WebComputed):
100
156
  weak_obj = weakref.ref(computed)
@@ -103,7 +159,7 @@ class Scope(Jsonable):
103
159
  self._web_computeds.append(weak_obj()) # type: ignore
104
160
  return self.generate_vars_id()
105
161
 
106
- return VarRegisterTask(self.id, register_fn)
162
+ return VarRegisterTaskForScope(self, register_fn)
107
163
 
108
164
  def register_vue_computed_task(self, computed: VueComputed):
109
165
  weak_obj = weakref.ref(computed)
@@ -112,7 +168,16 @@ class Scope(Jsonable):
112
168
  self._vue_computeds.append(weak_obj()) # type: ignore
113
169
  return self.generate_vars_id()
114
170
 
115
- return VarRegisterTask(self.id, register_fn)
171
+ return VarRegisterTaskForScope(self, register_fn)
172
+
173
+ def register_js_fn_task(self, fn: JsFn):
174
+ weak_obj = weakref.ref(fn)
175
+
176
+ def register_fn():
177
+ self._js_fns.append(weak_obj()) # type: ignore
178
+ return self.generate_vars_id()
179
+
180
+ return VarRegisterTaskForScope(self, register_fn)
116
181
 
117
182
  def _to_json_dict(self):
118
183
  data = super()._to_json_dict()
@@ -120,12 +185,12 @@ class Scope(Jsonable):
120
185
  data["refs"] = self._refs
121
186
  if self._query:
122
187
  data["query"] = self._query
123
- if self._web_watchs:
124
- data["py_watch"] = self._web_watchs
125
- if self._js_watchs:
126
- data["js_watch"] = self._js_watchs
127
- if self._vue_watchs:
128
- data["vue_watch"] = self._vue_watchs
188
+ if self._web_watch_configs:
189
+ data["py_watch"] = self._web_watch_configs
190
+ if self._js_watch_configs:
191
+ data["js_watch"] = self._js_watch_configs
192
+ if self._vue_watch_configs:
193
+ data["vue_watch"] = self._vue_watch_configs
129
194
  if self._element_refs:
130
195
  data["eRefs"] = self._element_refs
131
196
 
@@ -140,6 +205,24 @@ class Scope(Jsonable):
140
205
  if self._const_data:
141
206
  data["data"] = self._const_data
142
207
 
208
+ if self._js_fns:
209
+ data["jsFn"] = self._js_fns
210
+
211
+ # vfor info
212
+ vfor_dict = {}
213
+ if self._vfor_item:
214
+ vfor_dict[self._vfor_item.SCOPE_TYPE] = self._vfor_item
215
+ if self._vfor_index:
216
+ vfor_dict[self._vfor_index.SCOPE_TYPE] = self._vfor_index
217
+ if self._vfor_item_key:
218
+ vfor_dict[self._vfor_item_key.SCOPE_TYPE] = self._vfor_item_key
219
+
220
+ if vfor_dict:
221
+ data["vfor"] = vfor_dict
222
+
223
+ if self._slot_prop_info:
224
+ data["sp"] = self._slot_prop_info._to_json_dict()
225
+
143
226
  return data
144
227
 
145
228
 
@@ -169,9 +252,10 @@ class GlobalScope(Scope):
169
252
  raise ValueError("Can not register vue_watchs in global scope")
170
253
 
171
254
 
172
- class VarRegisterTask:
173
- def __init__(self, scope_id: str, register_fn: Callable[[], str]) -> None:
174
- self._scope_id = scope_id
255
+ class VarRegisterTaskForScope:
256
+ def __init__(self, scope: Scope, register_fn: Callable[[], str]) -> None:
257
+ scope._mark_has_registered_task()
258
+ self._scope_id = scope.id
175
259
  self._id_gen_fn = functools.lru_cache(maxsize=1)(register_fn)
176
260
 
177
261
  @property
@@ -2,7 +2,7 @@ import typing
2
2
  from . import _types
3
3
  from instaui.runtime._app import get_app_slot
4
4
  from . import _install
5
- from ._router_param_var import RouterParamsVar
5
+ from ._router_param_var import RouteParamsVar
6
6
  from ._router_output import RouterOutput, RouterMethod
7
7
  from ._route_model import RouteItem
8
8
 
@@ -64,15 +64,15 @@ def config_router(
64
64
 
65
65
 
66
66
  def get_params(param_name: str) -> typing.Any:
67
- return RouterParamsVar("params")[param_name]
67
+ return RouteParamsVar("params")[param_name]
68
68
 
69
69
 
70
70
  def get_path():
71
- return RouterParamsVar("path")
71
+ return RouteParamsVar("path")
72
72
 
73
73
 
74
74
  def get_full_path():
75
- return RouterParamsVar("fullPath")
75
+ return RouteParamsVar("fullPath")
76
76
 
77
77
 
78
78
  def push(
@@ -3,7 +3,7 @@ import typing
3
3
  from pydantic import BaseModel, Field, ConfigDict, field_serializer, model_serializer
4
4
 
5
5
  from instaui.components.html.div import Div
6
- from instaui.runtime._app import get_app_slot, new_scope
6
+ from instaui.runtime._app import get_app_slot, get_current_scope
7
7
  from instaui.components.component import Component
8
8
  from instaui.common.jsonable import dumps2dict
9
9
 
@@ -14,7 +14,7 @@ class RouteItem(BaseModel):
14
14
  model_config = ConfigDict(arbitrary_types_allowed=True)
15
15
 
16
16
  component_fn: typing.Optional[typing.Callable] = Field(exclude=True)
17
- scopeId: typing.Optional[str] = None
17
+ sid: typing.Optional[str] = None
18
18
  vue_route_item: VueRouteItem = Field(serialization_alias="vueItem")
19
19
  meta: typing.Optional[typing.Dict] = None
20
20
 
@@ -32,17 +32,16 @@ class RouteItem(BaseModel):
32
32
  self.vue_route_item.path = f"/{'' if self.component_fn.__name__ == 'index' else self.component_fn.__name__}"
33
33
 
34
34
  app = get_app_slot()
35
- with new_scope() as scope:
36
- with Div() as div:
37
- self.component_fn()
35
+ with Div() as div:
36
+ self.component_fn()
37
+ scope_id = get_current_scope().id
38
38
 
39
39
  app.items.pop()
40
40
 
41
- self.scopeId = scope.id
42
41
  self.vue_route_item.component = div._slot_manager.default._children
43
42
 
44
43
  return {
45
- "scopeId": scope.id,
44
+ "sid": scope_id,
46
45
  "vueItem": self.vue_route_item,
47
46
  }
48
47
 
@@ -1,5 +1,6 @@
1
1
  from typing import List, Optional
2
2
  from instaui.common.jsonable import Jsonable
3
+ from instaui.vars._types import OutputSetType
3
4
  from instaui.vars.mixin_types.py_binding import CanOutputMixin
4
5
  from pydantic import BaseModel
5
6
 
@@ -9,13 +10,16 @@ class RouterOutput(Jsonable, CanOutputMixin):
9
10
  self.type = "routeAct"
10
11
 
11
12
  def _to_output_config(self):
12
- return self._to_json_dict()
13
+ return {}
13
14
 
14
15
  def _to_json_dict(self):
15
16
  data = super()._to_json_dict()
16
17
 
17
18
  return data
18
19
 
20
+ def _to_event_output_type(self) -> OutputSetType:
21
+ return OutputSetType.RouterAction
22
+
19
23
 
20
24
  class RouterMethod(BaseModel):
21
25
  fn: str
@@ -10,7 +10,7 @@ from instaui.vars.mixin_types.str_format_binding import StrFormatBindingMixin
10
10
  from instaui.vars.mixin_types.pathable import CanPathPropMixin
11
11
 
12
12
 
13
- class RouterParamsVar(
13
+ class RouteParamsVar(
14
14
  Jsonable,
15
15
  PathVar,
16
16
  ObservableMixin,
@@ -18,7 +18,7 @@ class RouterParamsVar(
18
18
  StrFormatBindingMixin,
19
19
  ElementBindingMixin,
20
20
  ):
21
- VAR_TYPE = "routePar"
21
+ VAR_TYPE = "rp"
22
22
 
23
23
  def __init__(
24
24
  self,
@@ -28,7 +28,7 @@ class RouterParamsVar(
28
28
  self._prop = prop
29
29
 
30
30
  def __to_binding_config(self):
31
- return self._to_json_dict()
31
+ return {"type": "rp", "prop": self._prop}
32
32
 
33
33
  def _to_pathable_binding_config(self) -> typing.Dict:
34
34
  return self.__to_binding_config()
@@ -43,9 +43,4 @@ class RouterParamsVar(
43
43
  return self.__to_binding_config()
44
44
 
45
45
  def _to_json_dict(self):
46
- data = super()._to_json_dict()
47
- data["type"] = self.VAR_TYPE
48
-
49
- if self._prop != "params":
50
- data["prop"] = self._prop
51
- return data
46
+ raise NotImplementedError("RouteParamsVar is not json serializable")
@@ -1 +1 @@
1
- .insta-themes:where([data-scaling="90%"]){--scaling: .9 }.insta-themes:where([data-scaling="95%"]){--scaling: .95 }.insta-themes:where([data-scaling="100%"]){--scaling: 1 }.insta-themes:where([data-scaling="105%"]){--scaling: 1.05 }.insta-themes:where([data-scaling="110%"]){--scaling: 1.1 }.insta-themes{--space-1: calc(4px* var(--scaling));--space-2: calc(8px* var(--scaling));--space-3: calc(12px* var(--scaling));--space-4: calc(16px* var(--scaling));--space-5: calc(24px* var(--scaling));--space-6: calc(32px* var(--scaling));--space-7: calc(40px* var(--scaling));--space-8: calc(48px* var(--scaling));--space-9: calc(64px* var(--scaling));--font-size-1: calc(12px* var(--scaling));--font-size-2: calc(14px* var(--scaling));--font-size-3: calc(16px* var(--scaling));--font-size-4: calc(18px* var(--scaling));--font-size-5: calc(20px* var(--scaling));--font-size-6: calc(24px* var(--scaling));--font-size-7: calc(28px* var(--scaling));--font-size-8: calc(35px* var(--scaling));--font-size-9: calc(60px* var(--scaling));--font-weight-light: 300;--font-weight-regular: 400;--font-weight-medium: 500;--font-weight-bold: 700;--line-height-1: calc(16px* var(--scaling));--line-height-2: calc(20px* var(--scaling));--line-height-3: calc(24px* var(--scaling));--line-height-4: calc(26px* var(--scaling));--line-height-5: calc(28px* var(--scaling));--line-height-6: calc(30px* var(--scaling));--line-height-7: calc(36px* var(--scaling));--line-height-8: calc(40px* var(--scaling));--line-height-9: calc(60px* var(--scaling));--letter-spacing-1: .0025em;--letter-spacing-2: 0em;--letter-spacing-3: 0em;--letter-spacing-4: -.0025em;--letter-spacing-5: -.005em;--letter-spacing-6: -.00625em;--letter-spacing-7: -.0075em;--letter-spacing-8: -.01em;--letter-spacing-9: -.025em;--default-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI (Custom)", Roboto, "Helvetica Neue", "Open Sans (Custom)", system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--default-font-size: var(--font-size-3);--default-font-style: normal;--default-font-weight: var(--font-weight-regular);--default-line-height: 1.5;--default-letter-spacing: 0em;--default-leading-trim-start: .42em;--default-leading-trim-end: .36em;--heading-font-family: var(--default-font-family);--heading-font-size-adjust: 1;--heading-font-style: normal;--heading-leading-trim-start: var(--default-leading-trim-start);--heading-leading-trim-end: var(--default-leading-trim-end);--heading-letter-spacing: 0em;--heading-line-height-1: calc(16px* var(--scaling));--heading-line-height-2: calc(18px* var(--scaling));--heading-line-height-3: calc(22px* var(--scaling));--heading-line-height-4: calc(24px* var(--scaling));--heading-line-height-5: calc(26px* var(--scaling));--heading-line-height-6: calc(30px* var(--scaling));--heading-line-height-7: calc(36px* var(--scaling));--heading-line-height-8: calc(40px* var(--scaling));--heading-line-height-9: calc(60px* var(--scaling));--strong-font-family: var(--default-font-family);--strong-font-size-adjust: 1;--strong-font-style: inherit;--strong-font-weight: var(--font-weight-bold);--strong-letter-spacing: 0em;--em-font-family: "Times New Roman", "Times", serif;--em-font-size-adjust: 1.18;--em-font-style: italic;--em-font-weight: inherit;--em-letter-spacing: -.025em;overflow-wrap:break-word;font-family:var(--default-font-family);font-size:var(--default-font-size);font-weight:var(--default-font-weight);font-style:var(--default-font-style);line-height:var(--default-line-height);letter-spacing:var(--default-letter-spacing);-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--container-1: 448px;--container-2: 688px;--container-3: 880px;--container-4: 1136px}.i-weight-light{font-weight:var(--font-weight-light)}.i-weight-regular{font-weight:var(--font-weight-regular)}.i-weight-medium{font-weight:var(--font-weight-medium)}.i-weight-bold{font-weight:var(--font-weight-bold)}.i-text-align-left{text-align:left}.i-text-align-center{text-align:center}.i-text-align-right{text-align:right}.insta-Heading:where(.i-size-1){font-size:calc(var(--font-size-1) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-1);letter-spacing:calc(var(-letter-spacing-1) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-2){font-size:calc(var(--font-size-2) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-2);letter-spacing:calc(var(-letter-spacing-2) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-3){font-size:calc(var(--font-size-3) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-3);letter-spacing:calc(var(-letter-spacing-3) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-4){font-size:calc(var(--font-size-4) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-4);letter-spacing:calc(var(-letter-spacing-4) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-5){font-size:calc(var(--font-size-5) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-5);letter-spacing:calc(var(-letter-spacing-5) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-6){font-size:calc(var(--font-size-6) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-6);letter-spacing:calc(var(-letter-spacing-6) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-7){font-size:calc(var(--font-size-7) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-7);letter-spacing:calc(var(-letter-spacing-7) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-8){font-size:calc(var(--font-size-8) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-8);letter-spacing:calc(var(-letter-spacing-8) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-9){font-size:calc(var(--font-size-9) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-9);letter-spacing:calc(var(-letter-spacing-9) + var(--heading-letter-spacing))}:root{color-scheme:light dark}:where(body){--insta-column-gap: 1rem;height:100vh}:where(*){box-sizing:border-box;margin:0;padding:0}:where(#app){height:100%}:where(.app-box,.insta-main){height:100%;overflow-y:auto}:where(.insta-main){--insta-padding: 16px;padding:var(--insta-padding, 16px)}
1
+ .insta-themes:where([data-scaling="90%"]){--scaling: .9 }.insta-themes:where([data-scaling="95%"]){--scaling: .95 }.insta-themes:where([data-scaling="100%"]){--scaling: 1 }.insta-themes:where([data-scaling="105%"]){--scaling: 1.05 }.insta-themes:where([data-scaling="110%"]){--scaling: 1.1 }.insta-themes{--space-1: calc(4px* var(--scaling));--space-2: calc(8px* var(--scaling));--space-3: calc(12px* var(--scaling));--space-4: calc(16px* var(--scaling));--space-5: calc(24px* var(--scaling));--space-6: calc(32px* var(--scaling));--space-7: calc(40px* var(--scaling));--space-8: calc(48px* var(--scaling));--space-9: calc(64px* var(--scaling));--font-size-1: calc(12px* var(--scaling));--font-size-2: calc(14px* var(--scaling));--font-size-3: calc(16px* var(--scaling));--font-size-4: calc(18px* var(--scaling));--font-size-5: calc(20px* var(--scaling));--font-size-6: calc(24px* var(--scaling));--font-size-7: calc(28px* var(--scaling));--font-size-8: calc(35px* var(--scaling));--font-size-9: calc(60px* var(--scaling));--font-weight-light: 300;--font-weight-regular: 400;--font-weight-medium: 500;--font-weight-bold: 700;--line-height-1: calc(16px* var(--scaling));--line-height-2: calc(20px* var(--scaling));--line-height-3: calc(24px* var(--scaling));--line-height-4: calc(26px* var(--scaling));--line-height-5: calc(28px* var(--scaling));--line-height-6: calc(30px* var(--scaling));--line-height-7: calc(36px* var(--scaling));--line-height-8: calc(40px* var(--scaling));--line-height-9: calc(60px* var(--scaling));--letter-spacing-1: .0025em;--letter-spacing-2: 0em;--letter-spacing-3: 0em;--letter-spacing-4: -.0025em;--letter-spacing-5: -.005em;--letter-spacing-6: -.00625em;--letter-spacing-7: -.0075em;--letter-spacing-8: -.01em;--letter-spacing-9: -.025em;--default-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI (Custom)", Roboto, "Helvetica Neue", "Open Sans (Custom)", system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--default-font-size: var(--font-size-3);--default-font-style: normal;--default-font-weight: var(--font-weight-regular);--default-line-height: 1.5;--default-letter-spacing: 0em;--default-leading-trim-start: .42em;--default-leading-trim-end: .36em;--heading-font-family: var(--default-font-family);--heading-font-size-adjust: 1;--heading-font-style: normal;--heading-leading-trim-start: var(--default-leading-trim-start);--heading-leading-trim-end: var(--default-leading-trim-end);--heading-letter-spacing: 0em;--heading-line-height-1: calc(16px* var(--scaling));--heading-line-height-2: calc(18px* var(--scaling));--heading-line-height-3: calc(22px* var(--scaling));--heading-line-height-4: calc(24px* var(--scaling));--heading-line-height-5: calc(26px* var(--scaling));--heading-line-height-6: calc(30px* var(--scaling));--heading-line-height-7: calc(36px* var(--scaling));--heading-line-height-8: calc(40px* var(--scaling));--heading-line-height-9: calc(60px* var(--scaling));--strong-font-family: var(--default-font-family);--strong-font-size-adjust: 1;--strong-font-style: inherit;--strong-font-weight: var(--font-weight-bold);--strong-letter-spacing: 0em;--em-font-family: "Times New Roman", "Times", serif;--em-font-size-adjust: 1.18;--em-font-style: italic;--em-font-weight: inherit;--em-letter-spacing: -.025em;overflow-wrap:break-word;font-family:var(--default-font-family);font-size:var(--default-font-size);font-weight:var(--default-font-weight);font-style:var(--default-font-style);line-height:var(--default-line-height);letter-spacing:var(--default-letter-spacing);-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--container-1: 448px;--container-2: 688px;--container-3: 880px;--container-4: 1136px}.i-weight-light{font-weight:var(--font-weight-light)}.i-weight-regular{font-weight:var(--font-weight-regular)}.i-weight-medium{font-weight:var(--font-weight-medium)}.i-weight-bold{font-weight:var(--font-weight-bold)}.i-text-align-left{text-align:left}.i-text-align-center{text-align:center}.i-text-align-right{text-align:right}.insta-Heading:where(.i-size-1){font-size:calc(var(--font-size-1) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-1);letter-spacing:calc(var(-letter-spacing-1) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-2){font-size:calc(var(--font-size-2) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-2);letter-spacing:calc(var(-letter-spacing-2) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-3){font-size:calc(var(--font-size-3) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-3);letter-spacing:calc(var(-letter-spacing-3) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-4){font-size:calc(var(--font-size-4) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-4);letter-spacing:calc(var(-letter-spacing-4) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-5){font-size:calc(var(--font-size-5) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-5);letter-spacing:calc(var(-letter-spacing-5) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-6){font-size:calc(var(--font-size-6) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-6);letter-spacing:calc(var(-letter-spacing-6) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-7){font-size:calc(var(--font-size-7) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-7);letter-spacing:calc(var(-letter-spacing-7) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-8){font-size:calc(var(--font-size-8) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-8);letter-spacing:calc(var(-letter-spacing-8) + var(--heading-letter-spacing))}.insta-Heading:where(.i-size-9){font-size:calc(var(--font-size-9) * var(--heading-font-size-adjust));--line-height: var(--heading-line-height-9);letter-spacing:calc(var(-letter-spacing-9) + var(--heading-letter-spacing))}:root{color-scheme:light dark}:where(body){--insta-column-gap: 1rem;height:100vh}:where(*){box-sizing:border-box;margin:0;padding:0}:where(#app){height:100%}:where(.app-box,.insta-main){height:100%;overflow-y:auto}:where(.insta-main){--insta-padding: 16px;padding:var(--insta-padding, 16px)}