async function save_library_symbol(id, { code, content, preview }) {

	const content_changes = db_utils.generate_entry_changes(content.original.entries, content.updated.entries)
	const field_changes = db_utils.generate_field_changes(content.original.fields, content.updated.fields)

	// DB: save block code if changed
	await supabase.from('library_symbols').update({ code }).eq('id', id)

	// DB: save Symbol fields
	await helpers.handle_field_changes_new(field_changes, {
		library_symbol: id
	})

	// DB: save Symbol entries
	await helpers.handle_content_changes_new(content_changes, {
		library_symbol: id
	})

	await supabase.storage.from('symbols').upload(`${id}/preview.html`, preview, { upsert: true })
}
Saves changes to an existing library symbol
@param {string} id - The ID of the symbol to update
@param {Object} options - The update options
@param {Object} options.code - The symbol code (html, css, js)
@param {Object} options.content - The symbol data with original and updated values
@param {Object} options.content.original - The original symbol content
@param {Array<import('$lib').Entry>} options.content.original.entries - Array of original entry objects
@param {Array<import('$lib').Field>} options.content.original.fields - Array of original field objects
@param {Object} options.content.updated - The updated symbol content
@param {Array<import('$lib').Entry>} options.content.updated.entries - Array of updated entry objects
@param {Array<import('$lib').Field>} options.content.updated.fields - Array of updated field objects
@param {string} options.preview - The preview HTML
@returns {Promise<void>}