@lokascript/framework 2.7.1 → 2.8.0

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.
package/dist/api/index.js CHANGED
@@ -1372,7 +1372,8 @@ function buildFormatString(schema, profile, keyword) {
1372
1372
  if (profile.wordOrder === "SVO" || profile.wordOrder === "VSO") {
1373
1373
  parts.push(keyword);
1374
1374
  }
1375
- for (const role of schema.roles) {
1375
+ const sortedRoles = sortRolesByWordOrder(schema.roles, profile.wordOrder);
1376
+ for (const role of sortedRoles) {
1376
1377
  const marker = getMarkerForRole(role, profile);
1377
1378
  const roleName = `{${role.role}}`;
1378
1379
  if (marker) {
@@ -1855,7 +1856,9 @@ function buildProtocolSection() {
1855
1856
  3. No spaces around the colon in role:value pairs
1856
1857
  4. Strings with spaces must be quoted: \`patient:"hello world"\`
1857
1858
  5. Selectors start with \`#\`, \`.\`, \`[\`, \`@\`, or \`*\`
1858
- 6. Output must be valid bracket syntax: \`[action role:value ...]\``;
1859
+ 6. A selector containing a space, a combinator (\`>\` \`+\` \`~\`), or a comma must use a selector literal: \`patient:<ul > li/>\`, \`patient:<.a, .b/>\`
1860
+ 7. Inside a structural role (\`body\`, \`then\`, \`else\`, \`condition\`, \`loop-body\`, \`variable\`, \`catch\`, \`finally\`) a \`[...]\` value is always a nested command. Write an attribute selector there as \`condition:<[data-active]/>\`
1861
+ 8. Output must be valid bracket syntax: \`[action role:value ...]\``;
1859
1862
  return {
1860
1863
  id: "protocol",
1861
1864
  title: "LSE Protocol",
@@ -1868,6 +1871,7 @@ function buildValueTypeSection() {
1868
1871
 
1869
1872
  | Type | Syntax | Example |
1870
1873
  |------|--------|---------|
1874
+ | Selector literal | Delimited by \`<\` and \`/>\` | \`<ul > li/>\`, \`<.a, .b/>\`, \`<[data-id]/>\` |
1871
1875
  | Selector | Starts with \`#\` \`.\` \`[\` \`@\` \`*\` | \`#button\`, \`.active\`, \`[data-id]\` |
1872
1876
  | String | Quoted with \`"\` or \`'\` | \`"hello world"\`, \`'json'\` |
1873
1877
  | Boolean | Exact: \`true\` / \`false\` | \`visible:true\` |