From 5be2f71cca8ae1001206900604f6b32cd7c2e9c4 Mon Sep 17 00:00:00 2001 From: Amit Upadhyay Date: Tue, 3 Dec 2024 14:48:30 +0530 Subject: [PATCH] reverting changes from c5d13c88abfe6dd3a9317759451e0fa221612b7e --- fastn-builtins/src/lib.rs | 368 ++++++++++++------------ fastn-resolved/src/record.rs | 10 +- fastn-runtime/src/lib.rs | 2 +- fastn-runtime/src/utils.rs | 2 +- fastn-runtime/src/value.rs | 2 +- ftd/src/executor/main.rs | 2 +- ftd/src/html/utils.rs | 2 +- ftd/src/interpreter/things/component.rs | 8 +- ftd/src/interpreter/things/function.rs | 4 +- ftd/src/interpreter/things/or_type.rs | 2 +- ftd/src/interpreter/things/record.rs | 6 +- ftd/src/interpreter/things/value.rs | 26 +- ftd/src/interpreter/utils.rs | 6 +- ftd/src/js/mod.rs | 2 +- 14 files changed, 222 insertions(+), 220 deletions(-) diff --git a/fastn-builtins/src/lib.rs b/fastn-builtins/src/lib.rs index 4a21dcae0..37a8cb4e7 100644 --- a/fastn-builtins/src/lib.rs +++ b/fastn-builtins/src/lib.rs @@ -245,7 +245,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "rive".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -253,7 +253,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "input".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -261,7 +261,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "value".to_string(), kind: fastn_resolved::Kind::boolean().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -291,7 +291,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "rive".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -299,7 +299,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "input".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -329,7 +329,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "rive".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -337,7 +337,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "input".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -345,7 +345,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "value".to_string(), kind: fastn_resolved::Kind::integer().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -375,7 +375,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "rive".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -383,7 +383,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "input".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -413,7 +413,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "rive".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -421,7 +421,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "input".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -451,7 +451,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "rive".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -459,7 +459,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "input".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -489,7 +489,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "rive".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -497,7 +497,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "input".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -531,7 +531,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: true, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -565,7 +565,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -577,7 +577,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -611,7 +611,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -623,7 +623,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -657,7 +657,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -669,7 +669,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -702,7 +702,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -714,7 +714,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -748,7 +748,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: true, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -782,7 +782,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: true, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -794,7 +794,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -828,7 +828,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: true, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -862,7 +862,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: true, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -874,7 +874,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -974,7 +974,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -986,7 +986,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1020,7 +1020,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1054,7 +1054,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: true, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1066,7 +1066,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1100,7 +1100,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: true, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1112,7 +1112,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1146,7 +1146,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: true, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1158,7 +1158,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1192,7 +1192,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: true, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1204,7 +1204,7 @@ pub fn default_bag() -> indexmap::IndexMap { body: false, }, mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1229,7 +1229,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "light".to_string(), kind: fastn_resolved::Kind::string().into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1237,7 +1237,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "dark".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Reference { + value: Some(fastn_resolved::PropertyValue::Reference { name: fastn_builtins::constants::FTD_IMAGE_SRC_LIGHT.to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), source: fastn_resolved::PropertyValueSource::Local( @@ -1263,7 +1263,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "light".to_string(), kind: fastn_resolved::Kind::string().into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1271,7 +1271,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "dark".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Reference { + value: Some(fastn_resolved::PropertyValue::Reference { name: fastn_builtins::constants::FTD_VIDEO_SRC_LIGHT.to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), source: fastn_resolved::PropertyValueSource::Local( @@ -1297,7 +1297,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "src".to_string(), kind: fastn_resolved::Kind::string().into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1315,7 +1315,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "light".to_string(), kind: fastn_resolved::Kind::string().into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1323,7 +1323,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "dark".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Reference { + value: Some(fastn_resolved::PropertyValue::Reference { name: fastn_builtins::constants::FTD_COLOR_LIGHT.to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), source: fastn_resolved::PropertyValueSource::Local( @@ -1350,7 +1350,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::OrType { name: fastn_builtins::constants::FTD_LENGTH.to_string(), variant: fastn_builtins::constants::FTD_LENGTH_PX.to_string(), @@ -1375,7 +1375,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::OrType { name: fastn_builtins::constants::FTD_LENGTH.to_string(), variant: fastn_builtins::constants::FTD_LENGTH_PX.to_string(), @@ -1400,7 +1400,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::OrType { name: fastn_builtins::constants::FTD_LENGTH.to_string(), variant: fastn_builtins::constants::FTD_LENGTH_PX.to_string(), @@ -1425,7 +1425,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::OrType { name: fastn_builtins::constants::FTD_LENGTH.to_string(), variant: fastn_builtins::constants::FTD_LENGTH_PX.to_string(), @@ -1451,7 +1451,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data(), mutable: false, access_modifier: Default::default(), - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::Record { name: fastn_builtins::constants::FTD_COLOR.to_string(), fields: std::iter::IntoIterator::into_iter([ @@ -1484,7 +1484,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data(), mutable: false, access_modifier: Default::default(), - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::Boolean { value: false }, is_mutable: false, line_number: 0, @@ -1586,7 +1586,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1595,7 +1595,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1604,7 +1604,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1613,7 +1613,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1622,7 +1622,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1631,7 +1631,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1640,7 +1640,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1649,7 +1649,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1667,7 +1667,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1676,7 +1676,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1694,7 +1694,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_IMAGE_SRC) .into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1703,7 +1703,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_BACKGROUND_REPEAT) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1712,7 +1712,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_BACKGROUND_SIZE) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1721,7 +1721,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_BACKGROUND_POSITION) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1739,7 +1739,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1748,7 +1748,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1757,7 +1757,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1766,7 +1766,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -1889,7 +1889,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LINEAR_GRADIENT_DIRECTIONS) .into_kind_data().into_optional(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::OrType { name: fastn_builtins::constants::FTD_LINEAR_GRADIENT_DIRECTIONS.to_string(), variant: fastn_builtins::constants::FTD_LINEAR_GRADIENT_DIRECTIONS_BOTTOM @@ -1915,7 +1915,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_LINEAR_GRADIENT_COLOR) .into_list().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -2069,7 +2069,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -2078,7 +2078,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -2222,7 +2222,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -2231,7 +2231,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -3412,7 +3412,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data() .caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -3422,7 +3422,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data(), mutable: false, access_modifier: Default::default(), - default: Some(fastn_resolved::PropertyValue::Reference { + value: Some(fastn_resolved::PropertyValue::Reference { name: fastn_builtins::constants::FTD_RESPONSIVE_LENGTH_DESKTOP.to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), source: fastn_resolved::PropertyValueSource::Local( @@ -3977,7 +3977,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_optional() .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -3987,7 +3987,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_optional() .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -3997,7 +3997,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_optional() .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4007,7 +4007,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_optional() .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4017,7 +4017,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_list() .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4036,7 +4036,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_TYPE) .into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4046,7 +4046,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data(), mutable: false, access_modifier: Default::default(), - default: Some(fastn_resolved::PropertyValue::Reference { + value: Some(fastn_resolved::PropertyValue::Reference { name: fastn_builtins::constants::FTD_RESPONSIVE_TYPE_DESKTOP.to_string(), kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_TYPE) .into_kind_data(), @@ -4217,7 +4217,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4226,7 +4226,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4235,7 +4235,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4244,7 +4244,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4253,7 +4253,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4271,7 +4271,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4280,7 +4280,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4289,7 +4289,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4298,7 +4298,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4307,7 +4307,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4316,7 +4316,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4325,7 +4325,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4334,7 +4334,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4343,7 +4343,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4361,7 +4361,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4370,7 +4370,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4379,7 +4379,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4397,7 +4397,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4406,7 +4406,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4415,7 +4415,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4433,7 +4433,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4442,7 +4442,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4451,7 +4451,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4460,7 +4460,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4469,7 +4469,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4478,7 +4478,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4487,7 +4487,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4496,7 +4496,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4505,7 +4505,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4514,7 +4514,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4532,7 +4532,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record("ftd#background-colors") .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4541,7 +4541,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4550,7 +4550,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4559,7 +4559,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4568,7 +4568,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, line_number: 0, access_modifier: Default::default(), }, @@ -4577,7 +4577,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, line_number: 0, access_modifier: Default::default(), }, @@ -4586,7 +4586,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_COLOR) .into_kind_data(), mutable: false, - default: None, + value: None, line_number: 0, access_modifier: Default::default(), }, @@ -4594,7 +4594,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "cta-primary".to_string(), kind: fastn_resolved::Kind::record("ftd#cta-colors").into_kind_data(), mutable: false, - default: None, + value: None, line_number: 0, access_modifier: Default::default(), }, @@ -4602,7 +4602,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "cta-secondary".to_string(), kind: fastn_resolved::Kind::record("ftd#cta-colors").into_kind_data(), mutable: false, - default: None, + value: None, line_number: 0, access_modifier: Default::default(), }, @@ -4610,7 +4610,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "cta-tertiary".to_string(), kind: fastn_resolved::Kind::record("ftd#cta-colors").into_kind_data(), mutable: false, - default: None, + value: None, line_number: 0, access_modifier: Default::default(), }, @@ -4618,7 +4618,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "cta-danger".to_string(), kind: fastn_resolved::Kind::record("ftd#cta-colors").into_kind_data(), mutable: false, - default: None, + value: None, line_number: 0, access_modifier: Default::default(), }, @@ -4626,7 +4626,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "accent".to_string(), kind: fastn_resolved::Kind::record("ftd#pst").into_kind_data(), mutable: false, - default: None, + value: None, line_number: 0, access_modifier: Default::default(), }, @@ -4634,7 +4634,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "error".to_string(), kind: fastn_resolved::Kind::record("ftd#btb").into_kind_data(), mutable: false, - default: None, + value: None, line_number: 0, access_modifier: Default::default(), }, @@ -4642,7 +4642,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "success".to_string(), kind: fastn_resolved::Kind::record("ftd#btb").into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4650,7 +4650,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "info".to_string(), kind: fastn_resolved::Kind::record("ftd#btb").into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4658,7 +4658,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "warning".to_string(), kind: fastn_resolved::Kind::record("ftd#btb").into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4666,7 +4666,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "custom".to_string(), kind: fastn_resolved::Kind::record("ftd#custom-colors").into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -4683,7 +4683,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4691,7 +4691,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4699,7 +4699,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4707,7 +4707,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4715,7 +4715,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4723,7 +4723,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4731,7 +4731,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4739,7 +4739,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4747,7 +4747,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4755,7 +4755,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4763,7 +4763,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4771,7 +4771,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4779,7 +4779,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, fastn_resolved::Field { @@ -4787,7 +4787,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, fastn_resolved::Field { @@ -4795,7 +4795,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, fastn_resolved::Field { @@ -4803,7 +4803,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }, fastn_resolved::Field { @@ -4811,7 +4811,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_RESPONSIVE_TYPE) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 },], @@ -9966,7 +9966,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "mobile".to_string(), kind: fastn_resolved::Kind::integer().into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0 }], @@ -10066,7 +10066,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_IMAGE_SRC) .into_kind_data().caption().into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10076,7 +10076,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data() .into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10086,7 +10086,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data() .into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10338,7 +10338,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10347,7 +10347,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::or_type(fastn_builtins::constants::FTD_LENGTH) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10368,7 +10368,7 @@ pub fn default_bag() -> indexmap::IndexMap { kind: fastn_resolved::Kind::record(fastn_builtins::constants::FTD_MASK_IMAGE_DATA) .into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10378,7 +10378,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data() .into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10388,7 +10388,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data() .into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10398,7 +10398,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data() .into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10408,7 +10408,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data() .into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10418,7 +10418,7 @@ pub fn default_bag() -> indexmap::IndexMap { .into_kind_data() .into_optional(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10460,7 +10460,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "name".to_string(), kind: fastn_resolved::Kind::string().into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10468,7 +10468,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "value".to_string(), kind: fastn_resolved::Kind::integer().into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::Integer { value: 0 }, @@ -10482,7 +10482,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "error".to_string(), kind: fastn_resolved::Kind::string().into_optional().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10499,7 +10499,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "name".to_string(), kind: fastn_resolved::Kind::string().into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10507,7 +10507,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "value".to_string(), kind: fastn_resolved::Kind::decimal().into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::Decimal { value: 0.0, }, @@ -10521,7 +10521,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "error".to_string(), kind: fastn_resolved::Kind::string().into_optional().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10538,7 +10538,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "name".to_string(), kind: fastn_resolved::Kind::string().into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10546,7 +10546,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "value".to_string(), kind: fastn_resolved::Kind::boolean().into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::Boolean { value: false, }, @@ -10560,7 +10560,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "error".to_string(), kind: fastn_resolved::Kind::string().into_optional().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10577,7 +10577,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "name".to_string(), kind: fastn_resolved::Kind::string().into_kind_data().caption(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10585,7 +10585,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "value".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::String { text: "".to_string(), }, @@ -10599,7 +10599,7 @@ pub fn default_bag() -> indexmap::IndexMap { name: "error".to_string(), kind: fastn_resolved::Kind::string().into_optional().into_kind_data(), mutable: false, - default: None, + value: None, access_modifier: Default::default(), line_number: 0, }, @@ -10724,7 +10724,7 @@ pub fn default_test_bag() -> indexmap::IndexMap indexmap::IndexMap fastn_resolved::ComponentDefinition { name: "autoplay".to_string(), kind: fastn_resolved::Kind::boolean().into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Value { + value: Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::Boolean { value: true }, is_mutable: false, line_number: 0, @@ -11559,7 +11559,7 @@ pub fn document_function() -> fastn_resolved::ComponentDefinition { .into_optional() .into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Reference { + value: Some(fastn_resolved::PropertyValue::Reference { name: "ftd#document.title".to_string(), kind: fastn_resolved::Kind::string() .into_optional() @@ -11577,7 +11577,7 @@ pub fn document_function() -> fastn_resolved::ComponentDefinition { .into_optional() .into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Reference { + value: Some(fastn_resolved::PropertyValue::Reference { name: "ftd#document.title".to_string(), kind: fastn_resolved::Kind::string() .into_optional() @@ -11601,7 +11601,7 @@ pub fn document_function() -> fastn_resolved::ComponentDefinition { .into_optional() .into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Reference { + value: Some(fastn_resolved::PropertyValue::Reference { name: "ftd#document.description".to_string(), kind: fastn_resolved::Kind::string() .into_optional() @@ -11619,7 +11619,7 @@ pub fn document_function() -> fastn_resolved::ComponentDefinition { .into_optional() .into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Reference { + value: Some(fastn_resolved::PropertyValue::Reference { name: "ftd#document.description".to_string(), kind: fastn_resolved::Kind::string() .into_optional() @@ -11643,7 +11643,7 @@ pub fn document_function() -> fastn_resolved::ComponentDefinition { .into_optional() .into_kind_data(), mutable: false, - default: Some(fastn_resolved::PropertyValue::Reference { + value: Some(fastn_resolved::PropertyValue::Reference { name: "ftd#document.og-image".to_string(), kind: fastn_resolved::Kind::string().into_kind_data(), source: fastn_resolved::PropertyValueSource::Local("document".to_string()), diff --git a/fastn-resolved/src/record.rs b/fastn-resolved/src/record.rs index 426a7e717..75199c198 100644 --- a/fastn-resolved/src/record.rs +++ b/fastn-resolved/src/record.rs @@ -19,7 +19,7 @@ pub struct Field { pub name: String, pub kind: fastn_resolved::KindData, pub mutable: bool, - pub default: Option, + pub value: Option, pub line_number: usize, pub access_modifier: AccessModifier, } @@ -36,7 +36,7 @@ impl Field { name: name.to_string(), kind, mutable, - default: value, + value, line_number, access_modifier: Default::default(), } @@ -67,7 +67,7 @@ impl Field { name: name.to_string(), kind, mutable: false, - default: None, + value: None, line_number: 0, access_modifier: Default::default(), } @@ -82,7 +82,7 @@ impl Field { name: name.to_string(), kind, mutable: false, - default: Some(value), + value: Some(value), line_number: 0, access_modifier: Default::default(), } @@ -104,7 +104,7 @@ impl Field { if self.kind.is_optional() || self.kind.is_list() { return false; } - self.default.is_none() + self.value.is_none() } } diff --git a/fastn-runtime/src/lib.rs b/fastn-runtime/src/lib.rs index 4f46f676f..3cf24e43f 100644 --- a/fastn-runtime/src/lib.rs +++ b/fastn-runtime/src/lib.rs @@ -386,7 +386,7 @@ pub fn get_all_asts( } else if let fastn_resolved::Definition::OrType(ot) = definition { let mut fields = vec![]; for variant in &ot.variants { - if let Some(ref value) = variant.clone().fields().first().unwrap().default { + if let Some(ref value) = variant.clone().fields().first().unwrap().value { fields.push(( variant .name() diff --git a/fastn-runtime/src/utils.rs b/fastn-runtime/src/utils.rs index 0417e5ce6..66ef81035 100644 --- a/fastn-runtime/src/utils.rs +++ b/fastn-runtime/src/utils.rs @@ -232,7 +232,7 @@ pub(crate) fn is_module_argument( component_arguments.iter().find_map(|v| { if v.name.eq(module_name) && v.kind.is_module() { let module = v - .default + .value .as_ref() .and_then(|v| v.value_optional()) .and_then(|v| v.module_name_optional())?; diff --git a/fastn-runtime/src/value.rs b/fastn-runtime/src/value.rs index 0dede9162..92ee6dd15 100644 --- a/fastn-runtime/src/value.rs +++ b/fastn-runtime/src/value.rs @@ -202,7 +202,7 @@ impl fastn_runtime::extensions::ExpressionExt for fastn_resolved::Expression { impl fastn_runtime::extensions::ArgumentExt for fastn_resolved::Argument { fn get_default_value(&self) -> Option { - if let Some(ref value) = self.default { + if let Some(ref value) = self.value { Some(value.to_value()) } else if self.kind.is_list() { Some(fastn_runtime::Value::Data(fastn_resolved::Value::List { diff --git a/ftd/src/executor/main.rs b/ftd/src/executor/main.rs index a8ea3fa53..c1062820f 100644 --- a/ftd/src/executor/main.rs +++ b/ftd/src/executor/main.rs @@ -253,7 +253,7 @@ impl ExecuteDoc<'_> { is_mutable: argument.mutable, line_number: instruction.line_number, } - } else if let Some(ref value) = argument.default { + } else if let Some(ref value) = argument.value { value.to_owned() } else { unreachable!() diff --git a/ftd/src/html/utils.rs b/ftd/src/html/utils.rs index 92349c217..a56f5d2d0 100644 --- a/ftd/src/html/utils.rs +++ b/ftd/src/html/utils.rs @@ -519,7 +519,7 @@ pub(crate) fn to_argument_string( let mut properties_string = "".to_string(); for argument in arguments { let mut result_value = "null".to_string(); - if let Some(ref value) = argument.default { + if let Some(ref value) = argument.value { if let Ok(Some(value_string)) = ftd::html::utils::get_formatted_dep_string_from_property_value( id, doc, value, &None, None, false, diff --git a/ftd/src/interpreter/things/component.rs b/ftd/src/interpreter/things/component.rs index 0d1b382a6..35126a579 100644 --- a/ftd/src/interpreter/things/component.rs +++ b/ftd/src/interpreter/things/component.rs @@ -324,7 +324,7 @@ fn get_module_name_and_thing( use ftd::interpreter::{PropertyValueExt, ValueExt}; let default_things = { - let value = if let Some(ref value) = component_argument.default { + let value = if let Some(ref value) = component_argument.value { value.clone().resolve(doc, module_property.line_number)? } else { return ftd::interpreter::utils::e2( @@ -353,7 +353,7 @@ fn get_module_name_and_thing( module_property.line_number, )? { - if let Some(ref mut property_value) = argument.default { + if let Some(ref mut property_value) = argument.value { if let fastn_resolved::PropertyValue::Value { value, .. } = property_value { if let Some((name, thing)) = value.mut_module_optional() { thing.extend(default_things); @@ -1406,7 +1406,7 @@ impl ComponentExt for fastn_resolved::ComponentInvocation { if arg.kind.is_module() { let component_name = { let (m_name, _) = match arg - .default + .value .as_ref() .unwrap() .clone() @@ -1541,7 +1541,7 @@ impl LoopExt for fastn_resolved::Loop { name: self.alias.to_string(), kind: fastn_resolved::KindData::new(kind), mutable: self.on.is_mutable(), - default: Some(self.on.to_owned()), + value: Some(self.on.to_owned()), line_number: self.on.line_number(), access_modifier: Default::default(), }) diff --git a/ftd/src/interpreter/things/function.rs b/ftd/src/interpreter/things/function.rs index d082f9804..6335cbf3d 100644 --- a/ftd/src/interpreter/things/function.rs +++ b/ftd/src/interpreter/things/function.rs @@ -290,7 +290,7 @@ impl FunctionCallExt for fastn_resolved::FunctionCall { if let Some(fastn_resolved::PropertyValue::Value { value: fastn_resolved::Value::Module { ref name, .. }, .. - }) = argument.default + }) = argument.value { if let Some(function) = function { module_name = Some(( @@ -367,7 +367,7 @@ impl FunctionCallExt for fastn_resolved::FunctionCall { loop_object_name_and_kind, )?) } else { - match argument.default { + match argument.value { Some(ref value) => value.clone(), None if argument.kind.is_optional() => fastn_resolved::PropertyValue::new_none( argument.kind.clone(), diff --git a/ftd/src/interpreter/things/or_type.rs b/ftd/src/interpreter/things/or_type.rs index dee3a7dbd..fdec9cec1 100644 --- a/ftd/src/interpreter/things/or_type.rs +++ b/ftd/src/interpreter/things/or_type.rs @@ -150,7 +150,7 @@ fn validate_constant_variant( variant: &fastn_resolved::Field, doc: &ftd::interpreter::TDoc, ) -> ftd::interpreter::Result<()> { - if variant.default.is_none() + if variant.value.is_none() && !(variant.kind.is_void() || variant.kind.is_optional() || variant.kind.is_list()) { return ftd::interpreter::utils::e2( diff --git a/ftd/src/interpreter/things/record.rs b/ftd/src/interpreter/things/record.rs index f5bec4230..1fb88ca87 100644 --- a/ftd/src/interpreter/things/record.rs +++ b/ftd/src/interpreter/things/record.rs @@ -288,7 +288,7 @@ impl FieldExt for fastn_resolved::Field { None }; - field.default = value; + field.value = value; } let resolved_fields = fields_with_resolved_kinds .into_iter() @@ -368,7 +368,7 @@ impl FieldExt for fastn_resolved::Field { name: field.name.to_string(), kind, mutable: field.mutable, - default: value, + value, line_number: field.line_number, access_modifier: access_modifier(field.access_modifier), }, @@ -396,7 +396,7 @@ impl FieldExt for fastn_resolved::Field { name: field.name.to_string(), kind, mutable: field.mutable, - default: None, + value: None, line_number: field.line_number, access_modifier: access_modifier(field.access_modifier), }, diff --git a/ftd/src/interpreter/things/value.rs b/ftd/src/interpreter/things/value.rs index ce66737eb..60a23534e 100644 --- a/ftd/src/interpreter/things/value.rs +++ b/ftd/src/interpreter/things/value.rs @@ -854,16 +854,18 @@ impl PropertyValueExt for fastn_resolved::PropertyValue { } let constant = or_type_variant.ok_constant(doc.name)?; - let value = constant.default.clone().ok_or( - ftd::interpreter::Error::ParseError { - message: format!( - "Expected value for constant variant `{}`", - constant.name - ), - doc_id: doc.name.to_string(), - line_number: constant.line_number, - }, - )?; + let value = + constant + .value + .clone() + .ok_or(ftd::interpreter::Error::ParseError { + message: format!( + "Expected value for constant variant `{}`", + constant.name + ), + doc_id: doc.name.to_string(), + line_number: constant.line_number, + })?; ftd::interpreter::StateWithThing::new_thing( fastn_resolved::Value::new_or_type( @@ -1019,8 +1021,8 @@ impl PropertyValueExt for fastn_resolved::PropertyValue { continue; } - if headers.is_none() && field.default.is_some() { - let value = field.default.as_ref().unwrap(); + if headers.is_none() && field.value.is_some() { + let value = field.value.as_ref().unwrap(); match value { fastn_resolved::PropertyValue::Reference { name: refernence, diff --git a/ftd/src/interpreter/utils.rs b/ftd/src/interpreter/utils.rs index a44dca8d0..ea5293c8d 100644 --- a/ftd/src/interpreter/utils.rs +++ b/ftd/src/interpreter/utils.rs @@ -717,7 +717,7 @@ pub(crate) fn insert_module_thing( things, name: module_name, } = arg - .default + .value .as_mut() .ok_or(ftd::interpreter::Error::ValueNotFound { doc_id: doc.name.to_string(), @@ -829,7 +829,7 @@ pub(crate) fn validate_properties_and_set_default( if argument.kind.is_module() { let (_default_module, arg_things) = match argument - .default + .value .as_ref() .unwrap() .value(doc_id, line_number)? @@ -854,7 +854,7 @@ pub(crate) fn validate_properties_and_set_default( } } if found_default.is_none() { - if let Some(ref default_value) = argument.default { + if let Some(ref default_value) = argument.value { properties.push(fastn_resolved::Property { value: default_value.to_owned(), source: fastn_resolved::PropertySource::Default, diff --git a/ftd/src/js/mod.rs b/ftd/src/js/mod.rs index 740e2a2ff..1eacb1099 100644 --- a/ftd/src/js/mod.rs +++ b/ftd/src/js/mod.rs @@ -129,7 +129,7 @@ pub fn document_into_js_ast(document: ftd::interpreter::Document) -> JSAstData { } else if let ftd::interpreter::Thing::OrType(ot) = thing { let mut fields = vec![]; for variant in &ot.variants { - if let Some(value) = &variant.clone().fields().get(0).unwrap().default { + if let Some(value) = &variant.clone().fields().get(0).unwrap().value { fields.push(( variant .name()